Exemplo n.º 1
0
        public async Task <ReadAllPage> ReadAllBackwards(
            long fromPositionInclusive,
            int maxCount,
            bool prefetchJsonData = true,
            CancellationToken cancellationToken = new CancellationToken())
        {
            var span = _spanSource.Begin("stream-store." + nameof(ReadAllBackwards), ServiceName, "all", TypeName);

            try
            {
                return(await _streamStore
                       .ReadAllBackwards(
                           fromPositionInclusive,
                           maxCount,
                           prefetchJsonData,
                           cancellationToken));
            }
            catch (Exception ex)
            {
                span?.SetError(ex);
                throw;
            }
            finally
            {
                span?.Dispose();
            }
        }
Exemplo n.º 2
0
 public async Task <ReadAllPage> ReadAllBackwards(
     long fromPositionInclusive,
     int maxCount,
     bool prefetchJsonData = true,
     CancellationToken cancellationToken = new CancellationToken())
 => await Trace(
     nameof(ReadAllBackwards),
     "all",
     () => _streamStore.ReadAllBackwards(fromPositionInclusive, maxCount, prefetchJsonData, cancellationToken));