I am trying to add a custom filter to the publish-action on the publishing side. However, to register a custom filter, I need to pass an instance of IConfigurationServiceProvider.
When using asp.net core, this would not be a problem as there are many examples around. That is unfortionately not the case for an application using the "full" .net 4.7.2
Here is some samplecode to further illustrate what I am trying to do:
var busControl = Bus.Factory.CreateUsingRabbitMq(config =>
{
config.Host(RabbitMqHostUrl, h =>
{
h.Username(RabbitMqUsername);
h.Password(RabbitMqPassword);
});
config.UsePublishFilter(typeof(MyCustomFilter<>), Instance_of_IConfigurationServiceProvider);
});