ChangeApplicationServices.GetChangeApplicationContext Method
Gets an object that represents the current change to be applied.
Namespace: Microsoft.Synchronization
Assembly: Microsoft.Synchronization (in microsoft.synchronization.dll)
Syntax
'Declaration
Public Function GetChangeApplicationContext ( _
sourceChange As ItemChange, _
destinationVersion As ItemChange _
) As ChangeApplicationContext
'Usage
Dim instance As ChangeApplicationServices
Dim sourceChange As ItemChange
Dim destinationVersion As ItemChange
Dim returnValue As ChangeApplicationContext
returnValue = instance.GetChangeApplicationContext(sourceChange, destinationVersion)
public ChangeApplicationContext GetChangeApplicationContext (
ItemChange sourceChange,
ItemChange destinationVersion
)
public:
ChangeApplicationContext^ GetChangeApplicationContext (
ItemChange^ sourceChange,
ItemChange^ destinationVersion
)
public ChangeApplicationContext GetChangeApplicationContext (
ItemChange sourceChange,
ItemChange destinationVersion
)
public function GetChangeApplicationContext (
sourceChange : ItemChange,
destinationVersion : ItemChange
) : ChangeApplicationContext
Parameters
- sourceChange
A change received from the source provider. Can be a null reference (Nothing in Visual Basic) when the change batch is part of a recovery synchronization.
- destinationVersion
The version of sourceChange in the destination replica. Can be a null reference (Nothing in Visual Basic) when the destination replica does not have a version for sourceChange.
Return Value
Returns an object that can be used to process the change.
Exceptions
Exception type | Condition |
---|---|
A ChangeApplicationContext object is already active. The active ChangeApplicationContext object must be processed until its ChangeApplicationAction property is set to Finished before another change can be processed. |
|
sourceChange does not contain made-with knowledge. |
|
The update version or creation version of sourceChange is not contained in its made-with knowledge. |
|
sourceChange and destinationVersion contain differing numbers of change units. |
|
The ID format schema of the specified knowledge object does not match the ID format schema specified when this object was initialized. |
|
Change application was not started or sourceChange has already been reported as successfully applied. |
|
sourceChange or destinationVersion contains change units and the other does not. |
|
sourceChange and destinationVersion refer to different item IDs. |
Remarks
This method is typically called by the destination provider one time for each change that is sent from the source provider. The ChangeApplicationContext object that is returned can be used to perform conflict detection, conflict resolution, and to determine how the destination provider should apply the change specified by sourceChange.
See Also
Reference
ChangeApplicationServices Class
ChangeApplicationServices Members
Microsoft.Synchronization Namespace