Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.OptInPhoneNumberAsync C# (CSharp) 메소드

OptInPhoneNumberAsync() 공개 메소드

Initiates the asynchronous execution of the OptInPhoneNumber operation.
public OptInPhoneNumberAsync ( OptInPhoneNumberRequest request, OptInPhoneNumberResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
request OptInPhoneNumberRequest Container for the necessary parameters to execute the OptInPhoneNumber operation on AmazonSimpleNotificationServiceClient.
callback OptInPhoneNumberResponse>.AmazonServiceCallback An Action delegate that is invoked when the operation completes.
options 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.
리턴 void
        public void OptInPhoneNumberAsync(OptInPhoneNumberRequest request, AmazonServiceCallback<OptInPhoneNumberRequest, OptInPhoneNumberResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller = new OptInPhoneNumberRequestMarshaller();
            var unmarshaller = OptInPhoneNumberResponseUnmarshaller.Instance;
            Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
            if(callback !=null )
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
                    AmazonServiceResult<OptInPhoneNumberRequest,OptInPhoneNumberResponse> responseObject 
                            = new AmazonServiceResult<OptInPhoneNumberRequest,OptInPhoneNumberResponse>((OptInPhoneNumberRequest)req, (OptInPhoneNumberResponse)res, ex , ao.State);    
                        callback(responseObject); 
                };
            BeginInvoke<OptInPhoneNumberRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }

Same methods

AmazonSimpleNotificationServiceClient::OptInPhoneNumberAsync ( OptInPhoneNumberRequest request, System cancellationToken = default(CancellationToken) ) : Task
AmazonSimpleNotificationServiceClient