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

ListRecordsAsync() public method

Initiates the asynchronous execution of the ListRecords operation.
public ListRecordsAsync ( Amazon.CognitoSync.Model.ListRecordsRequest request, ListRecordsResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
request Amazon.CognitoSync.Model.ListRecordsRequest Container for the necessary parameters to execute the ListRecords operation on AmazonCognitoSyncClient.
callback ListRecordsResponse>.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 ListRecordsAsync(ListRecordsRequest request, AmazonServiceCallback<ListRecordsRequest, ListRecordsResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller = new ListRecordsRequestMarshaller();
            var unmarshaller = ListRecordsResponseUnmarshaller.Instance;
            Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
            if(callback !=null )
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
                    AmazonServiceResult<ListRecordsRequest,ListRecordsResponse> responseObject 
                            = new AmazonServiceResult<ListRecordsRequest,ListRecordsResponse>((ListRecordsRequest)req, (ListRecordsResponse)res, ex , ao.State);    
                        callback(responseObject); 
                };
            BeginInvoke<ListRecordsRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }

Same methods

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