필터에 있고 지정된 정보에 포함되지 않는 항목을 식별하는 항목 ID의 목록을 가져옵니다.
네임스페이스: Microsoft.Synchronization
어셈블리: microsoft.synchronization.dll의 Microsoft.Synchronization
구문
‘선언
Function GetNewMoveInItems ( _
baseKnowledge As SyncKnowledge _
) As IEnumerator(Of SyncId)
‘사용 방법
Dim instance As IFilteredReplicaNotifyingChangeApplierTarget
Dim baseKnowledge As SyncKnowledge
Dim returnValue As IEnumerator(Of SyncId)
returnValue = instance.GetNewMoveInItems(baseKnowledge)
IEnumerator<SyncId> GetNewMoveInItems (
SyncKnowledge baseKnowledge
)
IEnumerator<SyncId^>^ GetNewMoveInItems (
SyncKnowledge^ baseKnowledge
)
IEnumerator<SyncId> GetNewMoveInItems (
SyncKnowledge baseKnowledge
)
function GetNewMoveInItems (
baseKnowledge : SyncKnowledge
) : IEnumerator<SyncId>
매개 변수
- baseKnowledge
반환된 항목 ID 목록은 필터에 있고 이 정보에 포함되지 않는 항목을 식별합니다.
반환 값
필터에 있고 baseKnowledge에 포함되지 않는 항목을 식별하는 항목 ID 목록입니다.
주의
이 메서드는 baseKnowledge에 지정된 정보가 기록된 후 필터에 포함된 항목을 확인하기 위해 변경 내용 적용자에서 사용합니다. 예를 들어 미디어 파일을 저장하는 복제본이 별점 3개 이상 파일의 데이터만 저장하도록 필터링된 경우를 가정해 봅니다. baseKnowledge가 기록되면 파일이 별점 2 등급으로 지정됩니다. 사용자는 파일 등급을 별점 4 등급으로 변경합니다. 그러면 파일이 필터에 포함되므로 이 메서드에서 반환되는 목록에 포함되어야 합니다.
예제
다음 예제에서는 메타데이터 저장소의 모든 항목을 열거합니다. 항목이 동기화에 사용된 필터에 있고, 필터와 관련된 항목의 이동 버전이 지정된 기본 정보에 포함되어 있지 않은 경우 새 포함 항목 목록에 항목이 추가됩니다.
Public Function GetNewMoveInItems(ByVal baseKnowledge As SyncKnowledge) As IEnumerator(Of SyncId) Implements IFilteredReplicaNotifyingChangeApplierTarget.GetNewMoveInItems
Dim newMoveInIdList As New List(Of SyncId)()
Dim allItems As IEnumerable(Of ItemMetadata) = _ContactStore.ContactReplicaMetadata.GetAllItems(False)
Dim mappedBaseKnowledge As SyncKnowledge = _ContactStore.ContactReplicaMetadata.GetKnowledge().MapRemoteKnowledgeToLocal(baseKnowledge)
For Each itemMeta As ItemMetadata In allItems
Dim filterChange As FilterChange = _ContactStore.GetTrackedFilterMetadata(itemMeta, _filterForSync)
If filterChange.IsMoveIn Then
If Not mappedBaseKnowledge.Contains(_ContactStore.ContactReplicaMetadata.ReplicaId, itemMeta.GlobalId, filterChange.MoveVersion) Then
newMoveInIdList.Add(itemMeta.GlobalId)
End If
End If
Next
Return newMoveInIdList.GetEnumerator()
End Function
public IEnumerator<SyncId> GetNewMoveInItems(SyncKnowledge baseKnowledge)
{
List<SyncId> newMoveInIdList = new List<SyncId>();
IEnumerable<ItemMetadata> allItems = _ContactStore.ContactReplicaMetadata.GetAllItems(false);
SyncKnowledge mappedBaseKnowledge = _ContactStore.ContactReplicaMetadata.GetKnowledge().MapRemoteKnowledgeToLocal(baseKnowledge);
foreach (ItemMetadata itemMeta in allItems)
{
FilterChange filterChange = _ContactStore.GetTrackedFilterMetadata(itemMeta, _filterForSync);
if (filterChange.IsMoveIn)
{
if (!mappedBaseKnowledge.Contains(_ContactStore.ContactReplicaMetadata.ReplicaId, itemMeta.GlobalId, filterChange.MoveVersion))
{
newMoveInIdList.Add(itemMeta.GlobalId);
}
}
}
return newMoveInIdList.GetEnumerator();
}
참고 항목
참조
IFilteredReplicaNotifyingChangeApplierTarget 인터페이스
IFilteredReplicaNotifyingChangeApplierTarget 멤버
Microsoft.Synchronization 네임스페이스