NotifyingChangeApplier.ApplyChanges Method (ConflictResolutionPolicy, ChangeBatch, IChangeDataRetriever, SyncKnowledge, ForgottenKnowledge, INotifyingChangeApplierTarget, SyncSessionContext, SyncCallbacks)
Performs conflict detection, conflict handling, and change application for a batch of changes.
Namespace: Microsoft.Synchronization
Assembly: Microsoft.Synchronization (in microsoft.synchronization.dll)
Syntax
'Declaration
Public Sub ApplyChanges ( _
resolutionPolicy As ConflictResolutionPolicy, _
sourceChanges As ChangeBatch, _
changeDataRetriever As IChangeDataRetriever, _
destinationKnowledge As SyncKnowledge, _
destinationForgottenKnowledge As ForgottenKnowledge, _
changeApplierTarget As INotifyingChangeApplierTarget, _
syncSessionState As SyncSessionContext, _
syncCallback As SyncCallbacks _
)
'Usage
Dim instance As NotifyingChangeApplier
Dim resolutionPolicy As ConflictResolutionPolicy
Dim sourceChanges As ChangeBatch
Dim changeDataRetriever As IChangeDataRetriever
Dim destinationKnowledge As SyncKnowledge
Dim destinationForgottenKnowledge As ForgottenKnowledge
Dim changeApplierTarget As INotifyingChangeApplierTarget
Dim syncSessionState As SyncSessionContext
Dim syncCallback As SyncCallbacks
instance.ApplyChanges(resolutionPolicy, sourceChanges, changeDataRetriever, destinationKnowledge, destinationForgottenKnowledge, changeApplierTarget, syncSessionState, syncCallback)
public void ApplyChanges (
ConflictResolutionPolicy resolutionPolicy,
ChangeBatch sourceChanges,
IChangeDataRetriever changeDataRetriever,
SyncKnowledge destinationKnowledge,
ForgottenKnowledge destinationForgottenKnowledge,
INotifyingChangeApplierTarget changeApplierTarget,
SyncSessionContext syncSessionState,
SyncCallbacks syncCallback
)
public:
void ApplyChanges (
ConflictResolutionPolicy resolutionPolicy,
ChangeBatch^ sourceChanges,
IChangeDataRetriever^ changeDataRetriever,
SyncKnowledge^ destinationKnowledge,
ForgottenKnowledge^ destinationForgottenKnowledge,
INotifyingChangeApplierTarget^ changeApplierTarget,
SyncSessionContext^ syncSessionState,
SyncCallbacks^ syncCallback
)
public void ApplyChanges (
ConflictResolutionPolicy resolutionPolicy,
ChangeBatch sourceChanges,
IChangeDataRetriever changeDataRetriever,
SyncKnowledge destinationKnowledge,
ForgottenKnowledge destinationForgottenKnowledge,
INotifyingChangeApplierTarget changeApplierTarget,
SyncSessionContext syncSessionState,
SyncCallbacks syncCallback
)
public function ApplyChanges (
resolutionPolicy : ConflictResolutionPolicy,
sourceChanges : ChangeBatch,
changeDataRetriever : IChangeDataRetriever,
destinationKnowledge : SyncKnowledge,
destinationForgottenKnowledge : ForgottenKnowledge,
changeApplierTarget : INotifyingChangeApplierTarget,
syncSessionState : SyncSessionContext,
syncCallback : SyncCallbacks
)
Parameters
- resolutionPolicy
The policy to use for resolving conflicts.
- sourceChanges
The batch of changes from the source provider.
- changeDataRetriever
An object that can be used to retrieve item data from the source replica.
- destinationKnowledge
The knowledge of the destination replica.
- destinationForgottenKnowledge
The forgotten knowledge of the destination replica.
- changeApplierTarget
The object that will be called to save changes and conflicts.
- syncSessionState
State information about the current session.
- syncCallback
Callbacks that will receive notifications about change application events.
Remarks
This method detects conflicts that occur between the changes sent in sourceChanges and the corresponding items in the destination replica. It resolves any conflicts according to the policy specified by resolutionPolicy. If it is necessary, this method then calls methods on changeApplierTarget to save changes to the destination replica and to save unresolved conflicts.
To get the destination version, this method calls TryGetDestinationVersion on changeApplierTarget for each item in sourceChanges.
See Also
Reference
NotifyingChangeApplier Class
NotifyingChangeApplier Members
Microsoft.Synchronization Namespace