I have a NServiceBus project and it maps objects in my assemblies that implement IHandleMessage<Type>
.
I'm wondering if there is any way to get a list of all mappings of Classes to their Handlers?
I have a NServiceBus project and it maps objects in my assemblies that implement IHandleMessage<Type>
.
I'm wondering if there is any way to get a list of all mappings of Classes to their Handlers?
我想您可能正在寻找 MessageHandlerRegistry https://github.com/Particular/NServiceBus/blob/463f464c25bd71c7d6dbb522484e452ea47214c1/src/NServiceBus.Core/Unicast/IMessageHandlerRegistry.cs
我在我的项目中使用它来调度从 EventStore 检索到的事件,如下所示:https ://github.com/volak/Aggregates.NET/blob/master/src/Aggregates.NET.Consumer/NServicebusDispatcher.cs
看起来这个类在 6.0 中消失了——所以这可能值得知道。