-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for generic variance for post request handler. #1
Comments
Isn't it already variant? https://github.com/jbogard/MediatR/blob/master/src/MediatR/IHandler.cs#L43 |
The thing is that Mediator's GetPostRequestHandlers method returns handlers only with specific response type. https://github.com/jbogard/MediatR/blob/master/src/MediatR/Mediator.cs#L97 It would work fine if there would be only one response type for all requests, but if requests have different responses, then have to make post request handler for each response type. |
Do you have an example of a request/response with a post handler that isn't On Mon, Jun 2, 2014 at 8:52 AM, Māris Krivtežs notifications@github.com
|
Created sample: Seems that notification handler is not firing too. I am using StructureMap as IoC and maybe haven't configured it properly: https://github.com/marisks/mediatr-sample/blob/master/mediatr-sample/Bootstrap.cs#L17 |
Seems that generic versions has to be registered explicitly: Haven't seen that sample before. Thanks for help and great library! |
The use case for it is when after command executed to commit changes to DB.
I am using RavenDB and I'd like to have generic post request handler which will call SaveChanges on document session.
The text was updated successfully, but these errors were encountered: