SyncConflictResolver.StoreErrorAction Property

Gets or sets a ResolveAction enumeration value that specifies the action to take when an error occurs in the client or server data store.

Namespace:  Microsoft.Synchronization.Data
Assembly:  Microsoft.Synchronization.Data (in Microsoft.Synchronization.Data.dll)

Syntax

'Declaration
Public Property StoreErrorAction As ResolveAction
    Get
    Set
'Usage
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);
}
member StoreErrorAction : ResolveAction with get, set
function get StoreErrorAction () : ResolveAction
function set StoreErrorAction (value : ResolveAction)

Property Value

Type: Microsoft.Synchronization.Data.ResolveAction
A ResolveAction enumeration value that specifies the action to take when an error occurs in the client or server data store.

Examples

The following code example sets the resolution action for each type of conflict that the client synchronization provider can encounter. To view this code in the context of a complete example, see How to: Handle Data Conflicts and Errors.

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

See Also

Reference

SyncConflictResolver Class

Microsoft.Synchronization.Data Namespace