你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ServiceBusAdministrationClient.GetNamespacePropertiesAsync 方法

定义

获取与当前使用的命名空间相关的信息。

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.ServiceBus.Administration.NamespaceProperties>> GetNamespacePropertiesAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member GetNamespacePropertiesAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.ServiceBus.Administration.NamespaceProperties>>
override this.GetNamespacePropertiesAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.ServiceBus.Administration.NamespaceProperties>>
Public Overridable Function GetNamespacePropertiesAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of NamespaceProperties))

参数

cancellationToken
CancellationToken

一个可选 CancellationToken 实例,用于发出取消操作的请求信号。

返回

NamespaceProperties 包含命名空间信息。

例外

  • 操作超时。在这种情况下, Reason 将设置为 ServiceTimeout
  • 服务器繁忙。 在重试操作之前,应等待。 在这种情况下,失败原因将设置为 ServiceBusy
  • 发生内部错误或意外异常。 在这种情况下,失败原因将设置为 GeneralError

注解

适用于任何声明 (发送/侦听/管理) 。

适用于