FilterRequestCallback Delegate

Represents the method that mediates filter negotiation between a destination provider and a source provider.

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

public delegate bool FilterRequestCallback(
	Object filter,
	FilteringType filterType
)

Parameters

filter
Type: System.Object
The filter that is specified by the destination provider. This filter is passed to the source provider to be used during change enumeration.
filterType
Type: Microsoft.Synchronization.FilteringType
The type of information that is included in a change batch during filtered synchronization.

Return Value

Type: System.Boolean
true when the filter specified by filter is supported by the source provider. Otherwise, false.

FilterRequestCallback is implemented by Sync Framework.

Filter negotiation is achieved by using the following steps:

  1. Before the source provider begins enumerating changes, Sync Framework starts filter negotiation by calling the SpecifyFilter method of the IRequestFilteredSync interface that the destination provider implemented.

  2. During processing of SpecifyFilter, the destination provider passes filters to the FilterRequestCallback that is specified by Sync Framework.

  3. During processing of FilterRequestCallback, Sync Frameworkk calls the TryAddFilter(Object) method of the ISupportFilteredSync interface implemented by the source provider. If the source provider does not support the requested filter, the destination provider can continue to request filters until it finds one that is supported.

When a filter has been successfully negotiated, the source provider uses it to determine which items to include during change enumeration.

Show: