Open GunesElektronik opened 12 months ago
You should install Mediator.SourceGenerator
in the outermost project and then install Mediator.Abstractions
in all remaining projects that define handlers: https://github.com/martinothamar/Mediator#3-usage-and-abstractions
Thanks, I will try it.
it seems that it won't work. on 2.1.7
Hi! Need more specifics to understand what's going wrong. In the meantime, here are some samples showing various ways to organize multiple projects, including clean-architecture style:
ApplicationHandler
abstraction with implementations in a separate projectInternalsVisibleTo
used to share requests and handlers across projects - this one only works in 3.0 previewsHi. I have the same problem.
I’m trying to publish a notification in my Application.Core Project and catch this notification in my Demo.Server.
Project Overview:
Demo.Server (references Application.Core) with Mediator.Abstractions 2.1.7 Application.Core with Mediator.Abstractions 2.1.7 and Mediator.SourceGenerator 2.1.7 and is adding AddMediator() to a IServiceCollection.
My Application.Core is publishing a notification (for example, DeviceStatusChanged) and also has a consumer for this. My Demo.Server also has a consumer for (DeviceStatusChanged) but never receives this notification."
I hope this helps! If you have any other questions or need further assistance, feel free to ask.
There is an example for multi handler scenarios.
Hi. I have the same problem.
I’m trying to publish a notification in my Application.Core Project and catch this notification in my Demo.Server.
Project Overview:
Demo.Server (references Application.Core) with Mediator.Abstractions 2.1.7 Application.Core with Mediator.Abstractions 2.1.7 and Mediator.SourceGenerator 2.1.7 and is adding AddMediator() to a IServiceCollection.
My Application.Core is publishing a notification (for example, DeviceStatusChanged) and also has a consumer for this. My Demo.Server also has a consumer for (DeviceStatusChanged) but never receives this notification."
I hope this helps! If you have any other questions or need further assistance, feel free to ask.
Can you produce a sample project ?
I have an application in clean architecture. I wanted to switch from Mediatr to Mediator for performance reasons. But there is a problem here. The problem is that Mediator forces our objects to be in the same project as the Library. Will there be a solution for this?