Ejemplo n.º 1
0
        /// <summary>
        /// <para>Returns the user's sending statistics. The result is a list of
        /// data points, representing the last two weeks of sending
        /// activity.</para> <para>Each data point in the list contains statistics
        /// for a 15-minute interval.</para>
        /// </summary>
        ///
        /// <param name="getSendStatisticsRequest">Container for the necessary
        ///           parameters to execute the GetSendStatistics service method on
        ///           AmazonSimpleEmailService.</param>
        ///
        /// <returns>The response from the GetSendStatistics service method, as
        ///         returned by AmazonSimpleEmailService.</returns>
        ///
        public GetSendStatisticsResponse GetSendStatistics(GetSendStatisticsRequest getSendStatisticsRequest)
        {
            IRequest <GetSendStatisticsRequest> request  = new GetSendStatisticsRequestMarshaller().Marshall(getSendStatisticsRequest);
            GetSendStatisticsResponse           response = Invoke <GetSendStatisticsRequest, GetSendStatisticsResponse> (request, this.signer, GetSendStatisticsResponseUnmarshaller.GetInstance());

            return(response);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// <para>Returns the user's sending statistics. The result is a list of data points, representing the last two weeks of sending activity.
        /// </para> <para>Each data point in the list contains statistics for a 15-minute interval.</para> <para>This action is throttled at one request
        /// per second.</para>
        /// </summary>
        ///
        /// <param name="getSendStatisticsRequest">Container for the necessary parameters to execute the GetSendStatistics service method on
        /// AmazonSimpleEmailService.</param>
        ///
        /// <returns>The response from the GetSendStatistics service method, as returned by AmazonSimpleEmailService.</returns>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        public Task <GetSendStatisticsResponse> GetSendStatisticsAsync(GetSendStatisticsRequest getSendStatisticsRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new GetSendStatisticsRequestMarshaller();
            var unmarshaller = GetSendStatisticsResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, GetSendStatisticsRequest, GetSendStatisticsResponse>(getSendStatisticsRequest, marshaller, unmarshaller, signer, cancellationToken));
        }
Ejemplo n.º 3
0
        internal GetSendStatisticsResponse GetSendStatistics(GetSendStatisticsRequest request)
        {
            var marshaller   = new GetSendStatisticsRequestMarshaller();
            var unmarshaller = GetSendStatisticsResponseUnmarshaller.Instance;

            return(Invoke <GetSendStatisticsRequest, GetSendStatisticsResponse>(request, marshaller, unmarshaller));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetSendStatistics operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetSendStatistics 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 <GetSendStatisticsResponse> GetSendStatisticsAsync(GetSendStatisticsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new GetSendStatisticsRequestMarshaller();
            var unmarshaller = GetSendStatisticsResponseUnmarshaller.Instance;

            return(InvokeAsync <GetSendStatisticsRequest, GetSendStatisticsResponse>(request, marshaller,
                                                                                     unmarshaller, cancellationToken));
        }
Ejemplo n.º 5
0
        IAsyncResult invokeGetSendStatistics(GetSendStatisticsRequest getSendStatisticsRequest, AsyncCallback callback, object state, bool synchronized)
        {
            IRequest    irequest     = new GetSendStatisticsRequestMarshaller().Marshall(getSendStatisticsRequest);
            var         unmarshaller = GetSendStatisticsResponseUnmarshaller.GetInstance();
            AsyncResult result       = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);

            Invoke(result);
            return(result);
        }
