Comments (5)
Is there a way to define a sensible limit internally, but then allow for this to be configurable?
from mediatr.
@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.
Gah. Care to submit a PR?
from mediatr.
@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.
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)
- Seperate Interfaces to Contract project to provide abstraction layer HOT 8
- Improve base package readme
- Implement IRequest, how to enter Behavior HOT 1
- IRequestExceptionHandler from other project not loaded
- Question:
- Question: How I can setup MediatR 12.1.0 in Ninject module? HOT 2
- How do I register INotification with generics? HOT 2
- long running INotificationHandler HOT 1
- Question: Can multiple MediatR handlers be packaged into a single class HOT 2
- .NET8 upgrade from .NET Core 2.1 : Command cannot be used as type parameter 'TRequest' for 'IRequestHandler<TRequest>' HOT 3
- Irequest in library and handler in web api project HOT 2
- what use net8 aot publish
- v12.3.0 Breaking Change HOT 13
- Question: Why IRequestExceptionHandler is not catching? HOT 1
- Question: How to register generic requests HOT 6
- Can't register generic handlers in latest version HOT 5
- Question: Why MediatR does not support ValueTasks ?
- Question: Why MediatR does not support ValueTasks ?
- Validation is not invoked when IRequest has no Result
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 mediatr.