jbogard / MediatR

Simple, unambitious mediator implementation in .NET
Apache License 2.0
11.21k stars 1.18k forks source link

Move IRequestHandler, IStreamRequestHandler and INotificationHandler to contracts assembly #774

Closed yinzara closed 2 years ago

yinzara commented 2 years ago

I am a huge fan of Domain Driven Design and Mediatr is one of the most important tools in keeping a Clean Architecture based on Domain Driven Design.

I love the addition of the new Contracts assembly as it allows my domain/core tier to only reference the Contracts assembly and stay pure in the intent.

However, I implement my INotificationHandler(s), IRequestHandler(s) and IStreamRequestHandler(s) in my domain tier as those are part of my business logic and very important to have in my domain tier.

I'd also really love IPipelineBehavior to be moved as well, but I'm willing to accept just the handlers :-)

Could we move those interfaces to the Contracts assembly as well?

jbogard commented 2 years ago

I'm confused, there's not that many public classes in MediatR. Which classes would you not want in this new package?

jbogard commented 2 years ago

As for moving to the Contracts package, see this discussion: https://github.com/jbogard/MediatR/issues/693