Exemple #1
0
        public async Task <byte[]> GetContentAsync(IFile file, long offset, long lenght)
        {
            var azureFile = new CloudFile(new Uri(file.Id), fileShare.ServiceClient.Credentials);

            using (var memoryStream = new MemoryStream())
            {
                await azureFile.DownloadRangeToStreamAsync(memoryStream, offset, lenght);

                return(memoryStream.ToArray());
            }
        }
Exemple #2
0
 public AzureFileContentInfo(CloudFile file)
 {
     _file = file;
     _file.DownloadRangeToStreamAsync(_stream, null, null).Wait();
     _stream.Position = 0;
 }