Esempio n. 1
0
        internal async Task <TQuery> GetQuery <TQuery>(Id instanceId, ExpectTimeout timeout) where TQuery : Query
        {
            var key = _area.Queries.Get <TQuery>().CreateKey(instanceId);

            await GetQueryInstance(key).WaitForLatest(timeout);

            return((TQuery)await _clientDb.ReadQuery(key));
        }
Esempio n. 2
0
        public async Task <IActionResult> Get(Type type, Id id)
        {
            var etag = ReadETag(type, id);

            var state = await _clientDb.ReadQuery(etag);

            return(state.NotModified
        ? new QueryNotModifiedResult(etag)
        : new QueryStateResult(state) as IActionResult);
        }
Esempio n. 3
0
 public Task <Query> ReadQuery(Func <AreaMap, FlowKey> getKey) =>
 _clientDb.ReadQuery(getKey(_area));