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


C# ChangeTrackingService.Redo方法代码示例

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


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

示例1: after_suspend_cannot_call_Redo

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

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

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

示例2: changeTrackingService_using_beginAtomicOperation_redo_should_reapply_all_changes_with_one_pass

		public void changeTrackingService_using_beginAtomicOperation_redo_should_reapply_all_changes_with_one_pass()
		{
			var target = new ChangeTrackingService();

			var person = new Person( target );
			var list = new PersonCollection( target );

			using( var actual = target.BeginAtomicOperation() )
			{
				person.Name = "Mauro";
				list.Add( person );
				person.Name = "Mauro Servienti";

				actual.Complete();
			}

			target.Undo();
			target.Redo();

			list.Count.Should().Be.EqualTo( 1 );
			person.Name.Should().Be.EqualTo( "Mauro Servienti" );
		}
开发者ID:nazarenomanco,项目名称:Radical,代码行数:22,代码来源:AtomicChangesChangeTrackingServiceTests.cs

示例3: service_after_redo_CanRedo_is_false

        public void service_after_redo_CanRedo_is_false()
        {
            String expected = "Mauro";

            ChangeTrackingService svc = new ChangeTrackingService();

            Person p = new Person( svc );
            p.Name = expected;

            svc.Undo();
            svc.Redo();

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

示例4: afterUndo_service_Redo_restore_previous_value

        public void afterUndo_service_Redo_restore_previous_value()
        {
            ChangeTrackingService svc = new ChangeTrackingService();
            String expected = "Mauro";

            Person p = new Person( svc, false );
            p.Name = expected;

            svc.Undo();
            svc.Redo();

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

示例5: service_correcly_handle_multiple_undos_redos

        public void service_correcly_handle_multiple_undos_redos()
        {
            String expected = "Mauro";

            ChangeTrackingService svc = new ChangeTrackingService();

            Person p = new Person( svc );
            p.Name = expected;

            svc.Undo();
            svc.Redo();
            svc.Undo();
            svc.Redo();

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

示例6: service_on_redo_with_nothing_to_do_not_raise_trackingServiceStateChanged_event

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

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

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

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

示例7: service_on_redo_raise_trackingServiceStateChanged_event

        public void service_on_redo_raise_trackingServiceStateChanged_event()
        {
            Int32 expected = 2; //1: Store actual value, 2: Redo
            Int32 actual = 0;

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

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

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

示例8: service_redoes_are_in_the_correct_order

        public void service_redoes_are_in_the_correct_order()
        {
            var p1 = new Person( null, false );
            var p2 = new Person( null, false );
            var p3 = new Person( null, false );

            ChangeTrackingService svc = new ChangeTrackingService();

            PersonCollection list = new PersonCollection( svc );
            list.Add( p1 );
            list.Add( p2 );
            list.Add( p3 );
            list.Move( p2, 0 );
            list.Remove( p1 );

            while( svc.CanUndo )
            {
                svc.Undo();
            }

            svc.Redo();
            Assert.AreEqual<Int32>( 1, list.Count );
            Assert.IsTrue( list.Contains( p1 ) );

            svc.Redo();
            Assert.AreEqual<Int32>( 2, list.Count );
            Assert.IsTrue( list.Contains( p2 ) );

            svc.Redo();
            Assert.AreEqual<Int32>( 3, list.Count );
            Assert.IsTrue( list.Contains( p3 ) );

            svc.Redo();
            Assert.AreEqual<Int32>( 0, list.IndexOf( p2 ) );

            svc.Redo();
            Assert.AreEqual<Int32>( 2, list.Count );
            Assert.IsFalse( list.Contains( p1 ) );
        }
开发者ID:RadicalFx,项目名称:Radical,代码行数:39,代码来源:CollectionChangeTrackingServiceTests.cs

示例9: afterUndo_service_Redo_restore_previous_value

        public void afterUndo_service_Redo_restore_previous_value()
        {
            ChangeTrackingService svc = new ChangeTrackingService();
            Int32 expected = 1;

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

            svc.Undo();
            svc.Redo();

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


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