Sdílet prostřednictvím


ReplicaMetadata.GetFilteredLocalVersions Method

When overridden in a derived class, gets a filtered batch of changes that contains the versions of items and change units that are stored in this replica. These items and change units correspond to the items and change units referred to in a batch of changes that is sent from some other provider.

Namespace: Microsoft.Synchronization.MetadataStorage
Assembly: Microsoft.Synchronization.MetadataStorage (in microsoft.synchronization.metadatastorage.dll)

Syntax

'Declaration
Public MustOverride Function GetFilteredLocalVersions ( _
    sourceChanges As ChangeBatch, _
    filterCallback As ItemFilterCallback _
) As IEnumerable(Of ItemChange)
'Usage
Dim instance As ReplicaMetadata
Dim sourceChanges As ChangeBatch
Dim filterCallback As ItemFilterCallback
Dim returnValue As IEnumerable(Of ItemChange)

returnValue = instance.GetFilteredLocalVersions(sourceChanges, filterCallback)
public abstract IEnumerable<ItemChange> GetFilteredLocalVersions (
    ChangeBatch sourceChanges,
    ItemFilterCallback filterCallback
)
public:
virtual IEnumerable<ItemChange^>^ GetFilteredLocalVersions (
    ChangeBatch^ sourceChanges, 
    ItemFilterCallback^ filterCallback
) abstract
public abstract IEnumerable<ItemChange> GetFilteredLocalVersions (
    ChangeBatch sourceChanges, 
    ItemFilterCallback filterCallback
)
public abstract function GetFilteredLocalVersions (
    sourceChanges : ChangeBatch, 
    filterCallback : ItemFilterCallback
) : IEnumerable<ItemChange>

Parameters

  • sourceChanges
    The batch of changes sent from another provider that is about to be applied to the item store that is associated with this replica.
  • filterCallback
    The delegate that is called to determine whether the item should be added to the batch.

Return Value

A filtered batch of changes that contains the versions of items and change units that are stored in this replica that correspond to the items and change units referred to in a batch of changes that is sent from some other provider.

Remarks

This method helps a synchronization provider implement its ProcessChangeBatch method when the destination provider filters changes.

Change appliers use the versions in the batch of changes that are returned from this method for conflict detection.

The filterCallback delegate will be called before each item is added to a batch. If the delegate returns true, the item is added to the batch; otherwise, it is not added.

Notes to Implementers: The change batch that is returned from this method must contain one entry for every entry in sourceChanges, including change unit entries, except when filterCallback indicates that the entry should not be included. If an item exists in the item store and is included by the filter, its entry must contain its version information for this replica. If an item that is included by the filter does not exist, its version must be set to SyncVersion.UnknownVersion, and its ItemChange.ChangeKind property must be set to UnknownItem.

See Also

Reference

ReplicaMetadata Class
ReplicaMetadata Members
Microsoft.Synchronization.MetadataStorage Namespace