ReadMasterCache() public method

public ReadMasterCache ( ) : Task>
return Task>
示例#1
0
        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;
            }
            
        }