public class RequestExceptionProcessorBehavior<TRequest, TResponse, TException> : IRequestExceptionHandler<TRequest, TResponse, TException>
where TRequest : notnull where TException : Exception
{
public Task Handle(TRequest request, TException exception, RequestExceptionHandlerState<TResponse> state, CancellationToken cancellationToken)
{
throw new NotImplementedException();
}
}
will throw an exception on startup:
System.ArgumentException: Error registering the generic handler type: PMCM.BlazorApp.Core.Pipeline.RequestExceptionProcessorBehavior`3. When registering generic requests with more than two type parameters, each type parameter must have at least one constraint of type interface or class.
The example code in https://github.com/jbogard/MediatR/wiki#exception-handler-pipeline-step
will throw an exception on startup:
System.ArgumentException: Error registering the generic handler type: PMCM.BlazorApp.Core.Pipeline.RequestExceptionProcessorBehavior`3. When registering generic requests with more than two type parameters, each type parameter must have at least one constraint of type interface or class.