Esempio n. 1
0
        internal GetSendStatisticsResponse GetSendStatistics(GetSendStatisticsRequest request)
        {
            var marshaller   = new GetSendStatisticsRequestMarshaller();
            var unmarshaller = GetSendStatisticsResponseUnmarshaller.Instance;

            return(Invoke <GetSendStatisticsRequest, GetSendStatisticsResponse>(request, marshaller, unmarshaller));
        }
Esempio 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));
        }
Esempio n. 3
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);
        }
Esempio 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));
        }
Esempio 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);
        }
        /// <summary>
        /// Retrieves SES statistics for the AWS account
        /// </summary>
        /// <returns></returns>
        public GetSendStatisticsResult getSendStats()
        {
            GetSendStatisticsResult ret = null;
            using (AmazonSimpleEmailServiceClient client = new AmazonSimpleEmailServiceClient(_accessKeyID, _secretAccessKeyID))
            {

                GetSendStatisticsRequest request = new GetSendStatisticsRequest();
                GetSendStatisticsResponse response = client.GetSendStatistics(request);
                ret = response.GetSendStatisticsResult;
            }

            return ret;
        }
Esempio n. 7
0
        internal GetSendStatisticsResponse GetSendStatistics(GetSendStatisticsRequest request)
        {
            var task = GetSendStatisticsAsync(request);

            try
            {
                return(task.Result);
            }
            catch (AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return(null);
            }
        }
        /// <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);
        }
  /// <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>
 /// <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)
 {
     IAsyncResult asyncResult = invokeGetSendStatistics(getSendStatisticsRequest, null, null, true);
     return EndGetSendStatistics(asyncResult);
 }
 /// <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);
 }
 /// <summary>
 /// Initiates the asynchronous execution of the GetSendStatistics operation.
 /// <seealso cref="Amazon.SimpleEmail.AmazonSimpleEmailService.GetSendStatistics"/>
 /// </summary>
 /// 
 /// <param name="getSendStatisticsRequest">Container for the necessary parameters to execute the GetSendStatistics operation on
 ///          AmazonSimpleEmailService.</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 getSendStatisticsRequest, AsyncCallback callback, object state)
 {
     return invokeGetSendStatistics(getSendStatisticsRequest, callback, state, false);
 }
        /// <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="request">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 request)
        {
            var task = GetSendStatisticsAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
        /// <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>
        /// 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;
        }
Esempio n. 17
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)
        {
            IAsyncResult asyncResult = invokeGetSendStatistics(getSendStatisticsRequest, null, null, true);

            return(EndGetSendStatistics(asyncResult));
        }
Esempio n. 18
0
 /// <summary>
 /// Initiates the asynchronous execution of the GetSendStatistics operation.
 /// <seealso cref="Amazon.SimpleEmail.AmazonSimpleEmailService.GetSendStatistics"/>
 /// </summary>
 ///
 /// <param name="getSendStatisticsRequest">Container for the necessary parameters to execute the GetSendStatistics operation on
 ///          AmazonSimpleEmailService.</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 getSendStatisticsRequest, AsyncCallback callback, object state)
 {
     return(invokeGetSendStatistics(getSendStatisticsRequest, callback, state, false));
 }
        /// <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="request">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 request)
        {
            var task = GetSendStatisticsAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
        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);
        }
        /// <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);
        }
 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;
 }