本文整理汇总了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();
}
示例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" );
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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 ) );
}
示例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 );
}