I currently use this method for assigning topic names:
void SetTopicNames(IServiceBusBusFactoryConfigurator cfg)
{
cfg.Message<IExampleMessage>(x => x.SetEntityName("ExampleTopic"));
}
I want to call the .Message function with types that are only known at runtime, so something like this:
void SetTopicNames(IServiceBusBusFactoryConfigurator cfg)
{
var messageType = typeof(IExampleMessage);
cfg.Message(messageType, x => x.SetEntityName("ExampleTopic"));
}
But there doesn't appear to be such a function.
How can I achieve this?