public async Task <long> GetSize <T>(IEventStream stream, string oob) where T : class, IEventSource { var streamName = _streamGen(typeof(T), StreamTypes.OOB, stream.Bucket, stream.StreamId, stream.Parents); return((await Enumerable.Range(1, 10).ToArray().StartEachAsync(5, (vary) => _store.Size($"{streamName}-{oob}.{vary}")).ConfigureAwait(false)).Sum()); }
public Task <long> GetSize <TEntity>(string bucket, Id streamId, Id[] parents, string oobId) where TEntity : IEntity { var stream = _generator(typeof(TEntity), StreamTypes.OOB, $"{oobId}.{bucket}", streamId, parents); return(_store.Size(stream)); }