/// <summary> /// Retrieve a bucket. /// </summary> /// <param name="bucketName">Name of bucket to get</param> /// <returns>Bucket Details</returns> public async Task <Bucket> FindBucketByNameAsync(string bucketName) { Arguments.CheckNonEmptyString(bucketName, nameof(bucketName)); return((await _service.GetBucketsAsync(null, null, null, null, null, null, bucketName)) ._Buckets.FirstOrDefault()); }
/// <summary> /// Retrieve a bucket. /// </summary> /// <param name="bucketName">Name of bucket to get</param> /// <returns>Bucket Details</returns> public async Task <Bucket> FindBucketByName(string bucketName) { Arguments.CheckNonEmptyString(bucketName, nameof(bucketName)); return(await _service .GetBucketsAsync(null, null, null, null, null, bucketName) .ContinueWith(t => t.Result._Buckets.FirstOrDefault())); }