Share via


KnowledgeSyncProvider.GetSyncBatchParameters Method

When overridden in a derived class, gets the number of item changes that will be included in change batches, and the current knowledge for the synchronization scope.

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

Syntax

'Declaration
Public MustOverride Sub GetSyncBatchParameters ( _
    <OutAttribute> ByRef batchSize As UInteger, _
    <OutAttribute> ByRef knowledge As SyncKnowledge _
)
'Usage
Dim instance As KnowledgeSyncProvider
Dim batchSize As UInteger
Dim knowledge As SyncKnowledge

instance.GetSyncBatchParameters(batchSize, _
    knowledge)
public abstract void GetSyncBatchParameters(
    out uint batchSize,
    out SyncKnowledge knowledge
)
public:
virtual void GetSyncBatchParameters(
    [OutAttribute] unsigned int% batchSize, 
    [OutAttribute] SyncKnowledge^% knowledge
) abstract
abstract GetSyncBatchParameters : 
        batchSize:uint32 byref * 
        knowledge:SyncKnowledge byref -> unit 
public abstract function GetSyncBatchParameters(
    batchSize : uint, 
    knowledge : SyncKnowledge
)

Parameters

  • batchSize
    Type: System.UInt32%
    The number of item changes that will be included in change batches returned by this object.

Remarks

Typically, Sync Framework calls this method after it calls BeginSession and before it calls EndSession. However, the ConsumeFeed and LoadFrom methods both call this method before they call BeginSession.

Examples

The following example sets a batch size of 10 and returns the current knowledge from the metadata store.

public override void GetSyncBatchParameters(out uint batchSize, out SyncKnowledge knowledge)
{
    // Set a batch size of 10.
    batchSize = 10;

    // Return the current knowledge of the replica.
    knowledge = _itemStore.ContactReplicaMetadata.GetKnowledge();
}

See Also

Reference

KnowledgeSyncProvider Class

Microsoft.Synchronization Namespace