Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.AddPermissionAsync C# (CSharp) Method

AddPermissionAsync() public method

Initiates the asynchronous execution of the AddPermission operation.
public AddPermissionAsync ( AddPermissionRequest request, AddPermissionResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
request Amazon.SimpleNotificationService.Model.AddPermissionRequest Container for the necessary parameters to execute the AddPermission operation on AmazonSimpleNotificationServiceClient.
callback AddPermissionResponse>.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 AddPermissionAsync(AddPermissionRequest request, AmazonServiceCallback<AddPermissionRequest, AddPermissionResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller = new AddPermissionRequestMarshaller();
            var unmarshaller = AddPermissionResponseUnmarshaller.Instance;
            Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
            if(callback !=null )
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
                    AmazonServiceResult<AddPermissionRequest,AddPermissionResponse> responseObject 
                            = new AmazonServiceResult<AddPermissionRequest,AddPermissionResponse>((AddPermissionRequest)req, (AddPermissionResponse)res, ex , ao.State);    
                        callback(responseObject); 
                };
            BeginInvoke<AddPermissionRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }

Same methods

AmazonSimpleNotificationServiceClient::AddPermissionAsync ( AddPermissionRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonSimpleNotificationServiceClient::AddPermissionAsync ( string topicArn, string label, List awsAccountId, List actionName, System cancellationToken = default(CancellationToken) ) : Task
AmazonSimpleNotificationServiceClient::AddPermissionAsync ( string topicArn, string label, List awsAccountId, List actionName, AddPermissionResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
AmazonSimpleNotificationServiceClient