Compartir a través de


SyncConflictResolver.ClientInsertServerInsertAction Propiedad

Obtiene o establece un valor de enumeración ResolveAction que especifica la acción que se va a llevar a cabo cuando se produce un conflicto ClientInsertServerInsert.

Espacio de nombres: Microsoft.Synchronization.Data
Ensamblado: Microsoft.Synchronization.Data (en microsoft.synchronization.data.dll)

Sintaxis

'Declaración
Public Property ClientInsertServerInsertAction As ResolveAction
'Uso
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)

Valor de la propiedad

Valor de enumeración ResolveAction que especifica la acción que se va a llevar a cabo si se produce un conflicto ClientInsertServerInsert.

Ejemplo

El ejemplo de código siguiente establece la acción de resolución para cada tipo de conflicto que encuentre el proveedor de sincronización del cliente. Para consultar este código en el contexto de un ejemplo completo, vea Controlar conflictos de datos y errores.

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

Vea también

Referencia

SyncConflictResolver Clase
SyncConflictResolver Miembros
Microsoft.Synchronization.Data Espacio de nombres