當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。