Comments (2)
Hi!
I think I understand why it happens, you have the source generator package installed in the AppConsole project and then have internal handlers defined in a different project right? So the generated code for invoking handlers is referring directly to the handler classes (inside AddMediator
there is code that is doing AddSingleton<ICommandHandler<...>, ConcreteHandler>
for example, so we need access to ConcreteHandler
), which is what is causing this issue.
I think there are two ways to deal with this:
- Use public
- Ues InternalsVisibleToAttribute
I cant think of anything that we can do in the source generator to improve this at the moment, since the generated code needs to be able to reference the type where the source generator package is installed. So we have the same limitations here as in any C# code, its just a bit hidden due to being generated code. Maybe I should have some more diagnostics/warnings for this. Thanks for bringing it up.
from mediator.
This helps alot! Sorry for the long response back! Thank you!
It is on my 'to-do' list to build a Roslyn Analyzer for this GREAT LIBURARY that will check if handlers are marked as 'internal' and other things (that you suggest). As of now it will only check if the handlers are internal, I don't have needs yet for other features. But i would love to add some more features!
Thanks again!
from mediator.
Related Issues (20)
- AddMediator(config => ..) not working HOT 4
- Run NotificationHandlers in parallel HOT 17
- Usage without dependency injection HOT 2
- Support for internal objects that implement IRequest. HOT 2
- SQL Transactions with a pipeline HOT 1
- Is it possible to get a Courier design similar to another library in Mediatr HOT 2
- Suggestion: Consider moving the analyzing to a dedicated analyzer HOT 2
- Multilayered app problem HOT 6
- Generator 'IncrementalMediatorGenerator' failed to initialize under .net 8 (8.0.0.100) and Sonoma 14.1 HOT 1
- DefaultServiceLifetime.Transient registers Mediator as transient too as opposed to ReadMe HOT 7
- Proposal: Mediator 3.0 design to support multiple configuration and fast switching. HOT 1
- Empty Handler needed in order to work with behavoiur pipeline HOT 2
- Sample projects don't work in isolation HOT 3
- different Request/Command/Query HOT 2
- Native AOT HOT 2
- Mediator.MissingMessageHandlerException Help
- Incorrect switch case order in polymorphic notifications HOT 3
- Issue on Project with Mediator and MassTransit HOT 1
- Support generic handlers HOT 3
- Move Interfaces to Mediatr Contracts Package.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediator.