/// <inheritdoc/> public async Task UpdateStorageContainer(StorageContainer container) { container.AssertIsNotNull("container", "Cannot update a storage container with a null container."); var client = this.GetPocoClient(); await client.UpdateStorageContainer(container); }
/// <inheritdoc/> public async Task CreateStorageContainer(StorageContainer container) { container.AssertIsNotNull("container", "Cannot Create a null storage container."); container.Name.AssertIsNotNullOrEmpty("container.Name", "Cannot create a storage container without a name."); var client = this.GetRestClient(); var resp = await client.CreateContainer(container.Name, container.Metadata); if (resp.StatusCode != HttpStatusCode.Created && resp.StatusCode != HttpStatusCode.NoContent) { throw new InvalidOperationException(string.Format("Failed to create storage container '{0}'. The remote server returned the following status code: '{1}'.", container.Name, resp.StatusCode)); } }