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
 public static IAsyncOperation <CrossThreadLockScope> Enter(CrossThreadLock ctLock)
 {
     return(AsyncInfo.Run(
                async cancelToken =>
     {
         await ctLock.WaitAsync();
         return new CrossThreadLockScope(ctLock);
     }));
 }
 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;
            }
        }
        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;
        }
 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);
 }
コード例 #7
0
 private CrossThreadLockScope(CrossThreadLock ctLock)
 {
     m_lock = ctLock;
 }
 internal SynchronizedType(SynchronizedTypeManager typeManager, string typeID)
 {
     m_typeID = typeID;
     m_typeManager = typeManager;
     m_lock = new CrossThreadLock(false);
 }
コード例 #9
0
 internal LocalRecordStore(IRecord record, IObjectStore parentStore, LocalRecordStoreTable recordStoreTable)
 {
     m_record = record;
     m_metadataLock = new CrossThreadLock(false);
     Task.Run(() => EnsureFolders(parentStore, recordStoreTable)).Wait();
 }
 private CrossThreadLockScope(CrossThreadLock ctLock)
 {
     m_lock = ctLock;
 }