-
Notifications
You must be signed in to change notification settings - Fork 1.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
CreateStream
methods toIMediator
- Modification of generic constraint on
IPipelineBehavior
fromwhere TRequest notnull
towhere TRequest : IRequest<TResponse>
- Modification of generic constraint on
IRequestExceptionHandler
fromwhere TRequest notnull
towhere TRequest : IRequest<TResponse>
- Modification of generic constraint on
IRequestPostProcessor
fromwhere TRequest notnull
towhere TRequest : IRequest<TResponse>
- Request types (
IRequest
,IRequest<TResponse>
,IBaseRequest
,IStreamRequest<TResponse>
, andINotification
) moved to theMediatR.Contracts
package
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>
{