Partager via


Propriété SyncConflictResolver.ClientUpdateServerUpdateAction

Obtient ou définit une valeur d'énumération ResolveAction qui spécifie l'action à effectuer lorsqu'un conflit ClientUpdateServerUpdate se produit.

Espace de noms: Microsoft.Synchronization.Data
Assembly: Microsoft.Synchronization.Data (dans microsoft.synchronization.data.dll)

Syntaxe

'Déclaration
Public Property ClientUpdateServerUpdateAction As ResolveAction
'Utilisation
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)

Valeur de propriété

Valeur d'énumération ResolveAction qui spécifie l'action à effectuer lorsqu'un conflit ClientUpdateServerUpdate se produit.

Exemple

L'exemple de code suivant définit l'action de résolution pour chaque type de conflit que le fournisseur de synchronisation client peut rencontrer. Pour afficher ce code dans le contexte d'un exemple complet, consultez Procédure : gérer les conflits de données et les erreurs.

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

Voir aussi

Référence

Classe SyncConflictResolver
Membres SyncConflictResolver
Espace de noms Microsoft.Synchronization.Data