Propriedade SyncConflictResolver.ClientUpdateServerDeleteAction
Obtém ou define um valor de enumeração ResolveAction que especifica a ação a ser executada quando ocorre um conflito ClientUpdateServerDelete.
Namespace: Microsoft.Synchronization.Data
Assembly: Microsoft.Synchronization.Data (em microsoft.synchronization.data.dll)
Sintaxe
'Declaração
Public Property ClientUpdateServerDeleteAction As ResolveAction
'Uso
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)
Valor da propriedade
Um valor de enumeração ResolveAction que especifica a ação a ser executada quando ocorre um conflito ClientUpdateServerDelete.
Exemplo
O exemplo de código a seguir define a ação de resolução para cada tipo de conflito que o provedor de sincronização do cliente pode encontrar. Para exibir esse código no contexto de um exemplo completo, consulte Como tratar conflitos de dados e erros.
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
Consulte também
Referência
Classe SyncConflictResolver
Membros SyncConflictResolver
Namespace Microsoft.Synchronization.Data