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);
        }
Exemplo n.º 2
0
 public RecordItemChangeManager(SynchronizedStore store, RecordItemChangeTable changeTable)
 {
     if (store == null)
     {
         throw new ArgumentNullException("store");
     }
     if (changeTable == null)
     {
         throw new ArgumentNullException("changeTable");
     }
     m_store            = store;
     m_changeTable      = changeTable;
     m_errorHandler     = new RecordItemCommitErrorHandler();
     m_workerController = new WorkerController();
 }
 public RecordItemChangeManager(SynchronizedStore store, RecordItemChangeTable changeTable)
 {
     if (store == null)
     {
         throw new ArgumentNullException("store");
     }
     if (changeTable == null)
     {
         throw new ArgumentNullException("changeTable");
     }
     m_store = store;
     m_changeTable = changeTable;
     m_errorHandler = new RecordItemCommitErrorHandler();
     m_workerController = new WorkerController();
 }
        internal SynchronizedStore(IRecord record, LocalItemStore localStore, RecordItemChangeTable changeTable)
        {
            if (record == null)
            {
                throw new ArgumentNullException("record");
            }
            if (localStore == null)
            {
                throw new ArgumentNullException("itemStore");
            }
            if (changeTable == null)
            {
                throw new ArgumentNullException("changeTable");
            }

            //m_record = record;
            SectionsToFetch = ItemSectionType.Standard;

            m_localStore = localStore;
            m_remoteStore = new RemoteItemStore(record);
            m_changeManager = new RecordItemChangeManager(this, changeTable);
            m_itemLocks = new RecordItemLockTable();
        }
Exemplo n.º 5
0
        internal SynchronizedStore(IRecord record, LocalItemStore localStore, RecordItemChangeTable changeTable)
        {
            if (record == null)
            {
                throw new ArgumentNullException("record");
            }
            if (localStore == null)
            {
                throw new ArgumentNullException("itemStore");
            }
            if (changeTable == null)
            {
                throw new ArgumentNullException("changeTable");
            }

            //m_record = record;
            SectionsToFetch = ItemSectionType.Standard;

            m_localStore    = localStore;
            m_remoteStore   = new RemoteItemStore(record);
            m_changeManager = new RecordItemChangeManager(this, changeTable);
            m_itemLocks     = new RecordItemLockTable();
        }