-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Migration Guide 9.x to 10.0
Jimmy Bogard edited this page Aug 22, 2022
·
4 revisions
This release includes the following breaking changes in the API:
- Addition of
CreateStreammethods toIMediator - Modification of generic constraint on
IPipelineBehaviorfromwhere TRequest notnulltowhere TRequest : IRequest<TResponse> - Modification of generic constraint on
IRequestExceptionHandlerfromwhere TRequest notnulltowhere TRequest : IRequest<TResponse> - Modification of generic constraint on
IRequestPostProcessorfromwhere TRequest notnulltowhere TRequest : IRequest<TResponse> - Request types (
IRequest,IRequest<TResponse>,IBaseRequest,IStreamRequest<TResponse>, andINotification) moved to theMediatR.Contractspackage
For the IMediator change, it will likely only affect manually created implementations for testing purposes.
The modification of the generic constraints affects existing open generic implementations. These will likely need to include an additional constraint:
public class GenericPipelineBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
+ where TRequest : IRequest<TResponse>
{