예제 #1
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetSessionToken operation.
        /// <seealso cref="Amazon.SecurityToken.IAmazonSecurityTokenService.GetSessionToken"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetSessionToken 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 <GetSessionTokenResponse> GetSessionTokenAsync(GetSessionTokenRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new GetSessionTokenRequestMarshaller();
            var unmarshaller = GetSessionTokenResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, GetSessionTokenRequest, GetSessionTokenResponse>(request, marshaller, unmarshaller, signer, cancellationToken));
        }
예제 #2
0
        IAsyncResult invokeGetSessionToken(GetSessionTokenRequest getSessionTokenRequest, AsyncCallback callback, object state, bool synchronized)
        {
            IRequest    irequest     = new GetSessionTokenRequestMarshaller().Marshall(getSessionTokenRequest);
            var         unmarshaller = GetSessionTokenResponseUnmarshaller.GetInstance();
            AsyncResult result       = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);

            Invoke(result);
            return(result);
        }
예제 #3
0
        /// <summary>
        /// </summary>
        ///
        /// <param name="getSessionTokenRequest">Container for the necessary parameters to execute the GetSessionToken service method on
        ///           AmazonSecurityTokenService.</param>
        ///
        /// <returns>The response from the GetSessionToken service method, as returned by AmazonSecurityTokenService.</returns>
        ///
        public GetSessionTokenResponse GetSessionToken(GetSessionTokenRequest getSessionTokenRequest)
        {
            IRequest <GetSessionTokenRequest> request  = new GetSessionTokenRequestMarshaller().Marshall(getSessionTokenRequest);
            GetSessionTokenResponse           response = Invoke <GetSessionTokenRequest, GetSessionTokenResponse> (request, this.signer, GetSessionTokenResponseUnmarshaller.GetInstance());

            return(response);
        }