Beispiel #1
0
 /// <summary>
 /// Fetches the information about an object asynchronously.
 /// </summary>
 /// <remarks>This does not retrieve the content of the object itself. Use <see cref="DownloadObjectAsync(string, string, System.IO.Stream, DownloadObjectOptions, CancellationToken, System.IProgress{Apis.Download.IDownloadProgress})"/>
 /// to download the content.</remarks>
 /// <param name="bucket">The name of the bucket containing the object. Must not be null.</param>
 /// <param name="objectName">The name of the object within 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="Object"/> representation of the storage object.</returns>
 public virtual Task <Object> GetObjectAsync(
     string bucket,
     string objectName,
     GetObjectOptions options            = null,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     throw new NotImplementedException();
 }
Beispiel #2
0
 /// <inheritdoc />
 public override Task <Object> GetObjectAsync(
     string bucket,
     string objectName,
     GetObjectOptions options            = null,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     ValidateBucketName(bucket);
     GaxPreconditions.CheckNotNull(objectName, nameof(objectName));
     return(CreateGetObjectRequest(bucket, objectName, options).ExecuteAsync(cancellationToken));
 }
Beispiel #3
0
        private ObjectsResource.GetRequest CreateGetObjectRequest(string bucket, string objectName, GetObjectOptions options)
        {
            var request = Service.Objects.Get(bucket, objectName);

            options?.ModifyRequest(request);
            return(request);
        }
Beispiel #4
0
 /// <inheritdoc />
 public override Object GetObject(string bucket, string objectName, GetObjectOptions options = null)
 {
     ValidateBucketName(bucket);
     GaxPreconditions.CheckNotNull(objectName, nameof(objectName));
     return(CreateGetObjectRequest(bucket, objectName, options).Execute());
 }
Beispiel #5
0
 /// <summary>
 /// Fetches the information about an object synchronously.
 /// </summary>
 /// <remarks>This does not retrieve the content of the object itself. Use <see cref="DownloadObject(string, string, System.IO.Stream, DownloadObjectOptions, System.IProgress{Apis.Download.IDownloadProgress})"/>
 /// to download the content.</remarks>
 /// <param name="bucket">The name of the bucket containing the object. Must not be null.</param>
 /// <param name="objectName">The name of the object within 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="Object"/> representation of the storage object.</returns>
 public virtual Object GetObject(string bucket, string objectName, GetObjectOptions options = null)
 {
     throw new NotImplementedException();
 }