Exemplo n.º 1
0
 /// <summary>
 /// Private constructor (build instances using the builder)
 /// </summary>
 private SyncContext(Uri source,
                     ResourceSyncDocument.RequestDescriptor resourceSyncDocumentRequestDescriptor,
                     Func <ResourceSet, IList <Location>, IsOfInterest> isInterestingSet,
                     Func <ResourceSet, Location, IsOfInterest> isInterestingChange,
                     Action <ResourceSet, Location, ResourceValue> saveResource,
                     SyncScopes syncScope         = SyncScopes.LocationOnly,
                     SyncDirections syncDirection = SyncDirections.SyncClientFromServer,
                     IProvideResources provider   = null)
 {
     Source = source;
     ResourceSyncDocumentRequestDescriptor = resourceSyncDocumentRequestDescriptor;
     IsInterestingSet    = isInterestingSet;
     IsInterestingChange = isInterestingChange;
     SaveResource        = saveResource;
     SyncScope           = syncScope;
     SyncDirection       = syncDirection;
     Provider            = provider;
 }
 public RequestDescriptor(Uri location, OperationCapabilities capability, SyncScopes syncScope)
 {
     Location   = location;
     Capability = capability;
     SyncScope  = syncScope;
 }
Exemplo n.º 3
0
 public Builder SetSyncScope(SyncScopes syncScope)
 {
     _syncScope = syncScope;
     return(this);
 }
Exemplo n.º 4
0
 public static ResourceSyncDocument.RequestDescriptor ToSyncRequest(this Uri uri,
                                                                    OperationCapabilities cap = OperationCapabilities.description,
                                                                    SyncScopes syncScope      = SyncScopes.LocationOnly)
 {
     return(new ResourceSyncDocument.RequestDescriptor(uri, cap, syncScope));
 }