Closed paulb2015 closed 1 year ago
There was a new overload added, maybe cast to object
first? Which overload is being used here?
It's using:
Task<TResponse> Send<TResponse>( IRequest<TResponse> request, CancellationToken cancellationToken = default( CancellationToken ) );
Casting to an object solves the problem.
Thank you
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
Since upgrading from 11.1.0 to 12.0.1, dynamic dispatch no longer works and a RuntimeBinderException is thrown.
Code using 12.0.1:
Result:
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'The type 'Ping' cannot be used as type parameter 'TRequest' in the generic type or method 'MediatR.ISender.Send<TRequest>(TRequest, System.Threading.CancellationToken)'. There is no implicit reference conversion from 'Ping' to 'MediatR.IRequest'.'
Code using 11.1.0:
Result:
Pong