rebus-org / Rebus.ServiceProvider

:bus: Microsoft Extensions Dependency Injection container adapter for Rebus
https://mookid.dk/category/rebus
Other
66 stars 32 forks source link

AutoRegisterHandlersFromAssembly with type predicate filter #84

Open arildboifot opened 8 months ago

arildboifot commented 8 months ago

I recently found myself in the need of a more granular filter on which handlers where registered with 'AutoRegisterHandlersFromAssembly', so I created an overload like so:

public static IServiceCollection AutoRegisterHandlersFromAssemblyOf<THandler>(this IServiceCollection services, Func<Type, bool> predicate = null)

Is this something you would like a PR on?

mookid8000 commented 8 months ago

(..) Is this something you would like a PR on?

Oh yes, please 🙂