internal DeleteObjectsResponse DeleteObjects(DeleteObjectsRequest request) { var marshaller = new DeleteObjectsRequestMarshaller(); var unmarshaller = DeleteObjectsResponseUnmarshaller.Instance; return Invoke<DeleteObjectsRequest,DeleteObjectsResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DeleteObjects operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteObjects 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<DeleteObjectsResponse> DeleteObjectsAsync(DeleteObjectsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteObjectsRequestMarshaller(); var unmarshaller = DeleteObjectsResponseUnmarshaller.Instance; return InvokeAsync<DeleteObjectsRequest,DeleteObjectsResponse>(request, marshaller, unmarshaller, cancellationToken); }
IAsyncResult invokeDeleteObjects(DeleteObjectsRequest deleteObjectsRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DeleteObjectsRequestMarshaller().Marshall(deleteObjectsRequest); var unmarshaller = DeleteObjectsResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the DeleteObjects operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteObjects 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 DeleteObjectsAsync(DeleteObjectsRequest request, AmazonServiceCallback<DeleteObjectsRequest, DeleteObjectsResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new DeleteObjectsRequestMarshaller(); var unmarshaller = DeleteObjectsResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<DeleteObjectsRequest,DeleteObjectsResponse> responseObject = new AmazonServiceResult<DeleteObjectsRequest,DeleteObjectsResponse>((DeleteObjectsRequest)req, (DeleteObjectsResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<DeleteObjectsRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the DeleteObjects operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteObjects 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 EndDeleteObjects /// operation.</returns> public IAsyncResult BeginDeleteObjects(DeleteObjectsRequest request, AsyncCallback callback, object state) { var marshaller = new DeleteObjectsRequestMarshaller(); var unmarshaller = DeleteObjectsResponseUnmarshaller.Instance; return BeginInvoke<DeleteObjectsRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the DeleteObjects operation. /// <seealso cref="Amazon.S3.IAmazonS3.DeleteObjects"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteObjects 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<DeleteObjectsResponse> DeleteObjectsAsync(DeleteObjectsRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteObjectsRequestMarshaller(); var unmarshaller = DeleteObjectsResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DeleteObjectsRequest, DeleteObjectsResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>This operation enables you to delete multiple objects from a bucket using a single HTTP request. You may specify up to 1000 /// keys.</para> /// </summary> /// /// <param name="deleteObjectsRequest">Container for the necessary parameters to execute the DeleteObjects service method on AmazonS3.</param> /// /// <returns>The response from the DeleteObjects 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<DeleteObjectsResponse> DeleteObjectsAsync(DeleteObjectsRequest deleteObjectsRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteObjectsRequestMarshaller(); var unmarshaller = DeleteObjectsResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DeleteObjectsRequest, DeleteObjectsResponse>(deleteObjectsRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }