问题
DryIoc can't seem to Resolve a IAsyncRequestHandler.
It throws
"An exception of type 'DryIoc.ContainerException' occurred in DryIoc.dll but was not handled in user code Additional information: Unable to resolve MediatR.IRequestHandler.
Where no service registrations found
and number of Rules.FallbackContainers: 0
and number of Rules.UnknownServiceResolvers: 0"
which is weird because it should be resolving a IAsyncRequestHandler.
Another weird thing is that the code runs well on Net.Fiddle (check here)
I'm using VS 2015 Update 3 in Windows 10 Home, MediatR 3.0.0, DryIoc.dll 2.10.0, .Net framework 4.5 (also tried with 4.6.1).
Am I registering it in a wrong way? This should be straightforward.
Related: What is the best way to register all handlers?
来源:https://stackoverflow.com/questions/42177973/dryioc-with-mediatr-iasyncrequesthandler-resolve-exception