Partilhar via


Método IFilterTrackingNotifyingChangeApplierTarget.SaveKnowledgeWithFilterForgottenKnowledge

Quando substituído em uma classe derivada, salva o conhecimento, o conhecimento esquecido e uma lista de objetos de conhecimento esquecido de filtro.

Namespace: Microsoft.Synchronization
Assembly: Microsoft.Synchronization (em microsoft.synchronization.dll)

Sintaxe

'Declaração
Sub SaveKnowledgeWithFilterForgottenKnowledge ( _
    syncKnowledge As SyncKnowledge, _
    forgottenKnowledge As ForgottenKnowledge, _
    filterForgottenKnowledge As ForgottenKnowledge() _
)
'Uso
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[]
)

Parâmetros

  • syncKnowledge
    O conhecimento atualizado a ser salvo.
  • forgottenKnowledge
    O conhecimento esquecido a ser salvo. Se esse parâmetro for referência nula (Nothing no Visual Basic), o conhecimento esquecido existente permanecerá inalterado e não será substituído.
  • filterForgottenKnowledge
    Uma lista de objetos de conhecimento esquecido de filtro a ser salva. Essa lista é solicitada pelas chaves de filtro no mapa de chave de filtro.

Comentários

syncKnowledge deve substituir o conhecimento existente para o escopo. Se forgottenKnowledge não for referência nula (Nothing no Visual Basic), forgottenKnowledge também deverá substituir o conhecimento esquecido para o escopo; caso contrário, o conhecimento esquecido existente deverá ser mantido. Os objetos de conhecimento esquecido de filtro que são contidos em filterForgottenKnowledge também devem substituir os objetos de conhecimento esquecido de filtro correspondentes da réplica. O Sync Framework chama esse método uma vez por lote de alterações depois que todas as alterações no lote são processadas.

Exemplo

O exemplo a seguir salva a lista de objetos de conhecimento esquecido de filtro e chama StoreKnowledgeForScope para salvar o conhecimento atualizado e o esquecido.

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

Consulte também

Referência

Interface IFilterTrackingNotifyingChangeApplierTarget
Membros IFilterTrackingNotifyingChangeApplierTarget
Namespace Microsoft.Synchronization