Share via


FullEnumerationContext.ReportItems Method

Reports items that were enumerated from the local replica.

Namespace: Microsoft.Synchronization.SimpleProviders
Assembly: Microsoft.Synchronization.SimpleProviders (in microsoft.synchronization.simpleproviders.dll)

Syntax

'Declaration
Public Sub ReportItems ( _
    items As IEnumerable(Of ItemFieldDictionary) _
)
'Usage
Dim instance As FullEnumerationContext
Dim items As IEnumerable(Of ItemFieldDictionary)

instance.ReportItems(items)
public void ReportItems (
    IEnumerable<ItemFieldDictionary> items
)
public:
void ReportItems (
    IEnumerable<ItemFieldDictionary^>^ items
)
public void ReportItems (
    IEnumerable<ItemFieldDictionary> items
)
public function ReportItems (
    items : IEnumerable<ItemFieldDictionary>
)

Parameters

Exceptions

Exception type Condition

SimpleProviderInvalidOperationException

SkipChangeDetection was called earlier in the session or a previous change detection failed.

Example

The following code example shows the FullEnumerationContext object being passed to the EnumerateItems method, and the ReportItems method being called on the context object. To view this code in the context of a complete application, see the "Sync101 using Simple Sync Provider" application that is available in the Sync Framework SDK and from Code Gallery.

public override void EnumerateItems(FullEnumerationContext context)
{
    List<ItemFieldDictionary> items = new List<ItemFieldDictionary>();
    foreach (ulong id in _store.Ids)
    {
        items.Add(_store.CreateItemFieldDictionary(id));
    }
    context.ReportItems(items);
}
Public Overrides Sub EnumerateItems(ByVal context As FullEnumerationContext)
    Dim items As New List(Of ItemFieldDictionary)()
    For Each id As ULong In _store.Ids
        items.Add(_store.CreateItemFieldDictionary(id))
    Next
    context.ReportItems(items)
End Sub

See Also

Reference

FullEnumerationContext Class
FullEnumerationContext Members
Microsoft.Synchronization.SimpleProviders Namespace