示例#1
0
        public async Task <bool> DeleteBlobAsync(string container, string blob)
        {
            var response = await this._httpClient.DeleteAsync(StoragesEndpoint.DeleteBlobInContainer(container, blob));

            return(response.IsSuccessStatusCode);
        }
示例#2
0
 public async Task <IEnumerable <string> > GetBlobsAsync(string container)
 {
     return(await this._httpClient.GetFromJsonAsync <IEnumerable <string> >(StoragesEndpoint.GetAllBlobsInContainer(container)));
 }
示例#3
0
        public async Task <byte[]> GetBlobAsync(string container, string blob)
        {
            var response = await this._httpClient.GetAsync(StoragesEndpoint.GetBlobInContainer(container, blob));

            return(response.IsSuccessStatusCode ? await response.Content.ReadAsByteArrayAsync() : null);
        }
示例#4
0
        public async Task <bool> PostBlobsAsync(string container, MultipartFormDataContent blob)
        {
            var response = await this._httpClient.PostAsync(StoragesEndpoint.PostBlobInContainer(container), blob);

            return(response.IsSuccessStatusCode);
        }