internal async Task EnsureStores(IObjectStore parentStore, LocalRecordStoreTable recordStoreTable)
        {
            m_root = await parentStore.CreateChildStoreAsync(m_record.ID);

            IObjectStore child;

            child = await m_root.CreateChildStoreAsync("Data");

            LocalItemStore itemStore = new LocalItemStore(child, (recordStoreTable != null) ? recordStoreTable.ItemCache : null);

            child = await m_root.CreateChildStoreAsync("Changes");

            RecordItemChangeTable changeTable = new RecordItemChangeTable(child, null);

            m_dataStore = new SynchronizedStore(m_record, itemStore, changeTable);

            child = await m_root.CreateChildStoreAsync("Metadata");

            m_metadataStore = new LocalStore(child);

            child = await m_root.CreateChildStoreAsync("Blobs");

            m_blobs = new LocalStore(child);

            m_synchronizedTypes = new SynchronizedTypeManager(this);
        }
예제 #2
0
        internal LocalStore(IObjectStore parentStore, string childName)
        {
            Task <IObjectStore> task = Task.Run(() => parentStore.CreateChildStoreAsync(childName));

            task.Wait();
            m_objectStore = task.Result;
        }
예제 #3
0
 internal LocalStore(IObjectStore parentStore, string childName)
 {
     Task<IObjectStore> task = Task.Run(() => parentStore.CreateChildStoreAsync(childName));
     task.Wait();
     m_objectStore = task.Result;
 }
예제 #4
0
        internal async Task EnsureFolders(IObjectStore parentStore, LocalRecordStoreTable recordStoreTable)
        {
            IObjectStore root = await parentStore.CreateChildStoreAsync(m_record.ID);

            IObjectStore child;

            child = await root.CreateChildStoreAsync("Data");

            var itemStore = new LocalItemStore(child, (recordStoreTable != null) ? recordStoreTable.ItemCache : null);
            m_dataStore = new SynchronizedStore(m_record, itemStore);

            child = await root.CreateChildStoreAsync("Metadata");
            m_metadataStore = new LocalStore(child);

            child = await root.CreateChildStoreAsync("Blobs");
            m_blobs = new LocalStore(child);
        }
        public async Task <IObjectStore> CreateChildStoreAsync(string childName)
        {
            var childStore = await m_inner.CreateChildStoreAsync(childName);

            return(new EncryptedObjectStore(childStore, m_cryptographer, m_encryptionKey));
        }
        internal async Task EnsureStores(IObjectStore parentStore, LocalRecordStoreTable recordStoreTable)
        {
            m_root = await parentStore.CreateChildStoreAsync(m_record.ID);

            IObjectStore child;

            child = await m_root.CreateChildStoreAsync("Data");
            LocalItemStore itemStore = new LocalItemStore(child, (recordStoreTable != null) ? recordStoreTable.ItemCache : null);

            child = await m_root.CreateChildStoreAsync("Changes");
            RecordItemChangeTable changeTable = new RecordItemChangeTable(child, null);

            m_dataStore = new SynchronizedStore(m_record, itemStore, changeTable);

            child = await m_root.CreateChildStoreAsync("Metadata");
            m_metadataStore = new LocalStore(child);

            child = await m_root.CreateChildStoreAsync("Blobs");
            m_blobs = new LocalStore(child);

            m_synchronizedTypes = new SynchronizedTypeManager(this);
        }
 public async Task <IObjectStore> CreateChildStoreAsync(string childName)
 {
     return(await m_inner.CreateChildStoreAsync(childName));
 }