Propriedade SyncConflictResolver.StoreErrorAction
Obtém ou define um valor de enumeração ResolveAction que especifica a ação a ser executada quando ocorre um erro no repositório de dados no cliente ou no servidor.
Namespace: Microsoft.Synchronization.Data
Assembly: Microsoft.Synchronization.Data (em microsoft.synchronization.data.dll)
Sintaxe
'Declaração
Public Property StoreErrorAction As ResolveAction
'Uso
Dim instance As SyncConflictResolver
Dim value As ResolveAction
value = instance.StoreErrorAction
instance.StoreErrorAction = value
public ResolveAction StoreErrorAction { get; set; }
public:
property ResolveAction StoreErrorAction {
ResolveAction get ();
void set (ResolveAction value);
}
/** @property */
public ResolveAction get_StoreErrorAction ()
/** @property */
public void set_StoreErrorAction (ResolveAction value)
public function get StoreErrorAction () : ResolveAction
public function set StoreErrorAction (value : ResolveAction)
Valor da propriedade
Um valor de enumeração ResolveAction que especifica a ação a ser executada quando ocorre um erro no repositório de dados no cliente ou no servidor.
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