次の方法で共有


SyncConflictResolver.ClientInsertServerInsertAction プロパティ

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

名前空間: 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 名前空間