コード例 #1
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetDashboard operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetDashboard 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>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetDashboard">REST API Reference for GetDashboard Operation</seealso>
        public virtual Task <GetDashboardResponse> GetDashboardAsync(GetDashboardRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new GetDashboardRequestMarshaller();
            var unmarshaller = GetDashboardResponseUnmarshaller.Instance;

            return(InvokeAsync <GetDashboardRequest, GetDashboardResponse>(request, marshaller,
                                                                           unmarshaller, cancellationToken));
        }
コード例 #2
0
        public void GetDashboardMarshallTest()
        {
            var operation = service_model.FindOperation("GetDashboard");

            var request         = InstantiateClassGenerator.Execute <GetDashboardRequest>();
            var marshaller      = new GetDashboardRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator       = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);

            validator.Validate();


            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();
            var context         = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null);
            var response        = GetDashboardResponseUnmarshaller.Instance.Unmarshall(context)
                                  as GetDashboardResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }