问题描述
新 NET Standard Microsoft.Azure.ServiceBus 中 NamespaceManager 的等效项是什么?
What's the equivalent of NamespaceManager in the new NET Standard Microsoft.Azure.ServiceBus?
我使用 WindowsAzure.ServiceBus 来做一些事情,比如对队列中的消息进行计数......
I've used WindowsAzure.ServiceBus to do things like count messages in a queue ...
var namespaceManager = NamespaceManager.CreateFromConnectionString(SbConnectionString);
var count = namespaceManager.GetQueue(queueName).MessageCount;
转移到新的 Microsoft.Azure.ServiceBus .NET Standard 库,虽然它有像 QueueClient 和 TopicClient 这样的类,但它没有任何 NamespaceManager
Moving over to the new Microsoft.Azure.ServiceBus .NET Standard library, but whilst it's got classes like QueueClient and TopicClient, it's not got any NamespaceManager
如何在新的 .NET Standard 库中进行消息计数?
How can you could do message counts in the new .NET Standard library?
推荐答案
提供更新:
现在已在 Microsoft.Azure.ServiceBus.Management;
命名空间下实现并可用.
This is now implemented and available under the Microsoft.Azure.ServiceBus.Management;
namespace.
NamespaceManager
现在称为 ManagementClient
并且具有(大致)相同的可用端点.
NamespaceManager
is now called ManagementClient
and has (roughly) the same endpoints available.
这篇关于新 NET 标准 Microsoft.Azure.ServiceBus 中 NamespaceManager.GetQueue.MessageCount 的等价物是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!