コード例 #1
0
        public IEntityStore <TK, TV> GetEntityStore <TK, TV>(string entityName)
        {
            IDbStore entityDbStore                 = this.dbStoreProvider.GetDbStore(Preconditions.CheckNonWhiteSpace(entityName, nameof(entityName)));
            IEntityStore <TK, TV> entityStore      = new EntityStore <TK, TV>(entityDbStore, entityName, 12);
            IEntityStore <TK, TV> timedEntityStore = new TimedEntityStore <TK, TV>(entityStore, this.operationTimeout);

            return(timedEntityStore);
        }
コード例 #2
0
ファイル: StoreProvider.cs プロジェクト: nlcamp/iotedge
        IEntityStore <TK, TV> GetEntityStore <TK, TV>(string entityName, IDbStore entityDbStore)
        {
            IKeyValueStore <TK, TV> dbStoreMapper    = new KeyValueStoreMapper <TK, byte[], TV, byte[]>(entityDbStore, new BytesMapper <TK>(), new BytesMapper <TV>());
            IEntityStore <TK, TV>   entityStore      = new EntityStore <TK, TV>(dbStoreMapper, entityName, 12);
            IEntityStore <TK, TV>   timedEntityStore = new TimedEntityStore <TK, TV>(entityStore, this.operationTimeout);

            return(timedEntityStore);
        }
コード例 #3
0
        public IEntityStore <TK, TV> GetEntityStore <TK, TV>(string entityName)
        {
            IDbStore entityDbStore = this.dbStoreProvider.GetDbStore(Preconditions.CheckNonWhiteSpace(entityName, nameof(entityName)));
            IKeyValueStore <TK, TV> dbStoreMapper    = new KeyValueStoreMapper <TK, byte[], TV, byte[]>(entityDbStore, new BytesMapper <TK>(), new BytesMapper <TV>());
            IEntityStore <TK, TV>   entityStore      = new EntityStore <TK, TV>(dbStoreMapper, entityName, 12);
            IEntityStore <TK, TV>   timedEntityStore = new TimedEntityStore <TK, TV>(entityStore, this.operationTimeout);

            return(timedEntityStore);
        }