SyncConflictResolver.ClientInsertServerInsertAction 属性
获取或设置一个 ResolveAction 枚举值,该值指定发生 ClientInsertServerInsert 冲突时要采取的操作。
命名空间: Microsoft.Synchronization.Data
程序集: Microsoft.Synchronization.Data(在 microsoft.synchronization.data.dll 中)
语法
声明
Public Property ClientInsertServerInsertAction As ResolveAction
用法
Dim instance As SyncConflictResolver
Dim value As ResolveAction
value = instance.ClientInsertServerInsertAction
instance.ClientInsertServerInsertAction = value
public ResolveAction ClientInsertServerInsertAction { get; set; }
public:
property ResolveAction ClientInsertServerInsertAction {
ResolveAction get ();
void set (ResolveAction value);
}
/** @property */
public ResolveAction get_ClientInsertServerInsertAction ()
/** @property */
public void set_ClientInsertServerInsertAction (ResolveAction value)
public function get ClientInsertServerInsertAction () : ResolveAction
public function set ClientInsertServerInsertAction (value : ResolveAction)
属性值
一个 ClientInsertServerInsert 枚举值,该值指定发生 ResolveAction 冲突时要采取的操作。
示例
下面的代码示例为客户端同步提供程序可能遇到每种冲突类型设置解决操作。若要在完整示例上下文中查看此代码,请参见如何处理数据冲突和错误。
this.ConflictResolver.ClientDeleteServerUpdateAction = ResolveAction.ServerWins;
this.ConflictResolver.ClientUpdateServerDeleteAction = ResolveAction.ClientWins;
//If any of the following conflicts or errors occur, the ApplyChangeFailed
//event is raised.
this.ConflictResolver.ClientInsertServerInsertAction = ResolveAction.FireEvent;
this.ConflictResolver.ClientUpdateServerUpdateAction = ResolveAction.FireEvent;
this.ConflictResolver.StoreErrorAction = ResolveAction.FireEvent;
//Log information for the ApplyChangeFailed event and handle any
//ResolveAction.FireEvent cases.
this.ApplyChangeFailed +=new EventHandler<ApplyChangeFailedEventArgs>(SampleClientSyncProvider_ApplyChangeFailed);
Me.ConflictResolver.ClientDeleteServerUpdateAction = ResolveAction.ServerWins
Me.ConflictResolver.ClientUpdateServerDeleteAction = ResolveAction.ClientWins
'If any of the following conflicts or errors occur, the ApplyChangeFailed
'event is raised.
Me.ConflictResolver.ClientInsertServerInsertAction = ResolveAction.FireEvent
Me.ConflictResolver.ClientUpdateServerUpdateAction = ResolveAction.FireEvent
Me.ConflictResolver.StoreErrorAction = ResolveAction.FireEvent
'Log information for the ApplyChangeFailed event and handle any
'ResolveAction.FireEvent cases.
AddHandler Me.ApplyChangeFailed, AddressOf SampleClientSyncProvider_ApplyChangeFailed
请参阅
参考
SyncConflictResolver 类
SyncConflictResolver 成员
Microsoft.Synchronization.Data 命名空间