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