如何在Microsoft.Azure.ServiceBus 2.0.0中验证TopicName和SubscriptionName [英] How to validate TopicName and SubscriptionName in Microsoft.Azure.ServiceBus 2.0.0
问题描述
我正在编写测试用例以在C#中使用主题名称和订阅名称配置Microsoft.Azure.ServiceBus。
虽然我提供了错误的输入,但测试用例正在通过。如何查看主题名称或订阅名称
是否存在。
I am writing test cases to Configure Microsoft.Azure.ServiceBus with Topic Name and Subscription Name in C#.
The test case is passing although I am providing wrong inputs. How can I check if Topic Name or Subscription Name
exists or not.
您能否尽快帮助我们。
推荐答案
您好Aniruddha Kumbhar,
Hi Aniruddha Kumbhar,
感谢您在此发帖。
对于您的问题,请尝试使用TopicExists(String)方法检查服务命名空间中是否存在主题,并使用SubscriptionExists(String,String)方法来确定服务命名空间中是否存在订阅。
For your question, try to use TopicExists(String) Method to check whether a topic exists in the service namespace and use SubscriptionExists(String, String) Method to dtermine whether a subscription exists in the service namespace.
有关详细信息,请参阅msdn文档。
For more details, please refer to the msdn documents.
TopicExists(字符串)方法
SubscriptionExists(字符串,字符串)方法
最诚挚的问候,
Wendy
这篇关于如何在Microsoft.Azure.ServiceBus 2.0.0中验证TopicName和SubscriptionName的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!