コード例 #1
0
 public OperationBatch(IMobileServiceSyncHandler syncHandler, IMobileServiceLocalStore store, MobileServiceSyncContext context)
 {
     this.OtherErrors = new List <Exception>();
     this.SyncHandler = syncHandler;
     this.Store       = store;
     this.context     = context;
 }
コード例 #2
0
        public async Task InitializeAsync(IMobileServiceLocalStore store, IMobileServiceSyncHandler handler, StoreTrackingOptions trackingOptions)
        {
            if (store == null)
            {
                throw new ArgumentNullException("store");
            }
            handler = handler ?? new MobileServiceSyncHandler();

            this.initializeTask = new TaskCompletionSource <object>();

            using (await this.storeQueueLock.WriterLockAsync())
            {
                this.Handler = handler;
                this.Store   = store;
                this.storeTrackingOptions = trackingOptions;

                this.syncQueue = new ActionBlock();
                await this.Store.InitializeAsync();

                this.opQueue = await OperationQueue.LoadAsync(store);

                this.settings             = new MobileServiceSyncSettingsManager(store);
                this.localOperationsStore = StoreChangeTrackerFactory.CreateTrackedStore(store, StoreOperationSource.Local, trackingOptions, this.client.EventManager, this.settings);

                this.initializeTask.SetResult(null);
            }
        }
コード例 #3
0
 public OperationBatch(IMobileServiceSyncHandler syncHandler, IMobileServiceLocalStore store, MobileServiceSyncContext context)
 {
     this.OtherErrors = new List<Exception>();
     this.SyncHandler = syncHandler;
     this.Store = store;
     this.context = context;
 }
コード例 #4
0
 public PushAction(OperationQueue operationQueue,
                   IMobileServiceLocalStore store,
                   MobileServiceTableKind tableKind,
                   IEnumerable<string> tableNames,
                   IMobileServiceSyncHandler syncHandler,
                   MobileServiceClient client,
                   MobileServiceSyncContext context,
                   CancellationToken cancellationToken)
     : base(operationQueue, store, cancellationToken)
 {
     this.tableKind = tableKind;
     this.tableNames = tableNames;
     this.client = client;
     this.syncHandler = syncHandler;
     this.context = context;
 }
コード例 #5
0
 public PushAction(OperationQueue operationQueue,
                   IMobileServiceLocalStore store,
                   MobileServiceTableKind tableKind,
                   IEnumerable <string> tableNames,
                   IMobileServiceSyncHandler syncHandler,
                   MobileServiceClient client,
                   MobileServiceSyncContext context,
                   CancellationToken cancellationToken)
     : base(operationQueue, store, cancellationToken)
 {
     this.tableKind   = tableKind;
     this.tableNames  = tableNames;
     this.client      = client;
     this.syncHandler = syncHandler;
     this.context     = context;
 }
コード例 #6
0
        public async Task InitializeAsync(IMobileServiceLocalStore store, IMobileServiceSyncHandler handler)
        {
            if (store == null)
            {
                throw new ArgumentNullException("store");
            }
            handler = handler ?? new MobileServiceSyncHandler();

            this.initializeTask = new TaskCompletionSource<object>();

            using (await this.storeQueueLock.WriterLockAsync())
            {
                this.Handler = handler;
                this.Store = store;

                this.syncQueue = new ActionBlock();
                await this.Store.InitializeAsync();
                this.opQueue = await OperationQueue.LoadAsync(store);
                this.settings = new MobileServiceSyncSettingsManager(store);
                this.initializeTask.SetResult(null);
            }
        }
コード例 #7
0
        public async Task InitializeAsync(IMobileServiceLocalStore store, IMobileServiceSyncHandler handler)
        {
            if (store == null)
            {
                throw new ArgumentNullException("store");
            }
            handler = handler ?? new MobileServiceSyncHandler();

            this.initializeTask = new TaskCompletionSource <object>();

            using (await this.storeQueueLock.WriterLockAsync())
            {
                this.Handler = handler;
                this.Store   = store;

                this.syncQueue = new ActionBlock();
                await this.Store.InitializeAsync();

                this.opQueue = await OperationQueue.LoadAsync(store);

                this.settings = new MobileServiceSyncSettingsManager(store);
                this.initializeTask.SetResult(null);
            }
        }
コード例 #8
0
        public async Task InitializeAsync(IMobileServiceLocalStore store, IMobileServiceSyncHandler handler, StoreTrackingOptions trackingOptions)
        {
            if (store == null)
            {
                throw new ArgumentNullException("store");
            }
            handler = handler ?? new MobileServiceSyncHandler();

            this.initializeTask = new TaskCompletionSource<object>();

            using (await this.storeQueueLock.WriterLockAsync())
            {
                this.Handler = handler;
                this.Store = store;
                this.storeTrackingOptions = trackingOptions;

                this.syncQueue = new ActionBlock();
                await this.Store.InitializeAsync();
                this.opQueue = await OperationQueue.LoadAsync(store);
                this.settings = new MobileServiceSyncSettingsManager(store);
                this.localOperationsStore = StoreChangeTrackerFactory.CreateTrackedStore(store, StoreOperationSource.Local, trackingOptions, this.client.EventManager, this.settings);
                
                this.initializeTask.SetResult(null);
            }
        }
コード例 #9
0
 public Task InitializeAsync(IMobileServiceLocalStore store, IMobileServiceSyncHandler handler)
 {
     return InitializeAsync(store, handler, StoreTrackingOptions.None);
 }
コード例 #10
0
 public Task InitializeAsync(IMobileServiceLocalStore store, IMobileServiceSyncHandler handler)
 {
     return(InitializeAsync(store, handler, StoreTrackingOptions.None));
 }