Migration guide 4.1.0 > 5.0.1
See original GitHub issueIs there any plans for a migration guide, noticed Task<Unit>
being used since the latest update. Current Wiki documentation doesn’t mention anything as of yet. Noticed the release is very new so potentially in the works?
More than happy to chip in if I can help anywhere.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Migration Guides · hibernate/hibernate-orm Wiki
Hibernate's core Object/Relational Mapping functionality - Migration Guides · hibernate/hibernate-orm Wiki.
Read more >Migration Guide - Hibernate Validator
Express validation rules in a standardized way using annotation-based constraints and benefit from transparent integration with a wide variety of ...
Read more >Migration Guides - ESP32 - — ESP-IDF Programming ...
ESP-IDF 5.x Migration Guide . Migration from 4.4 to 5.0 · Migration from 5.0 to 5.1 · Migration from 5.1 to 5.2 ·...
Read more >Migration Guide from Hibernate Search 4.x to 5.0
The aim of this guide is to assist you migrating an existing application based on a fairly recent version of Hibernate Search 4,...
Read more >Release Notes Migration Toolkit for Applications 5.0
This document describes new features, known issues, and resolved issues for the Migration Toolkit for Applications 5.0. Making open source more inclusive. Red ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@TheRubble you can get rid of the Unit (specifically
return Unit.Value
) in handlers by usingAsyncRequestHandler<Request>
. Other places you’ll ever encounter the Unit areIMediator.Send
that returnsTask<Unit>
and calling handlers without MediatR in tests - no big deal.@jbogard What I don’t understand though is where the
AsyncRequestHandler<Request, Response>
did go? It’s absence now forces devs to use AsyncRequestHandler in one handlers and IRequestHandler in others - one more illogical thing for a new dev on the project to learn. Any plans to return it?Just to summarize the changes, there are 2 main flavors of requests: those that return a value, and those that do not. The ones that do not now implement
IRequest<T>
whereT : Unit
. This was to unify requests and handlers into one single type. The diverging types broke the pipeline for many containers, the unification means you can use pipelines for any kind of request.It forced me to add the
Unit
type in all cases, so I’ve added some helper classes for you.IRequestHandler<T>
- implement this and you will returnTask<Unit>
.AsyncRequestHandler<T>
- inherit this and you will returnTask
.RequestHandler<T>
- inherit this and you will return nothing (void
).For requests that do return values:
IRequestHandler<T, U>
- you will returnTask<U>
RequestHandler<T, U>
- you will returnU
I got rid of the
AsyncRequestHandler<T, U>
because it really wasn’t doing anything after the consolidation, a redundant base class.