NotifyingChangeApplier::ApplyFullEnumerationChanges Method (ConflictResolutionPolicy, CollisionConflictResolutionPolicy, FullEnumerationChangeBatch, IChangeDataRetriever, IEnumerable<ItemChange>, SyncKnowledge, ForgottenKnowledge, INotifyingChangeApplierTarget, IConflictLogAccess, SyncSessionContext, SyncCallbacks)

Performs conflict detection, concurrency conflict handling, constraint conflict handling, change application, and conflict log management for a batch of changes, as part of a recovery synchronization.

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

public:
void ApplyFullEnumerationChanges(
	ConflictResolutionPolicy resolutionPolicy, 
	CollisionConflictResolutionPolicy collisionConflictResolutionPolicy, 
	FullEnumerationChangeBatch^ sourceChanges, 
	IChangeDataRetriever^ changeDataRetriever, 
	IEnumerable<ItemChange^>^ destinationVersions, 
	SyncKnowledge^ destinationKnowledge, 
	ForgottenKnowledge^ destinationForgottenKnowledge, 
	INotifyingChangeApplierTarget^ changeApplierTarget, 
	IConflictLogAccess^ conflictLogAccess, 
	SyncSessionContext^ syncSessionState, 
	SyncCallbacks^ syncCallback
)

Parameters

resolutionPolicy
Type: Microsoft.Synchronization::ConflictResolutionPolicy
The policy to use for resolving conflicts.
collisionConflictResolutionPolicy
Type: Microsoft.Synchronization::CollisionConflictResolutionPolicy
The policy to use for resolving collision constraint conflicts.
sourceChanges
Type: Microsoft.Synchronization::FullEnumerationChangeBatch
The batch of changes from the source provider.
changeDataRetriever
Type: Microsoft.Synchronization::IChangeDataRetriever
An object that can be used to retrieve item data from the source replica.
destinationVersions
Type: System.Collections.Generic::IEnumerable<ItemChange>
A batch of changes that contains the versions of items that are stored in the destination replica. These items correspond to the items in sourceChanges.
destinationKnowledge
Type: Microsoft.Synchronization::SyncKnowledge
The knowledge of the destination replica.
destinationForgottenKnowledge
Type: Microsoft.Synchronization::ForgottenKnowledge
The forgotten knowledge of the destination replica.
changeApplierTarget
Type: Microsoft.Synchronization::INotifyingChangeApplierTarget
The object that will be called to save changes and conflicts.
conflictLogAccess
Type: Microsoft.Synchronization::IConflictLogAccess
The conflict log where deferred conflicts and temporary conflicts are stored.
syncSessionState
Type: Microsoft.Synchronization::SyncSessionContext
State information about the current session.
syncCallback
Type: Microsoft.Synchronization::SyncCallbacks
Callbacks that will receive notifications about change application events.

ExceptionCondition
ArgumentNullException

sourceChanges, changeDataRetriever, destinationKnowledge, changeApplierTarget, or syncCallback is a nullptr.

ArgumentOutOfRangeException

—or—

collisionResolutionPolicy is not a member of the CollisionConflictResolutionPolicy enumeration.

SyncIdFormatMismatchException
  • sourceChanges has some forgotten knowledge which is in a different format than that of destinationKnowledge

—or—

  • destinationForgottenKnowledge was given and has a different format than that of destinationKnowledge

This method detects concurrency conflicts that occur between the changes that are sent in sourceChanges and the corresponding items in the destination replica. It resolves any concurrency conflicts according to the policy specified by resolutionPolicy. When collision constraint conflicts are reported by the destination provider, this method resolves them according to the policy specified by collisionConflictResolutionPolicy. If no conflict resolution policy is set, this method notifies the application of a conflict, and the application specifies a conflict resolution action. If it is necessary, this method then calls methods on changeApplierTarget to save changes to the destination replica and to save unresolved conflicts.

The change applier helps manage the conflict log specified by conflictLogAccess, by resolving conflicts in the log and removing obsolete conflicts from the log. The change applier may also use the conflict log to store temporary conflicts that occur as a result of merging constraint conflicts. Any temporary conflicts added to the log will be removed before the synchronization session ends.

Show: