/// <summary> /// Deletes a bucket synchronously. /// </summary> /// <param name="bucket">Bucket to delete. Must not be null, and must have the name populated.</param> /// <param name="options">Additional options for the operation. May be null, in which case appropriate /// defaults will be used.</param> public virtual void DeleteBucket(Bucket bucket, DeleteBucketOptions options = null) { throw new NotImplementedException(); }
private BucketsResource.DeleteRequest CreateDeleteBucketRequest(string bucket, DeleteBucketOptions options) { ValidateBucketName(bucket); var request = Service.Buckets.Delete(bucket); options?.ModifyRequest(request); return(request); }
/// <inheritdoc /> public override Task DeleteBucketAsync( Bucket bucket, DeleteBucketOptions options = null, CancellationToken cancellationToken = default(CancellationToken) ) => CreateDeleteBucketRequest(bucket, options).ExecuteAsync(cancellationToken);
private BucketsResource.DeleteRequest CreateDeleteBucketRequest(Bucket bucket, DeleteBucketOptions options) { ValidateBucket(bucket, nameof(bucket)); var request = Service.Buckets.Delete(bucket.Name); options?.ModifyRequest(request); return(request); }
/// <inheritdoc /> public override void DeleteBucket(Bucket bucket, DeleteBucketOptions options = null) => CreateDeleteBucketRequest(bucket, options).Execute();