Ejemplo n.º 6
0
        public void GetSendStatisticsMarshallTest()
        {
            var operation = service_model.FindOperation("GetSendStatistics");

            var request         = InstantiateClassGenerator.Execute <GetSendStatisticsRequest>();
            var marshaller      = new GetSendStatisticsRequestMarshaller();
            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        = GetSendStatisticsResponseUnmarshaller.Instance.Unmarshall(context)
                                  as GetSendStatisticsResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the GetSendStatistics operation.
        /// <seealso cref="Amazon.SimpleEmail.IAmazonSimpleEmailService.GetSendStatistics"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetSendStatistics 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<GetSendStatisticsResponse> GetSendStatisticsAsync(GetSendStatisticsRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetSendStatisticsRequestMarshaller();
            var unmarshaller = GetSendStatisticsResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, GetSendStatisticsRequest, GetSendStatisticsResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the GetSendStatistics operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetSendStatistics 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<GetSendStatisticsResponse> GetSendStatisticsAsync(GetSendStatisticsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetSendStatisticsRequestMarshaller();
            var unmarshaller = GetSendStatisticsResponseUnmarshaller.Instance;

            return InvokeAsync<GetSendStatisticsRequest,GetSendStatisticsResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        /// <summary>
        /// Returns the user's sending statistics. The result is a list of data points, representing
        /// the last two weeks of sending activity.
        /// 
        ///  
        /// <para>
        /// Each data point in the list contains statistics for a 15-minute interval.
        /// </para>
        ///  
        /// <para>
        /// This action is throttled at one request per second.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetSendStatistics service method.</param>
        /// 
        /// <returns>The response from the GetSendStatistics service method, as returned by SimpleEmailService.</returns>
        public GetSendStatisticsResponse GetSendStatistics(GetSendStatisticsRequest request)
        {
            var marshaller = new GetSendStatisticsRequestMarshaller();
            var unmarshaller = GetSendStatisticsResponseUnmarshaller.Instance;

            return Invoke<GetSendStatisticsRequest,GetSendStatisticsResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the GetSendStatistics operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetSendStatistics operation on AmazonSimpleEmailServiceClient.</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 EndGetSendStatistics
        ///         operation.</returns>
        public IAsyncResult BeginGetSendStatistics(GetSendStatisticsRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new GetSendStatisticsRequestMarshaller();
            var unmarshaller = GetSendStatisticsResponseUnmarshaller.Instance;

            return BeginInvoke<GetSendStatisticsRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 IAsyncResult invokeGetSendStatistics(GetSendStatisticsRequest getSendStatisticsRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new GetSendStatisticsRequestMarshaller().Marshall(getSendStatisticsRequest);
     var unmarshaller = GetSendStatisticsResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
        IAsyncResult invokeGetSendStatistics(GetSendStatisticsRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new GetSendStatisticsRequestMarshaller();
            var unmarshaller = GetSendStatisticsResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }
        public void GetSendStatisticsMarshallTest()
        {
            var operation = service_model.FindOperation("GetSendStatistics");

            var request = InstantiateClassGenerator.Execute<GetSendStatisticsRequest>();
            var marshaller = new GetSendStatisticsRequestMarshaller();
            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 = GetSendStatisticsResponseUnmarshaller.Instance.Unmarshall(context)
                as GetSendStatisticsResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }
        /// <summary>
        /// Initiates the asynchronous execution of the GetSendStatistics operation.
        /// <seealso cref="Amazon.SimpleEmail.IAmazonSimpleEmailService.GetSendStatistics"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetSendStatistics 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<GetSendStatisticsResponse> GetSendStatisticsAsync(GetSendStatisticsRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetSendStatisticsRequestMarshaller();
            var unmarshaller = GetSendStatisticsResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, GetSendStatisticsRequest, GetSendStatisticsResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
  /// <summary>
  /// <para>Returns the user's sending statistics. The result is a list of
  /// data points, representing the last two weeks of sending
  /// activity.</para> <para>Each data point in the list contains statistics
  /// for a 15-minute interval.</para>
  /// </summary>
  /// 
  /// <param name="getSendStatisticsRequest">Container for the necessary
  ///           parameters to execute the GetSendStatistics service method on
  ///           AmazonSimpleEmailService.</param>
  /// 
  /// <returns>The response from the GetSendStatistics service method, as
  ///         returned by AmazonSimpleEmailService.</returns>
  /// 
 public GetSendStatisticsResponse GetSendStatistics(GetSendStatisticsRequest getSendStatisticsRequest) 
 {           
     IRequest<GetSendStatisticsRequest> request = new GetSendStatisticsRequestMarshaller().Marshall(getSendStatisticsRequest);
     GetSendStatisticsResponse response = Invoke<GetSendStatisticsRequest, GetSendStatisticsResponse> (request, this.signer, GetSendStatisticsResponseUnmarshaller.GetInstance());
     return response;
 }
 /// <summary>
 /// Initiates the asynchronous execution of the GetSendStatistics operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the GetSendStatistics operation on AmazonSimpleEmailServiceClient.</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 GetSendStatisticsAsync(GetSendStatisticsRequest request, AmazonServiceCallback<GetSendStatisticsRequest, GetSendStatisticsResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new GetSendStatisticsRequestMarshaller();
     var unmarshaller = GetSendStatisticsResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<GetSendStatisticsRequest,GetSendStatisticsResponse> responseObject 
                     = new AmazonServiceResult<GetSendStatisticsRequest,GetSendStatisticsResponse>((GetSendStatisticsRequest)req, (GetSendStatisticsResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<GetSendStatisticsRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }