public async Task<DataWithVersion[]> ReadRecords(string streamName, long afterVersion, int maxCount) { try { var azurehelper = new AzureBlobAppenderHelper(this.storage, this.container, this.options); var items = await azurehelper.ReadStreamCache(streamName); return items.Where(x => x.Version > afterVersion && x.Version <= maxCount).Select(x => new DataWithVersion(x.Version, x.Bytes)).ToArray(); } catch (StorageException ex) { var requestInformation = ex.RequestInformation; var extended = requestInformation.ExtendedErrorInformation; throw; } }
public async Task <DataWithVersion[]> ReadRecords(string streamName, long afterVersion, int maxCount) { try { var azurehelper = new AzureBlobAppenderHelper(this.storage, this.container, this.options); var items = await azurehelper.ReadStreamCache(streamName); return(items.Where(x => x.Version > afterVersion && x.Version <= maxCount).Select(x => new DataWithVersion(x.Version, x.Bytes)).ToArray()); } catch (StorageException ex) { var requestInformation = ex.RequestInformation; var extended = requestInformation.ExtendedErrorInformation; throw; } }