internal LocalRecordStoreTable(IObjectStore root)
 {
     m_root            = root;
     m_storageLock     = new CrossThreadLock(false);
     m_itemCache       = new LRUCache <string, object>(0);
     m_recordStores    = new Dictionary <string, LocalRecordStore>();
     m_commitScheduler = new RecordItemCommitScheduler(this);
 }
コード例 #2
0
 internal LocalRecordStoreTable(IObjectStore root)
 {
     m_root = root;
     m_storageLock = new CrossThreadLock(false);
     m_itemCache = new LRUCache<string, object>(0);
     m_recordStores = new Dictionary<string, LocalRecordStore>();
     m_commitScheduler = new RecordItemCommitScheduler(this);
 }
コード例 #3
0
 public static IAsyncOperation<CrossThreadLockScope> Enter(CrossThreadLock ctLock)
 {
     return AsyncInfo.Run(
         async cancelToken =>
         {
             await ctLock.WaitAsync();
             return new CrossThreadLockScope(ctLock);
         });
 }
        internal LocalItemStore(IObjectStore store, ICache <string, object> cache)
        {
            m_lock = new CrossThreadLock(false);

            if (cache != null)
            {
                m_objectStore = new CachingObjectStore(store, cache);
            }
            else
            {
                m_objectStore = store;
            }
        }
コード例 #5
0
        internal LocalItemStore(IObjectStore store, ICache<string, object> cache)
        {
            m_lock = new CrossThreadLock(false);

            if (cache != null)
            {
                m_objectStore = new CachingObjectStore(store, cache);
            }
            else
            {
                m_objectStore = store;
            }
        }
コード例 #6
0
        internal SynchronizedTypeManager(LocalRecordStore recordStore)
        {
            if (recordStore == null)
            {
                throw new ArgumentNullException("recordStore");
            }

            m_lock        = new CrossThreadLock(false);
            m_recordStore = recordStore;
            m_views       = new Dictionary <string, WeakReference <SynchronizedType> >();

            m_recordStore.Data.Changes.SynchronizedTypes = this;
            this.ImmediateCommitEnabled = true;
        }
コード例 #7
0
        internal SynchronizedTypeManager(LocalRecordStore recordStore)
        {
            if (recordStore == null)
            {
                throw new ArgumentNullException("recordStore");
            }
            
            m_lock = new CrossThreadLock(false);
            m_recordStore = recordStore;
            m_views = new Dictionary<string,WeakReference<SynchronizedType>>();

            m_recordStore.Data.Changes.SynchronizedTypes = this;
            this.ImmediateCommitEnabled = true;
        }
コード例 #8
0
 internal RecordItemChangeTable(IObjectStore changeStore, ICache <string, object> cache)
 {
     if (changeStore == null)
     {
         throw new ArgumentNullException("changeStore");
     }
     if (cache != null)
     {
         m_changeStore = new CachingObjectStore(changeStore, cache);
     }
     else
     {
         m_changeStore = changeStore;
     }
     m_lock = new CrossThreadLock(false);
 }
コード例 #9
0
 internal RecordItemChangeTable(IObjectStore changeStore, ICache<string, object> cache)
 {
     if (changeStore == null)
     {
         throw new ArgumentNullException("changeStore");
     }
     if (cache != null)
     {
         m_changeStore = new CachingObjectStore(changeStore, cache);
     }
     else
     {
         m_changeStore = changeStore;
     }
     m_lock = new CrossThreadLock(false);
 }
コード例 #10
0
 internal SynchronizedType(SynchronizedTypeManager typeManager, string typeID)
 {
     m_typeID = typeID;
     m_typeManager = typeManager;
     m_lock = new CrossThreadLock(false);
 }
コード例 #11
0
 private void Initialize(IRecord record, IObjectStore parentStore, LocalRecordStoreTable recordStoreTable)
 {
     m_record = record;
     m_metadataLock = new CrossThreadLock(false);
     Task.Run(() => EnsureStores(parentStore, recordStoreTable)).Wait();
 }
コード例 #12
0
 private CrossThreadLockScope(CrossThreadLock ctLock)
 {
     m_lock = ctLock;
 }
コード例 #13
0
 internal SynchronizedType(SynchronizedTypeManager typeManager, string typeID)
 {
     m_typeID      = typeID;
     m_typeManager = typeManager;
     m_lock        = new CrossThreadLock(false);
 }
 private void Initialize(IRecord record, IObjectStore parentStore, LocalRecordStoreTable recordStoreTable)
 {
     m_record       = record;
     m_metadataLock = new CrossThreadLock(false);
     Task.Run(() => EnsureStores(parentStore, recordStoreTable)).Wait();
 }