ReadStreamCache() public method

public ReadStreamCache ( string streamName ) : Task>
streamName string
return Task>
 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;
     }            
 }
示例#2
0
        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;
            }
        }