Пример #1
0
        public StreamState FetchStreamState(string streamKey)
        {
            _tenant.EnsureStorageExists(typeof(EventStream));

            var handler = new StreamStateByStringHandler(_store.Events, streamKey, _tenant.TenantId);

            return(_connection.Fetch(handler, null, null, _tenant));
        }
Пример #2
0
        public Task <StreamState> FetchStreamStateAsync(string streamKey, CancellationToken token = new CancellationToken())
        {
            _tenant.EnsureStorageExists(typeof(EventStream));

            var handler = new StreamStateByStringHandler(_store.Events, streamKey, _tenant.TenantId);

            return(_connection.FetchAsync(handler, null, null, _tenant, token));
        }
Пример #3
0
        public StreamState FetchStreamState(string streamKey)
        {
            _tenant.EnsureStorageExists(typeof(EventStream));

            var handler = new StreamStateByStringHandler(_store.Events, streamKey, _tenant.TenantId);

            return(_session.ExecuteHandler(handler));
        }