internal CreateDomainResponse CreateDomain(CreateDomainRequest request) { var marshaller = new CreateDomainRequestMarshaller(); var unmarshaller = CreateDomainResponseUnmarshaller.Instance; return Invoke<CreateDomainRequest,CreateDomainResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CreateDomain operation. /// <seealso cref="Amazon.CloudSearch_2011_02_01.IAmazonCloudSearch.CreateDomain"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateDomain 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<CreateDomainResponse> CreateDomainAsync(CreateDomainRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateDomainRequestMarshaller(); var unmarshaller = CreateDomainResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreateDomainRequest, CreateDomainResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the CreateDomain operation. /// <seealso cref="Amazon.CloudSearch_2011_02_01.IAmazonCloudSearch"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateDomain 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<CreateDomainResponse> CreateDomainAsync(CreateDomainRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateDomainRequestMarshaller(); var unmarshaller = CreateDomainResponseUnmarshaller.Instance; return InvokeAsync<CreateDomainRequest,CreateDomainResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// <para>Creates a new search domain.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateDomain service method on /// AmazonCloudSearch.</param> /// /// <returns>The response from the CreateDomain service method, as returned by AmazonCloudSearch.</returns> /// /// <exception cref="T:Amazon.CloudSearch_2011_02_01.Model.BaseException" /> /// <exception cref="T:Amazon.CloudSearch_2011_02_01.Model.LimitExceededException" /> /// <exception cref="T:Amazon.CloudSearch_2011_02_01.Model.InternalException" /> public CreateDomainResponse CreateDomain(CreateDomainRequest request) { var task = CreateDomainAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
IAsyncResult invokeCreateDomain(CreateDomainRequest createDomainRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateDomainRequestMarshaller().Marshall(createDomainRequest); var unmarshaller = CreateDomainResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the CreateDomain operation. /// <seealso cref="Amazon.CloudSearch_2011_02_01.IAmazonCloudSearch.CreateDomain"/> /// </summary> /// /// <param name="createDomainRequest">Container for the necessary parameters to execute the CreateDomain operation on AmazonCloudSearch.</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 EndCreateDomain /// operation.</returns> public IAsyncResult BeginCreateDomain(CreateDomainRequest createDomainRequest, AsyncCallback callback, object state) { return invokeCreateDomain(createDomainRequest, callback, state, false); }
/// <summary> /// <para>Creates a new search domain.</para> /// </summary> /// /// <param name="createDomainRequest">Container for the necessary parameters to execute the CreateDomain service method on /// AmazonCloudSearch.</param> /// /// <returns>The response from the CreateDomain service method, as returned by AmazonCloudSearch.</returns> /// /// <exception cref="BaseException"/> /// <exception cref="LimitExceededException"/> /// <exception cref="InternalException"/> public CreateDomainResponse CreateDomain(CreateDomainRequest createDomainRequest) { IAsyncResult asyncResult = invokeCreateDomain(createDomainRequest, null, null, true); return EndCreateDomain(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the CreateDomain operation. /// <seealso cref="Amazon.CloudSearch_2011_02_01.IAmazonCloudSearch"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateDomain operation on AmazonCloudSearchClient.</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 EndCreateDomain /// operation.</returns> public IAsyncResult BeginCreateDomain(CreateDomainRequest request, AsyncCallback callback, object state) { var marshaller = new CreateDomainRequestMarshaller(); var unmarshaller = CreateDomainResponseUnmarshaller.Instance; return BeginInvoke<CreateDomainRequest>(request, marshaller, unmarshaller, callback, state); }