public void DeleteRouteMarshallTest() { var operation = service_model.FindOperation("DeleteRoute"); var request = InstantiateClassGenerator.Execute <DeleteRouteRequest>(); var marshaller = new DeleteRouteRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("DeleteRoute", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" } } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = DeleteRouteResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as DeleteRouteResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void DeleteRouteMarshallTest() { var operation = service_model.FindOperation("DeleteRoute"); var request = InstantiateClassGenerator.Execute<DeleteRouteRequest>(); var marshaller = new DeleteRouteRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); }
/// <summary> /// Initiates the asynchronous execution of the DeleteRoute operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteRoute 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<DeleteRouteResponse> DeleteRouteAsync(DeleteRouteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteRouteRequestMarshaller(); var unmarshaller = DeleteRouteResponseUnmarshaller.Instance; return InvokeAsync<DeleteRouteRequest,DeleteRouteResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Deletes the specified route from the specified route table. /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteRoute service method.</param> /// /// <returns>The response from the DeleteRoute service method, as returned by EC2.</returns> public DeleteRouteResponse DeleteRoute(DeleteRouteRequest request) { var marshaller = new DeleteRouteRequestMarshaller(); var unmarshaller = DeleteRouteResponseUnmarshaller.Instance; return Invoke<DeleteRouteRequest,DeleteRouteResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DeleteRoute operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteRoute operation on AmazonEC2Client.</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 EndDeleteRoute /// operation.</returns> public IAsyncResult BeginDeleteRoute(DeleteRouteRequest request, AsyncCallback callback, object state) { var marshaller = new DeleteRouteRequestMarshaller(); var unmarshaller = DeleteRouteResponseUnmarshaller.Instance; return BeginInvoke<DeleteRouteRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeDeleteRoute(DeleteRouteRequest deleteRouteRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DeleteRouteRequestMarshaller().Marshall(deleteRouteRequest); var unmarshaller = DeleteRouteResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Deletes the specified route from the specified route table.</para> /// </summary> /// /// <param name="deleteRouteRequest">Container for the necessary parameters to execute the DeleteRoute service method on AmazonEC2.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<DeleteRouteResponse> DeleteRouteAsync(DeleteRouteRequest deleteRouteRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteRouteRequestMarshaller(); var unmarshaller = DeleteRouteResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DeleteRouteRequest, DeleteRouteResponse>(deleteRouteRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the DeleteRoute operation. /// <seealso cref="Amazon.EC2.IAmazonEC2.DeleteRoute"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteRoute 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 async Task<DeleteRouteResponse> DeleteRouteAsync(DeleteRouteRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteRouteRequestMarshaller(); var unmarshaller = DeleteRouteResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DeleteRouteRequest, DeleteRouteResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }