internal GetCORSConfigurationResponse GetCORSConfiguration(GetCORSConfigurationRequest request) { var marshaller = new GetCORSConfigurationRequestMarshaller(); var unmarshaller = GetCORSConfigurationResponseUnmarshaller.Instance; return Invoke<GetCORSConfigurationRequest,GetCORSConfigurationResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the GetCORSConfiguration operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetCORSConfiguration 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<GetCORSConfigurationResponse> GetCORSConfigurationAsync(GetCORSConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new GetCORSConfigurationRequestMarshaller(); var unmarshaller = GetCORSConfigurationResponseUnmarshaller.Instance; return InvokeAsync<GetCORSConfigurationRequest,GetCORSConfigurationResponse>(request, marshaller, unmarshaller, cancellationToken); }
IAsyncResult invokeGetCORSConfiguration(GetCORSConfigurationRequest getCORSConfigurationRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new GetCORSConfigurationRequestMarshaller().Marshall(getCORSConfigurationRequest); var unmarshaller = GetCORSConfigurationResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the GetCORSConfiguration operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetCORSConfiguration 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 GetCORSConfigurationAsync(GetCORSConfigurationRequest request, AmazonServiceCallback<GetCORSConfigurationRequest, GetCORSConfigurationResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new GetCORSConfigurationRequestMarshaller(); var unmarshaller = GetCORSConfigurationResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<GetCORSConfigurationRequest,GetCORSConfigurationResponse> responseObject = new AmazonServiceResult<GetCORSConfigurationRequest,GetCORSConfigurationResponse>((GetCORSConfigurationRequest)req, (GetCORSConfigurationResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<GetCORSConfigurationRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the GetCORSConfiguration operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetCORSConfiguration 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 EndGetCORSConfiguration /// operation.</returns> public IAsyncResult BeginGetCORSConfiguration(GetCORSConfigurationRequest request, AsyncCallback callback, object state) { var marshaller = new GetCORSConfigurationRequestMarshaller(); var unmarshaller = GetCORSConfigurationResponseUnmarshaller.Instance; return BeginInvoke<GetCORSConfigurationRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the GetCORSConfiguration operation. /// <seealso cref="Amazon.S3.IAmazonS3.GetCORSConfiguration"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetCORSConfiguration 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<GetCORSConfigurationResponse> GetCORSConfigurationAsync(GetCORSConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new GetCORSConfigurationRequestMarshaller(); var unmarshaller = GetCORSConfigurationResponseUnmarshaller.GetInstance(); return Invoke<IRequest, GetCORSConfigurationRequest, GetCORSConfigurationResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>Returns the cors configuration for the bucket.</para> /// </summary> /// /// <param name="getCORSConfigurationRequest">Container for the necessary parameters to execute the GetCORSConfiguration service method on AmazonS3.</param> /// /// <returns>The response from the GetCORSConfiguration 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<GetCORSConfigurationResponse> GetCORSConfigurationAsync(GetCORSConfigurationRequest getCORSConfigurationRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new GetCORSConfigurationRequestMarshaller(); var unmarshaller = GetCORSConfigurationResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, GetCORSConfigurationRequest, GetCORSConfigurationResponse>(getCORSConfigurationRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }