Container for the parameters to the GetObjectTorrent operation.

Return torrent files from a bucket.

Inheritance: Amazon.Runtime.AmazonWebServiceRequest
Esempio n. 1
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetObjectTorrent operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetObjectTorrent operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task<GetObjectTorrentResponse> GetObjectTorrentAsync(GetObjectTorrentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetObjectTorrentRequestMarshaller();
            var unmarshaller = GetObjectTorrentResponseUnmarshaller.Instance;

            return InvokeAsync<GetObjectTorrentRequest,GetObjectTorrentResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
 IAsyncResult invokeGetObjectTorrent(GetObjectTorrentRequest getObjectTorrentRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new GetObjectTorrentRequestMarshaller().Marshall(getObjectTorrentRequest);
     var unmarshaller = GetObjectTorrentResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
Esempio n. 3
0
        internal GetObjectTorrentResponse GetObjectTorrent(GetObjectTorrentRequest request)
        {
            var marshaller = new GetObjectTorrentRequestMarshaller();
            var unmarshaller = GetObjectTorrentResponseUnmarshaller.Instance;

            return Invoke<GetObjectTorrentRequest,GetObjectTorrentResponse>(request, marshaller, unmarshaller);
        }
 /// <summary>
 /// <para>Return torrent files from a bucket.</para>
 /// </summary>
 /// 
 /// <param name="getObjectTorrentRequest">Container for the necessary parameters to execute the GetObjectTorrent service method on
 ///          AmazonS3.</param>
 /// 
 /// <returns>The response from the GetObjectTorrent service method, as returned by AmazonS3.</returns>
 /// 
 public GetObjectTorrentResponse GetObjectTorrent(GetObjectTorrentRequest getObjectTorrentRequest)
 {
     IAsyncResult asyncResult = invokeGetObjectTorrent(getObjectTorrentRequest, null, null, true);
     return EndGetObjectTorrent(asyncResult);
 }
 /// <summary>
 /// Initiates the asynchronous execution of the GetObjectTorrent operation.
 /// <seealso cref="Amazon.S3.IAmazonS3.GetObjectTorrent"/>
 /// </summary>
 /// 
 /// <param name="getObjectTorrentRequest">Container for the necessary parameters to execute the GetObjectTorrent operation on AmazonS3.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// 
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetObjectTorrent
 ///         operation.</returns>
 public IAsyncResult BeginGetObjectTorrent(GetObjectTorrentRequest getObjectTorrentRequest, AsyncCallback callback, object state)
 {
     return invokeGetObjectTorrent(getObjectTorrentRequest, callback, state, false);
 }
Esempio n. 6
0
 /// <summary>
 /// Return torrent files from a bucket.
 /// </summary>
 /// <param name="bucketName">A property of GetObjectTorrentRequest used to execute the GetObjectTorrent service method.</param>
 /// <param name="key">A property of GetObjectTorrentRequest used to execute the GetObjectTorrent service method.</param>
 /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
 /// <param name="options">
 ///     A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///     procedure using the AsyncState property.
 /// </param>
 /// 
 /// <returns>The response from the GetObjectTorrent service method, as returned by S3.</returns>
 public void GetObjectTorrentAsync(string bucketName, string key,  AmazonServiceCallback<GetObjectTorrentRequest, GetObjectTorrentResponse> callback, AsyncOptions options = null)
 {
     var request = new GetObjectTorrentRequest();
     request.BucketName = bucketName;
     request.Key = key;
     GetObjectTorrentAsync(request, callback, options);
 }
Esempio n. 7
0
 /// <summary>
 /// Initiates the asynchronous execution of the GetObjectTorrent operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the GetObjectTorrent operation on AmazonS3Client.</param>
 /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
 /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 public void GetObjectTorrentAsync(GetObjectTorrentRequest request, AmazonServiceCallback<GetObjectTorrentRequest, GetObjectTorrentResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new GetObjectTorrentRequestMarshaller();
     var unmarshaller = GetObjectTorrentResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<GetObjectTorrentRequest,GetObjectTorrentResponse> responseObject 
                     = new AmazonServiceResult<GetObjectTorrentRequest,GetObjectTorrentResponse>((GetObjectTorrentRequest)req, (GetObjectTorrentResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<GetObjectTorrentRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
Esempio n. 8
0
 /// <summary>
 /// Return torrent files from a bucket.
 /// </summary>
 /// <param name="bucketName">A property of GetObjectTorrentRequest used to execute the GetObjectTorrent service method.</param>
 /// <param name="key">A property of GetObjectTorrentRequest used to execute the GetObjectTorrent service method.</param>
 /// 
 /// <returns>The response from the GetObjectTorrent service method, as returned by S3.</returns>
 public GetObjectTorrentResponse GetObjectTorrent(string bucketName, string key)
 {
     var request = new GetObjectTorrentRequest();
     request.BucketName = bucketName;
     request.Key = key;
     return GetObjectTorrent(request);
 }
Esempio n. 9
0
 /// <summary>
 /// Return torrent files from a bucket.
 /// </summary>
 /// <param name="bucketName">A property of GetObjectTorrentRequest used to execute the GetObjectTorrent service method.</param>
 /// <param name="key">A property of GetObjectTorrentRequest used to execute the GetObjectTorrent service method.</param>
 /// <param name="cancellationToken">
 ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
 /// </param>
 /// 
 /// <returns>The response from the GetObjectTorrent service method, as returned by S3.</returns>
 public Task<GetObjectTorrentResponse> GetObjectTorrentAsync(string bucketName, string key, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new GetObjectTorrentRequest();
     request.BucketName = bucketName;
     request.Key = key;
     return GetObjectTorrentAsync(request, cancellationToken);
 }
Esempio n. 10
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetObjectTorrent operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetObjectTorrent operation on AmazonS3Client.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetObjectTorrent
        ///         operation.</returns>
        public IAsyncResult BeginGetObjectTorrent(GetObjectTorrentRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new GetObjectTorrentRequestMarshaller();
            var unmarshaller = GetObjectTorrentResponseUnmarshaller.Instance;

            return BeginInvoke<GetObjectTorrentRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
Esempio n. 11
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetObjectTorrent operation.
        /// <seealso cref="Amazon.S3.IAmazonS3.GetObjectTorrent"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetObjectTorrent operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
		public Task<GetObjectTorrentResponse> GetObjectTorrentAsync(GetObjectTorrentRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetObjectTorrentRequestMarshaller();
            var unmarshaller = GetObjectTorrentResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, GetObjectTorrentRequest, GetObjectTorrentResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
Esempio n. 12
0
        /// <summary>
        /// <para>Return torrent files from a bucket.</para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetObjectTorrent service method on
        /// AmazonS3.</param>
        /// 
        /// <returns>The response from the GetObjectTorrent service method, as returned by AmazonS3.</returns>
		public GetObjectTorrentResponse GetObjectTorrent(GetObjectTorrentRequest request)
        {
            var task = GetObjectTorrentAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
Esempio n. 13
0
        /// <summary>
        /// <para>Return torrent files from a bucket.</para>
        /// </summary>
        /// 
        /// <param name="getObjectTorrentRequest">Container for the necessary parameters to execute the GetObjectTorrent service method on
        /// AmazonS3.</param>
        /// 
        /// <returns>The response from the GetObjectTorrent service method, as returned by AmazonS3.</returns>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public async Task<GetObjectTorrentResponse> GetObjectTorrentAsync(GetObjectTorrentRequest getObjectTorrentRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetObjectTorrentRequestMarshaller();
            var unmarshaller = GetObjectTorrentResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, GetObjectTorrentRequest, GetObjectTorrentResponse>(getObjectTorrentRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
Esempio n. 14
0
        /// <summary>
        /// <para>Return torrent files from a bucket.</para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetObjectTorrent service method on
        /// AmazonS3.</param>
        /// 
        /// <returns>The response from the GetObjectTorrent service method, as returned by AmazonS3.</returns>
		public GetObjectTorrentResponse GetObjectTorrent(GetObjectTorrentRequest request)
        {
            var task = GetObjectTorrentAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }