public DeleteTopicAsync ( |
||
request | Container for the necessary parameters to execute the DeleteTopic operation on AmazonSimpleNotificationServiceClient. | |
callback | DeleteTopicResponse>.AmazonServiceCallback | An Action delegate that is invoked when the operation completes. |
options | 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 DeleteTopicAsync(DeleteTopicRequest request, AmazonServiceCallback<DeleteTopicRequest, DeleteTopicResponse> callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var marshaller = new DeleteTopicRequestMarshaller();
var unmarshaller = DeleteTopicResponseUnmarshaller.Instance;
Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult<DeleteTopicRequest,DeleteTopicResponse> responseObject
= new AmazonServiceResult<DeleteTopicRequest,DeleteTopicResponse>((DeleteTopicRequest)req, (DeleteTopicResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke<DeleteTopicRequest>(request, marshaller, unmarshaller, options, callbackHelper);
}
AmazonSimpleNotificationServiceClient::DeleteTopicAsync ( |
|
AmazonSimpleNotificationServiceClient::DeleteTopicAsync ( string topicArn, System cancellationToken = default(CancellationToken) ) : Task |
|
AmazonSimpleNotificationServiceClient::DeleteTopicAsync ( string topicArn, DeleteTopicResponse>.AmazonServiceCallback |
public void DeleteTopic(string topicName) { using (var client = new AmazonSimpleNotificationServiceClient(_credentials)) { var topic = client.ListTopicsAsync().Result.Topics.SingleOrDefault(t => t.TopicArn == topicName); client.DeleteTopicAsync(topic.TopicArn).Wait(); } }