當前位置: 首頁>>代碼示例>>C#>>正文


C# ChangeTrackingService.Add方法代碼示例

本文整理匯總了C#中Topics.Radical.ChangeTracking.ChangeTrackingService.Add方法的典型用法代碼示例。如果您正苦於以下問題:C# ChangeTrackingService.Add方法的具體用法?C# ChangeTrackingService.Add怎麽用?C# ChangeTrackingService.Add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Topics.Radical.ChangeTracking.ChangeTrackingService的用法示例。


在下文中一共展示了ChangeTrackingService.Add方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: service_validate_a_valid_bookmark_is_true

        public void service_validate_a_valid_bookmark_is_true()
        {
            RejectCallback<String> cb = cv => { };
            Object fakeOwner = new Object();
            String change = String.Empty;
            IChange expected = new PropertyValueChange<String>( fakeOwner, "property-name", change, cb );

            ChangeTrackingService svc = new ChangeTrackingService();
            svc.Add( expected, AddChangeBehavior.RedoRequest );

            var bmk = svc.CreateBookmark();

            Assert.IsTrue( svc.Validate( bmk ) );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:14,代碼來源:EntityChangeTrackingServiceTests.cs

示例2: service_add_notSupported_AddChangeBehavior

        public void service_add_notSupported_AddChangeBehavior()
        {
            IChange stub = MockRepository.GenerateStub<IChange>();

            ChangeTrackingService svc = new ChangeTrackingService();
            svc.Add( stub, AddChangeBehavior.None );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:7,代碼來源:EntityChangeTrackingServiceTests.cs

示例3: service_add_invalid_AddChangeBehavior

        public void service_add_invalid_AddChangeBehavior()
        {
            IChange stub = MockRepository.GenerateStub<IChange>();

            ChangeTrackingService svc = new ChangeTrackingService();
            svc.Add( stub, ( AddChangeBehavior )1000 );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:7,代碼來源:EntityChangeTrackingServiceTests.cs

示例4: service_after_add_isChanged_is_true

        public void service_after_add_isChanged_is_true()
        {
            RejectCallback<String> cb = cv => { };
            Object fakeOwner = new Object();
            String change = String.Empty;
            PropertyValueChange<String> stub = new PropertyValueChange<String>( fakeOwner, "property-name", change, cb );

            ChangeTrackingService svc = new ChangeTrackingService();
            svc.Add( stub, AddChangeBehavior.RedoRequest );

            Assert.IsTrue( svc.IsChanged );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:12,代碼來源:EntityChangeTrackingServiceTests.cs

示例5: service_after_add_getChangeSet_return_valid_cSet

        public void service_after_add_getChangeSet_return_valid_cSet()
        {
            RejectCallback<String> cb = cv => { };
            Object fakeOwner = new Object();
            String change = String.Empty;
            IChange expected = new PropertyValueChange<String>( fakeOwner, "property-name", change, cb );

            ChangeTrackingService svc = new ChangeTrackingService();
            svc.Add( expected, AddChangeBehavior.RedoRequest );

            IChangeSet cSet = svc.GetChangeSet();

            Assert.AreEqual<IChange>( expected, cSet.First() );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:14,代碼來源:EntityChangeTrackingServiceTests.cs

示例6: after_suspend_no_more_changes_can_be_added

        public void after_suspend_no_more_changes_can_be_added()
        {
            RejectCallback<String> cb = cv => { };
            Object fakeOwner = new Object();
            String change = String.Empty;
            PropertyValueChange<String> stub = new PropertyValueChange<string>( fakeOwner, "property-name", change, cb );

            ChangeTrackingService svc = new ChangeTrackingService();
            svc.Suspend();

            svc.Add( stub, AddChangeBehavior.RedoRequest );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:12,代碼來源:EntityChangeTrackingServiceTests.cs

示例7: service_on_null_iChange_add_argumentNullException

 public void service_on_null_iChange_add_argumentNullException()
 {
     ChangeTrackingService svc = new ChangeTrackingService();
     svc.Add( null, AddChangeBehavior.RedoRequest );
 }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:5,代碼來源:EntityChangeTrackingServiceTests.cs

示例8: service_on_dispose_with_changes

        public void service_on_dispose_with_changes()
        {
            RejectCallback<String> rc = e => { };
            CommitCallback<String> cc = e => { };
            Object fakeOwner = new Object();
            String change = "Foo";

            var iChange = new PropertyValueChange<String>( fakeOwner, "property-name", change, rc, cc, "" );

            using( ChangeTrackingService svc = new ChangeTrackingService() )
            {
                svc.Add( iChange, AddChangeBehavior.Default );
            }
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:14,代碼來源:EntityChangeTrackingServiceTests.cs

示例9: Object

        public void service_on_change_reject_ArgumentOutOfRangeException_on_none_commit_reason_with_hacked_property_change()
        {
            RejectCallback<String> rc = e => { };
            CommitCallback<String> cc = e => { };
            Object fakeOwner = new Object();
            String change = "Foo";

            var iChange = new HackedPropertyValueChange( fakeOwner, change, rc, cc );
            iChange.HackedRejectReason = RejectReason.None;

            ChangeTrackingService svc = new ChangeTrackingService();
            svc.Add( iChange, AddChangeBehavior.Default );

            iChange.Reject( RejectReason.RejectChanges );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:15,代碼來源:EntityChangeTrackingServiceTests.cs

示例10: service_on_change_commit_remove_change_from_changesStack

        public void service_on_change_commit_remove_change_from_changesStack()
        {
            RejectCallback<String> rc = e => { };
            CommitCallback<String> cc = e => { };
            Object fakeOwner = new Object();
            String change = "Foo";

            var iChange = new PropertyValueChange<String>( fakeOwner, "property-name", change, rc, cc, "" );

            ChangeTrackingService svc = new ChangeTrackingService();
            svc.Add( iChange, AddChangeBehavior.Default );

            iChange.Commit( CommitReason.AcceptChanges );

            svc.IsChanged.Should().Be.False();
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:16,代碼來源:EntityChangeTrackingServiceTests.cs

示例11: service_on_acceptChanges_successfully_commit_a_commitSupported_change

        public void service_on_acceptChanges_successfully_commit_a_commitSupported_change()
        {
            var iChange = MockRepository.GenerateStub<IChange>();
            iChange.Expect( obj => obj.IsCommitSupported ).Return( true );
            iChange.Expect( obj => obj.Commit( CommitReason.AcceptChanges ) ).Repeat.Once();

            var svc = new ChangeTrackingService();
            svc.Add( iChange, AddChangeBehavior.Default );

            svc.AcceptChanges();

            iChange.VerifyAllExpectations();
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:13,代碼來源:EntityChangeTrackingServiceTests.cs


注:本文中的Topics.Radical.ChangeTracking.ChangeTrackingService.Add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。