Giter Club home page Giter Club logo

Comments (5)

hisuwh avatar hisuwh commented on July 17, 2024 1

Is there a way to define a sensible limit internally, but then allow for this to be configurable?

from mediatr.

hisuwh avatar hisuwh commented on July 17, 2024

@jbogard any chance of a 12.2.1 to fix #989

If and when I get some time I can look at the above as I have implemented generic handlers in a few projects.

from mediatr.

jbogard avatar jbogard commented on July 17, 2024

Gah. Care to submit a PR?

from mediatr.

zachpainter77 avatar zachpainter77 commented on July 17, 2024

@jbogard I have a fix for the above issue.. My only question is what limitations should be present? What I mean is, should we let the user define handlers that have 10 type parameters, each with no constraint? You can see how this could be problematic for the user, right? My solution is to allow more than one generic type parameter but throw errors if the max number of generic type params is exceeded OR the max number of concrete class combinations is exceed OR if a timeout occurs. My question is.. what should those limitations be?

I'm also trying to figure out a way to test these scenarios since even defining a class that should throw an exception does so for all tests that call AddMediatR.

So, any discussion around this is welcome. I think I'm just going to create a PR and let discussion take place there.

from mediatr.

zachpainter77 avatar zachpainter77 commented on July 17, 2024

yes, I think there is a way to do this.. I will set up some configuration options with default values that can be overridden when calling AddMediatR.. I will have a PR coming today. We can probably discuss what is sensible in terms of default limitations in that thread.

from mediatr.

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.