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

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