Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ServiceCollectionExtensions.AddMediatRClasses public #60

Closed
BalassaMarton opened this issue Feb 7, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@BalassaMarton
Copy link

commented Feb 7, 2019

Use case: message handlers are in different projects (plugins), each having its own AddXXX method for single line configuration in the hosting project. The hosting project will not pass any assembly references to MediatR, as plugin registration is separated from infrastructure setup.

@jbogard

This comment has been minimized.

Copy link
Owner

commented Feb 7, 2019

How is the hosting project calling the configuration for the plugins? They all have to use the same service collection, right?

@BalassaMarton

This comment has been minimized.

Copy link
Author

commented Feb 8, 2019

Yes, each plugin has an AddXXX(this IServiceCollection) method, the host just composes the application by calling these registration methods, and then the plugins register their application parts and message handlers in the collection. Not that I can't write the same utility method (or copy it), but making the original public looks like a one-liner.

@jbogard

This comment has been minimized.

Copy link
Owner

commented Feb 8, 2019

I don't really want to expand the public API in the root namespace. However, I'd be open to moving that assembly scanning stuff outside to a sub-namespace and making it public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.