当前位置: 首页>>代码示例>>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;未经允许,请勿转载。