Giter Site home page Giter Site logo

Comments (2)

martinothamar avatar martinothamar commented on May 9, 2024 1

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:

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.

jeffward01 avatar jeffward01 commented on May 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.