共用方式為


SyncConflictResolver.ClientUpdateServerDeleteAction 屬性

取得或設定 ResolveAction 列舉值,這個值會指定當發生 ClientUpdateServerDelete 衝突時所要採取的動作。

命名空間: Microsoft.Synchronization.Data
組件: Microsoft.Synchronization.Data (在 microsoft.synchronization.data.dll)

語法

'宣告
Public Property ClientUpdateServerDeleteAction As ResolveAction
'用途
Dim instance As SyncConflictResolver
Dim value As ResolveAction

value = instance.ClientUpdateServerDeleteAction

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

/** @property */
public void set_ClientUpdateServerDeleteAction (ResolveAction value)
public function get ClientUpdateServerDeleteAction () : ResolveAction

public function set ClientUpdateServerDeleteAction (value : ResolveAction)

屬性值

ResolveAction 列舉值,這個值會指定當發生 ClientUpdateServerDelete 衝突時所要採取的動作。

範例

下列程式碼範例會針對用戶端同步處理提供者可能遇到的每一種衝突類型來設定解決動作。若要在完整範例的內容中檢視這段程式碼,請參閱 HOW TO:處理資料衝突和錯誤

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 命名空間