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

BulkPublishAsync() public method

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

Same methods

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