IFilterTrackingNotifyingChangeApplierTarget.GetFilterForgottenKnowledge 方法

在派生类中重写时,获取副本的指定筛选器遗忘知识。

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

语法

声明
Function GetFilterForgottenKnowledge ( _
    filterIndex As UInteger _
) As ForgottenKnowledge
用法
Dim instance As IFilterTrackingNotifyingChangeApplierTarget
Dim filterIndex As UInteger
Dim returnValue As ForgottenKnowledge

returnValue = instance.GetFilterForgottenKnowledge(filterIndex)
ForgottenKnowledge GetFilterForgottenKnowledge (
    uint filterIndex
)
ForgottenKnowledge^ GetFilterForgottenKnowledge (
    unsigned int filterIndex
)
ForgottenKnowledge GetFilterForgottenKnowledge (
    UInt32 filterIndex
)
function GetFilterForgottenKnowledge (
    filterIndex : uint
) : ForgottenKnowledge

参数

  • filterIndex
    与要查找的筛选器遗忘知识相关联的筛选器的筛选键。

返回值

与 filterIndex 标识的筛选器相关联的筛选器遗忘知识。如果筛选器遗忘知识与副本的遗忘知识相同,则此值可以为 null 引用(在 Visual Basic 中为 Nothing)。

备注

如果筛选器中存储的元数据指示该筛选器中是否包含某一项,以及某一项是否曾在该筛选器中但已移出,则副本可跟踪该筛选器。如果筛选器已删除对筛选器中是否曾包含但已移出某项进行跟踪的元数据,或者如果副本首次与筛选副本同步时不跟踪筛选器,而是在以后开始跟踪筛选器,则该副本还可以包含筛选器的筛选器遗忘知识。

示例

下面的示例使用 FilterKeyMap 对象检索所请求的筛选器遗忘知识。

Public Function GetFilterForgottenKnowledge(ByVal filterIndex As UInteger) As ForgottenKnowledge Implements IFilteredReplicaNotifyingChangeApplierTarget.GetFilterForgottenKnowledge
    If filterIndex < _filterKeyMap.Count Then
        Return DirectCast(_filterKeyMap(CInt(filterIndex)), AddressFilter).FilterForgottenKnowledge
    Else
        Throw New ArgumentOutOfRangeException("GetFilterForgottenKnowledge received and out-of-range index.")
    End If
End Function
public ForgottenKnowledge GetFilterForgottenKnowledge(uint filterIndex)
{
    if (filterIndex < _filterKeyMap.Count)
    {
        return ((AddressFilter)_filterKeyMap[(int)filterIndex]).FilterForgottenKnowledge;
    }
    else
    {
        throw new ArgumentOutOfRangeException("GetFilterForgottenKnowledge received and out-of-range index.");
    }
}

请参阅

参考

IFilterTrackingNotifyingChangeApplierTarget 接口
IFilterTrackingNotifyingChangeApplierTarget 成员
Microsoft.Synchronization 命名空间