次の方法で共有


SyncConflictResolver.ClientUpdateServerUpdateAction プロパティ

ClientUpdateServerUpdate 競合が発生した場合に実行するアクションを指定する ResolveAction 列挙値を取得または設定します。

名前空間: Microsoft.Synchronization.Data
アセンブリ: Microsoft.Synchronization.Data (microsoft.synchronization.data.dll 内)

構文

'宣言
Public Property ClientUpdateServerUpdateAction As ResolveAction
'使用
Dim instance As SyncConflictResolver
Dim value As ResolveAction

value = instance.ClientUpdateServerUpdateAction

instance.ClientUpdateServerUpdateAction = value
public ResolveAction ClientUpdateServerUpdateAction { get; set; }
public:
property ResolveAction ClientUpdateServerUpdateAction {
    ResolveAction get ();
    void set (ResolveAction value);
}
/** @property */
public ResolveAction get_ClientUpdateServerUpdateAction ()

/** @property */
public void set_ClientUpdateServerUpdateAction (ResolveAction value)
public function get ClientUpdateServerUpdateAction () : ResolveAction

public function set ClientUpdateServerUpdateAction (value : ResolveAction)

プロパティ値

ClientUpdateServerUpdate 競合が発生した場合に実行するアクションを指定する 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 名前空間