IFilterTrackingNotifyingChangeApplierTarget.SaveKnowledgeWithFilterForgottenKnowledge メソッド

派生クラスでオーバーライドされると、ナレッジ、忘れられたナレッジ、およびフィルターの忘れられたナレッジ オブジェクトの一覧を保存します。

名前空間: Microsoft.Synchronization
アセンブリ: Microsoft.Synchronization (microsoft.synchronization.dll 内)

構文

'宣言
Sub SaveKnowledgeWithFilterForgottenKnowledge ( _
    syncKnowledge As SyncKnowledge, _
    forgottenKnowledge As ForgottenKnowledge, _
    filterForgottenKnowledge As ForgottenKnowledge() _
)
'使用
Dim instance As IFilterTrackingNotifyingChangeApplierTarget
Dim syncKnowledge As SyncKnowledge
Dim forgottenKnowledge As ForgottenKnowledge
Dim filterForgottenKnowledge As ForgottenKnowledge()

instance.SaveKnowledgeWithFilterForgottenKnowledge(syncKnowledge, forgottenKnowledge, filterForgottenKnowledge)
void SaveKnowledgeWithFilterForgottenKnowledge (
    SyncKnowledge syncKnowledge,
    ForgottenKnowledge forgottenKnowledge,
    ForgottenKnowledge[] filterForgottenKnowledge
)
void SaveKnowledgeWithFilterForgottenKnowledge (
    SyncKnowledge^ syncKnowledge, 
    ForgottenKnowledge^ forgottenKnowledge, 
    array<ForgottenKnowledge^>^ filterForgottenKnowledge
)
void SaveKnowledgeWithFilterForgottenKnowledge (
    SyncKnowledge syncKnowledge, 
    ForgottenKnowledge forgottenKnowledge, 
    ForgottenKnowledge[] filterForgottenKnowledge
)
function SaveKnowledgeWithFilterForgottenKnowledge (
    syncKnowledge : SyncKnowledge, 
    forgottenKnowledge : ForgottenKnowledge, 
    filterForgottenKnowledge : ForgottenKnowledge[]
)

パラメーター

  • syncKnowledge
    保存する更新されたナレッジです。
  • forgottenKnowledge
    保存する忘れられたナレッジです。このパラメーターが NULL 参照 (Visual Basic では Nothing) です。 の場合、既存の忘れられたナレッジは変更されません。置き換えも不要です。
  • filterForgottenKnowledge
    保存対象である、フィルターの忘れられたナレッジのオブジェクト一覧です。この一覧は、フィルター キー マップのフィルター キーで順序付けられています。

解説

syncKnowledge は、スコープの既存ナレッジを置き換える必要があります。forgottenKnowledge が NULL 参照 (Visual Basic では Nothing) です。 の場合は、forgottenKnowledge はスコープの忘れられたナレッジの置き換えも行う必要があります。それ以外の場合は、既存の忘れられたナレッジを保持する必要があります。filterForgottenKnowledge に含まれているフィルターの忘れられたナレッジのオブジェクトも、フィルターの忘れられたナレッジの対応するオブジェクトをレプリカで置き換える必要があります。Sync Framework は、各変更バッチのすべての変更が処理された後、変更バッチごとにこのメソッドを 1 回呼び出します。

次の例では、フィルターの忘れられたナレッジ オブジェクトの一覧をレプリカに保存してから StoreKnowledgeForScope を呼び出して、更新されたナレッジおよび忘れられたナレッジを保存します。

Public Sub SaveKnowledgeWithFilterForgottenKnowledge(ByVal syncKnowledge As SyncKnowledge, ByVal forgottenKnowledge As ForgottenKnowledge, ByVal filterForgottenKnowledge As ForgottenKnowledge()) Implements IFilterTrackingNotifyingChangeApplierTarget.SaveKnowledgeWithFilterForgottenKnowledge
    ' First update the list of filter forgotten knowledge objects.
    For iFilter As Integer = 0 To filterForgottenKnowledge.Length - 1
        DirectCast(_filterKeyMap(iFilter), AddressFilter).FilterForgottenKnowledge = filterForgottenKnowledge(iFilter)
    Next

    ' Update the list of filters that are stored in the custom replica metadata.
    AddressFilter.StoreFiltersInReplicaMetadata(_ContactStore.ContactReplicaMetadata, _ContactStore.TrackedFilters)

    ' Store the remaining knowledge objects.
    StoreKnowledgeForScope(syncKnowledge, forgottenKnowledge)
End Sub
public void SaveKnowledgeWithFilterForgottenKnowledge(SyncKnowledge syncKnowledge, ForgottenKnowledge forgottenKnowledge, ForgottenKnowledge[] filterForgottenKnowledge)
{
    // First update the list of filter forgotten knowledge objects.
    for (int iFilter = 0; iFilter < filterForgottenKnowledge.Length; iFilter++)
    {
        ((AddressFilter)_filterKeyMap[iFilter]).FilterForgottenKnowledge = filterForgottenKnowledge[iFilter];
    }

    // Update the list of filters that are stored in the custom replica metadata.
    AddressFilter.StoreFiltersInReplicaMetadata(_ContactStore.ContactReplicaMetadata, _ContactStore.TrackedFilters);

    // Store the remaining knowledge objects.
    StoreKnowledgeForScope(syncKnowledge, forgottenKnowledge);
}

参照

リファレンス

IFilterTrackingNotifyingChangeApplierTarget インターフェイス
IFilterTrackingNotifyingChangeApplierTarget メンバー
Microsoft.Synchronization 名前空間