本文整理汇总了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 ) );
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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() );
}
示例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 );
}
示例7: service_on_null_iChange_add_argumentNullException
public void service_on_null_iChange_add_argumentNullException()
{
ChangeTrackingService svc = new ChangeTrackingService();
svc.Add( null, AddChangeBehavior.RedoRequest );
}
示例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 );
}
}
示例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 );
}
示例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();
}
示例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();
}