Amazon.CognitoSync.AmazonCognitoSyncClient.GetCognitoEventsAsync C# (CSharp) Method

GetCognitoEventsAsync() public method

Initiates the asynchronous execution of the GetCognitoEvents operation.
public GetCognitoEventsAsync ( Amazon.CognitoSync.Model.GetCognitoEventsRequest request, GetCognitoEventsResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
request Amazon.CognitoSync.Model.GetCognitoEventsRequest Container for the necessary parameters to execute the GetCognitoEvents operation on AmazonCognitoSyncClient.
callback GetCognitoEventsResponse>.AmazonServiceCallback An Action delegate that is invoked when the operation completes.
options Amazon.Runtime.AsyncOptions A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
return void
        public void GetCognitoEventsAsync(GetCognitoEventsRequest request, AmazonServiceCallback<GetCognitoEventsRequest, GetCognitoEventsResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller = new GetCognitoEventsRequestMarshaller();
            var unmarshaller = GetCognitoEventsResponseUnmarshaller.Instance;
            Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
            if(callback !=null )
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
                    AmazonServiceResult<GetCognitoEventsRequest,GetCognitoEventsResponse> responseObject 
                            = new AmazonServiceResult<GetCognitoEventsRequest,GetCognitoEventsResponse>((GetCognitoEventsRequest)req, (GetCognitoEventsResponse)res, ex , ao.State);    
                        callback(responseObject); 
                };
            BeginInvoke<GetCognitoEventsRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }

Same methods

AmazonCognitoSyncClient::GetCognitoEventsAsync ( Amazon.CognitoSync.Model.GetCognitoEventsRequest request, System cancellationToken = default(CancellationToken) ) : Task