Export (0) Print
Expand All

FullEnumerationContext Class

Sync Framework 2.0

The synchronization session context that is passed to an FullEnumerationSimpleSyncProvider object.

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

public class FullEnumerationContext : ItemEnumerationContext
public class FullEnumerationContext extends ItemEnumerationContext
public class FullEnumerationContext extends ItemEnumerationContext

The context can be used by the provider in circumstances when the provider is not going to return an enumeration of items or where the provider needs to modify the enumeration behavior of the Sync Framework runtime.

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

System.Object
   Microsoft.Synchronization.SimpleProviders.ItemEnumerationContext
    Microsoft.Synchronization.SimpleProviders.FullEnumerationContext

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft