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)

Syntax

'Declaration
Public Delegate Function FilterRequestCallback ( _
    filter As Object, _
    filterType As FilteringType _
) As Boolean
'Usage
Dim instance As New FilterRequestCallback(AddressOf HandlerMethod)
public delegate bool FilterRequestCallback (
    Object filter,
    FilteringType filterType
)
public delegate bool FilterRequestCallback (
    Object^ filter, 
    FilteringType filterType
)
/** @delegate */
public delegate boolean FilterRequestCallback (
    Object filter, 
    FilteringType filterType
)
JScript supports the use of delegates, but not the declaration of new ones.

Parameters

  • filter
    The filter that is specified by the destination provider. This filter is passed to the source provider to be used during change enumeration.
  • filterType

Return Value

True when the filter specified by filter is supported by the source provider. Otherwise, false.

Remarks

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 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.

See Also

Reference

Microsoft.Synchronization Namespace