/// <summary> /// Initiates the asynchronous execution of the ListObjectsV2 operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListObjectsV2 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 ListObjectsV2Async(ListObjectsV2Request request, AmazonServiceCallback<ListObjectsV2Request, ListObjectsV2Response> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new ListObjectsV2RequestMarshaller(); var unmarshaller = ListObjectsV2ResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<ListObjectsV2Request,ListObjectsV2Response> responseObject = new AmazonServiceResult<ListObjectsV2Request,ListObjectsV2Response>((ListObjectsV2Request)req, (ListObjectsV2Response)res, ex , ao.State); callback(responseObject); }; BeginInvoke<ListObjectsV2Request>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Returns some or all (up to 1000) of the objects in a bucket. You can use the request /// parameters as selection criteria to return a subset of the objects in a bucket. Note: /// ListObjectsV2 is the revised List Objects API and we recommend you use this revised /// API for new application development. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListObjectsV2 service method.</param> /// /// <returns>The response from the ListObjectsV2 service method, as returned by S3.</returns> public ListObjectsV2Response ListObjectsV2(ListObjectsV2Request request) { var marshaller = new ListObjectsV2RequestMarshaller(); var unmarshaller = ListObjectsV2ResponseUnmarshaller.Instance; return Invoke<ListObjectsV2Request,ListObjectsV2Response>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the ListObjectsV2 operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListObjectsV2 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 EndListObjectsV2 /// operation.</returns> public IAsyncResult BeginListObjectsV2(ListObjectsV2Request request, AsyncCallback callback, object state) { var marshaller = new ListObjectsV2RequestMarshaller(); var unmarshaller = ListObjectsV2ResponseUnmarshaller.Instance; return BeginInvoke<ListObjectsV2Request>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the ListObjectsV2 operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListObjectsV2 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<ListObjectsV2Response> ListObjectsV2Async(ListObjectsV2Request request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListObjectsV2RequestMarshaller(); var unmarshaller = ListObjectsV2ResponseUnmarshaller.Instance; return InvokeAsync<ListObjectsV2Request,ListObjectsV2Response>(request, marshaller, unmarshaller, cancellationToken); }