GetSyncBatchParameters 方法

在派生类中重写时,获取要包含在变更批中的项变更数,以及同步作用域的当前知识。

命名空间:  Microsoft.Synchronization
程序集:  Microsoft.Synchronization(在 Microsoft.Synchronization.dll 中)

语法

声明
Public MustOverride Sub GetSyncBatchParameters ( _
    <OutAttribute> ByRef batchSize As UInteger, _
    <OutAttribute> ByRef knowledge As SyncKnowledge _
)
用法
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
)

参数

注释

通常,Sync Framework 在调用 BeginSession 之后和在调用 EndSession 之前调用此方法。但是,ConsumeFeedLoadFrom 方法都先调用此方法,再调用 BeginSession

示例

以下示例将批大小设置为 10,并从元数据存储区中返回当前知识。

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();
}

请参阅

参考

KnowledgeSyncProvider类

KnowledgeSyncProvider 成员

Microsoft.Synchronization 命名空间