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 ReplicaMetadata..::..ItemFilterCallback _
) As IEnumerable(Of ItemChange)
'Usage
Dim instance As ReplicaMetadata
Dim sourceChanges As ChangeBatch
Dim filterCallback As ReplicaMetadata..::..ItemFilterCallback
Dim returnValue As IEnumerable(Of ItemChange)
returnValue = instance.GetFilteredLocalVersions(sourceChanges, _
filterCallback)
public abstract IEnumerable<ItemChange> GetFilteredLocalVersions(
ChangeBatch sourceChanges,
ReplicaMetadata..::..ItemFilterCallback filterCallback
)
public:
virtual IEnumerable<ItemChange^>^ GetFilteredLocalVersions(
ChangeBatch^ sourceChanges,
ReplicaMetadata..::..ItemFilterCallback^ filterCallback
) abstract
abstract GetFilteredLocalVersions :
sourceChanges:ChangeBatch *
filterCallback:ReplicaMetadata..::..ItemFilterCallback -> IEnumerable<ItemChange>
public abstract function GetFilteredLocalVersions(
sourceChanges : ChangeBatch,
filterCallback : ReplicaMetadata..::..ItemFilterCallback
) : IEnumerable<ItemChange>
Parameters
- sourceChanges
Type: Microsoft.Synchronization.ChangeBatch
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
Type: Microsoft.Synchronization.MetadataStorage.ReplicaMetadata.ItemFilterCallback
The delegate that is called to determine whether the item should be added to the batch.
Return Value
Type: System.Collections.Generic.IEnumerable<ItemChange>
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.