private StoreRepositoryImpl(IApiProvider apiProvider, ICacheProvider cache, ILocalStorageProvider localStorage, JsonMapper jsonMapper)
 {
     this.apiProvider  = apiProvider;
     this.cache        = cache;
     this.localStorage = localStorage;
     this.jsonMapper   = jsonMapper;
 }
Exemplo n.º 2
0
 public CounterSaver(ILocalStorageProvider storageProvider, string idsClear, string idsNew)
 {
     _storageProvider    = storageProvider;
     _idsClear           = idsClear;
     _idsNew             = idsNew;
     _notificationsNew   = new HashSet <string>(_storageProvider.LoadData <string[]>(_idsNew) ?? new string[] {});
     _notificationsClear = new HashSet <string>(_storageProvider.LoadData <string[]>(_idsClear) ?? new string[] { });
 }
Exemplo n.º 3
0
 public static AirplanesRepositoryImpl getInstance(ILocalStorageProvider localStorage, ICacheProvider cache, JsonMapper jsonMapper)
 {
     if (INSTANCE == null)
     {
         INSTANCE = new AirplanesRepositoryImpl(localStorage, cache, jsonMapper);
     }
     return(INSTANCE);
 }
 public static EnvironemtRepositoryImpl getInstance(ILocalStorageProvider localStorage, JsonMapper jsonMapper)
 {
     if (INSTANCE == null)
     {
         INSTANCE = new EnvironemtRepositoryImpl(localStorage, jsonMapper);
     }
     return(INSTANCE);
 }
 public static SessionsRepositoryImpl getInstance(ILocalStorageProvider localStorage, ICacheProvider cahce, JsonMapper jsonMapper)
 {
     if (INSTNCE == null)
     {
         INSTNCE = new SessionsRepositoryImpl(localStorage, cahce, jsonMapper);
     }
     return(INSTNCE);
 }
        public static IFileSyncContext InitializeExpressFileSyncContext(this IMobileServiceClient client, IMobileServiceLocalStore store, ILocalStorageProvider localStorage)
        {
            var metadataStore = new FileMetadataStore(store);
            var operationQueue = new FileOperationQueue(store);
            var triggerFactory = new DefaultFileSyncTriggerFactory(client, true);
            var filesClient = client.GetFilesClient();
            var syncHandler = new LocalStorageSyncHandler(localStorage, filesClient);

            return client.InitializeFileSyncContext(new MobileServiceExpressFileSyncContext(client, metadataStore, operationQueue, triggerFactory, syncHandler, filesClient, localStorage));
        }
Exemplo n.º 7
0
 private AirplanesRepositoryImpl(ILocalStorageProvider localStorage, ICacheProvider cache, JsonMapper jsonMapper)
 {
     this.localStorage = localStorage;
     this.cache        = cache;
     this.jsonMapper   = jsonMapper;
 }
 private EnvironemtRepositoryImpl(ILocalStorageProvider localStorage, JsonMapper jsonMapper)
 {
     this.localStorage = localStorage;
     this.jsonMapper   = jsonMapper;
 }
 public static StoreRepositoryImpl getInstance(IApiProvider apiProvider, ICacheProvider cache, ILocalStorageProvider localStorage, JsonMapper jsonMapper)
 {
     if (instance == null)
     {
         instance = new StoreRepositoryImpl(apiProvider, cache, localStorage, jsonMapper);
     }
     return(instance);
 }
Exemplo n.º 10
0
 public CounterManager(ILocalStorageProvider provider, string idsClear, string idsNew)
 {
     _saver = new CounterSaver(provider, idsClear, idsNew);
     _tree  = new NotificationTree(_saver.GetClearIds(true), _saver.GetClearIds(false));
 }
 public MobileServiceExpressFileSyncContext(IMobileServiceClient client, IFileMetadataStore metadataStore, IFileOperationQueue operationsQueue,
     IFileSyncTriggerFactory syncTriggerFactory, IFileSyncHandler syncHandler, IMobileServiceFilesClient filesClient, ILocalStorageProvider localStorage) 
     : base(client, metadataStore, operationsQueue, syncTriggerFactory, syncHandler, filesClient)
 {
     LocalStorage = localStorage;
 }
Exemplo n.º 12
0
 public static ICounterManager CreateManager(ILocalStorageProvider storage, string idsClear, string idsNew)
 {
     return(new CounterManager(storage, idsClear, idsNew));
 }
 public LocalStorageSyncHandler(ILocalStorageProvider localStorage, IMobileServiceFilesClient client)
 {
     this.localStorage = localStorage;
     this.client = client;
 }
 private SessionsRepositoryImpl(ILocalStorageProvider localStorage, ICacheProvider cahce, JsonMapper jsonMapper)
 {
     this.localStorage = localStorage;
     this.cahce        = cahce;
     this.jsonMapper   = jsonMapper;
 }