当前位置: 首页>>代码示例>>C#>>正文


C# ChangeTrackingService.RejectChanges方法代码示例

本文整理汇总了C#中Topics.Radical.ChangeTracking.ChangeTrackingService.RejectChanges方法的典型用法代码示例。如果您正苦于以下问题:C# ChangeTrackingService.RejectChanges方法的具体用法?C# ChangeTrackingService.RejectChanges怎么用?C# ChangeTrackingService.RejectChanges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Topics.Radical.ChangeTracking.ChangeTrackingService的用法示例。


在下文中一共展示了ChangeTrackingService.RejectChanges方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: changeTrackingService_hasTransientEntities_should_be_false_after_rejectChanges

        public void changeTrackingService_hasTransientEntities_should_be_false_after_rejectChanges()
        {
            var svc = new ChangeTrackingService();
            var p = new Person( svc, true );
            svc.RejectChanges();

            svc.HasTransientEntities.Should().Be.False();
        }
开发者ID:RadicalFx,项目名称:Radical,代码行数:8,代码来源:EntityChangeTrackingServiceTests.cs

示例2: after_suspend_cannot_call_RejectChanges

        public void after_suspend_cannot_call_RejectChanges()
        {
            ChangeTrackingService svc = new ChangeTrackingService();

            Person p = new Person( svc );
            p.Name = "Mauro";

            svc.Suspend();
            svc.RejectChanges();
        }
开发者ID:RadicalFx,项目名称:Radical,代码行数:10,代码来源:EntityChangeTrackingServiceTests.cs

示例3: after_rejectChanges_service_canRedo_is_false

        public void after_rejectChanges_service_canRedo_is_false()
        {
            ChangeTrackingService svc = new ChangeTrackingService();

            Person p = new Person( svc );
            p.Name = "Mauro";
            svc.RejectChanges();

            Assert.IsFalse( svc.CanRedo );
        }
开发者ID:RadicalFx,项目名称:Radical,代码行数:10,代码来源:EntityChangeTrackingServiceTests.cs

示例4: after_rejectChanges_entity_is_no_more_changed

        public void after_rejectChanges_entity_is_no_more_changed()
        {
            EntityTrackingStates expected = EntityTrackingStates.None;

            ChangeTrackingService svc = new ChangeTrackingService();

            Person p = new Person( svc );
            p.Name = "Mauro";

            svc.RejectChanges();

            EntityTrackingStates actual = svc.GetEntityState( p );
            Assert.AreEqual<EntityTrackingStates>( expected, actual );
        }
开发者ID:RadicalFx,项目名称:Radical,代码行数:14,代码来源:EntityChangeTrackingServiceTests.cs

示例5: entity_registeredAsTransient_without_autoRemove_on_RejectChanges_is_no_more_transient

        public void entity_registeredAsTransient_without_autoRemove_on_RejectChanges_is_no_more_transient()
        {
            ChangeTrackingService svc = new ChangeTrackingService();
            EntityTrackingStates expected = EntityTrackingStates.None;

            Person p = new Person( svc, false );
            svc.RegisterTransient( p, false );
            svc.RejectChanges();

            EntityTrackingStates actual = svc.GetEntityState( p );

            Assert.AreEqual<EntityTrackingStates>( expected, actual );
        }
开发者ID:RadicalFx,项目名称:Radical,代码行数:13,代码来源:EntityChangeTrackingServiceTests.cs

示例6: unchangedTransientEntity_service_RejectChanges_entity_is_not_transient

        public void unchangedTransientEntity_service_RejectChanges_entity_is_not_transient()
        {
            ChangeTrackingService svc = new ChangeTrackingService();

            Person p = new Person( svc );

            svc.RejectChanges();

            var list = svc.GetEntities( EntityTrackingStates.IsTransient, false );
            var persons = list.OfType<Person>();

            Assert.IsFalse( persons.Contains( p ) );
        }
开发者ID:RadicalFx,项目名称:Radical,代码行数:13,代码来源:EntityChangeTrackingServiceTests.cs

示例7: service_on_rejectChanges_with_nothing_to_do_not_raise_trackingServiceStateChanged_event

        public void service_on_rejectChanges_with_nothing_to_do_not_raise_trackingServiceStateChanged_event()
        {
            Int32 expected = 0;
            Int32 actual = 0;

            ChangeTrackingService svc = new ChangeTrackingService();
            Person p = new Person( svc, false );

            svc.TrackingServiceStateChanged += ( sender, args ) => { actual++; };
            svc.RejectChanges();

            Assert.AreEqual<Int32>( expected, actual );
        }
开发者ID:RadicalFx,项目名称:Radical,代码行数:13,代码来源:EntityChangeTrackingServiceTests.cs

示例8: service_on_rejectChanges_raise_trackingServiceStateChanged_event_once_even_if_there_are_more_changes

        public void service_on_rejectChanges_raise_trackingServiceStateChanged_event_once_even_if_there_are_more_changes()
        {
            Int32 expected = 1;
            Int32 actual = 0;

            ChangeTrackingService svc = new ChangeTrackingService();
            Person p = new Person( svc );
            p.Name = "M";
            p.Name = "Ma";
            p.Name = "Mau";
            p.Name = "Maur";
            p.Name = "Mauro";

            svc.TrackingServiceStateChanged += ( sender, args ) => { actual++; };
            svc.RejectChanges();

            Assert.AreEqual<Int32>( expected, actual );
        }
开发者ID:RadicalFx,项目名称:Radical,代码行数:18,代码来源:EntityChangeTrackingServiceTests.cs

示例9: service_with_changes_and_transientEntities_on_rejectChanges_raise_trackingServiceStateChanged_event

        public void service_with_changes_and_transientEntities_on_rejectChanges_raise_trackingServiceStateChanged_event()
        {
            Int32 expected = 1;
            Int32 actual = 0;

            ChangeTrackingService svc = new ChangeTrackingService();
            Person p = new Person( svc );
            p.Name = "Mauro";

            svc.TrackingServiceStateChanged += ( sender, args ) => { actual++; };
            svc.RejectChanges();

            Assert.AreEqual<Int32>( expected, actual );
        }
开发者ID:RadicalFx,项目名称:Radical,代码行数:14,代码来源:EntityChangeTrackingServiceTests.cs

示例10: after_rejectChanges_service_canRedo_is_false

        public void after_rejectChanges_service_canRedo_is_false()
        {
            IChangeTrackingService svc = new ChangeTrackingService();

            PersonCollection p = new PersonCollection( svc );
            p.Add( new Person( null, false ) );

            svc.RejectChanges();

            Assert.IsFalse( svc.CanRedo );
        }
开发者ID:RadicalFx,项目名称:Radical,代码行数:11,代码来源:CollectionChangeTrackingServiceTests.cs


注:本文中的Topics.Radical.ChangeTracking.ChangeTrackingService.RejectChanges方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。