Пример #1
0
 /// <summary>
 /// Fetches the information about a bucket asynchronously.
 /// </summary>
 /// <param name="bucket">The name of the bucket. Must not be null.</param>
 /// <param name="options">Additional options for the fetch operation. May be null, in which case appropriate
 /// defaults will be used.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation, with a result returning the
 /// <see cref="Bucket"/> representation of the storage bucket.</returns>
 public virtual Task <Bucket> GetBucketAsync(
     string bucket,
     GetBucketOptions options            = null,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     throw new NotImplementedException();
 }
Пример #2
0
        private BucketsResource.GetRequest CreateGetBucketRequest(string bucket, GetBucketOptions options)
        {
            ValidateBucketName(bucket);
            var bucketEntity = new Bucket {
                Name = bucket
            };
            var request = Service.Buckets.Get(bucket);

            options?.ModifyRequest(request);
            return(request);
        }
Пример #3
0
 /// <summary>
 /// Fetches the information about a bucket synchronously.
 /// </summary>
 /// <param name="bucket">The name of the bucket. Must not be null.</param>
 /// <param name="options">Additional options for the fetch operation. May be null, in which case appropriate
 /// defaults will be used.</param>
 /// <returns>The <see cref="Bucket"/> representation of the storage bucket.</returns>
 public virtual Bucket GetBucket(string bucket, GetBucketOptions options = null)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 /// <inheritdoc />
 public override Task <Bucket> GetBucketAsync(string bucket, GetBucketOptions options = null,
                                              CancellationToken cancellationToken     = default(CancellationToken)) =>
 CreateGetBucketRequest(bucket, options).ExecuteAsync();
Пример #5
0
 /// <inheritdoc />
 public override Bucket GetBucket(string bucket, GetBucketOptions options = null) =>
 CreateGetBucketRequest(bucket, options).Execute();