ChangeApplicationServices Class

Represents a change application service object that can be used to perform change application actions individually.

Inheritance Hierarchy

System.Object
  Microsoft.Synchronization.ChangeApplicationServices

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

Syntax

'Declaration
Public Class ChangeApplicationServices
'Usage
Dim instance As ChangeApplicationServices
public class ChangeApplicationServices
public ref class ChangeApplicationServices
type ChangeApplicationServices =  class end
public class ChangeApplicationServices

The ChangeApplicationServices type exposes the following members.

Constructors

  Name Description
Public method ChangeApplicationServices Initializes a new instance of the ChangeApplicationServices class by using the specified ID format schema, conflict resolution policy, and synchronization session context information.

Top

Methods

  Name Description
Public method BeginChangeApplication Begins processing of a set of changes.
Public method BeginFullEnumerationChangeApplication Begins processing of a set of changes as part of a recovery synchronization.
Public method EndChangeApplication Ends processing of a set of changes.
Public method EndFullEnumerationChangeApplication Ends processing of a set of changes as part of a recovery synchronization.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetChangeApplicationContext Gets an object that represents the current change to be applied.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method GetUpdatedDestinationKnowledge Gets the updated destination knowledge that contains all of the changes that have been applied so far.
Protected method MemberwiseClone (Inherited from Object.)
Public method ReportChangeUnitChangeApplied Notifies the change application service that a change unit change has been successfully applied to the destination replica.
Public method ReportItemChangeApplied Notifies the change application service that an item change has been successfully applied to the destination replica.
Public method ReportRecoverableErrorOnChangeUnitChange Notifies the change application service that a recoverable error occurred when the destination provider tried to apply the change unit change.
Public method ReportRecoverableErrorOnItemChange Notifies the change application service that a recoverable error occurred when the destination provider tried to apply the item change.
Public method SetDestinationKnowledge Sets the destination knowledge that is used to calculate the updated destination knowledge as changes are applied.
Public method ToString (Inherited from Object.)

Top

Remarks

The ChangeApplicationServices object is part of the change application service of Sync Framework, which is used when a provider requires greater flexibility than that allowed by the standard change applier provided by Sync Framework. For example, a provider must defer the application of certain changes to the end of the synchronization session. The standard change applier does not allow this. The provider can use the change application service to handle conflict detection and knowledge calculation while still retaining the ability to defer changes as necessary.

For a provider that does not need the extra flexibility of the change application service, it can be simpler to use a standard change applier, such as NotifyingChangeApplier.

The change application service is typically used by a destination provider to help implement its ProcessChangeBatch and ProcessFullEnumerationChangeBatch methods. To use the change application service, perform the following steps:

  1. Create and initialize a new ChangeApplicationServices object.

  2. Start processing of a change batch by calling BeginChangeApplication, or start processing of a recovery synchronization change batch by calling BeginFullEnumerationChangeApplication. Typically this method is called one time for each change batch to be processed.

  3. Enumerate the changes in the change batch. Call GetChangeApplicationContext one time for each change and use the returned ChangeApplicationContext object to apply the change.

  4. Report changes as successfully applied by calling ReportItemChangeApplied or ReportChangeUnitChangeApplied. Report changes as failing to apply by calling ReportRecoverableErrorOnItemChange or ReportRecoverableErrorOnChangeUnitChange.

  5. Call GetUpdatedDestinationKnowledge at any time to retrieve the updated destination knowledge that contains all of the changes applied so far.

  6. End processing of a change batch by calling EndChangeApplication, or end processing of a recovery synchronization change batch by calling EndFullEnumerationChangeApplication. Save the updated destination knowledge and destination forgotten knowledge objects that are returned by this method.

  7. Repeat steps 3 through 7 for each change batch received by the destination provider.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Synchronization Namespace