mhinze / ShortBus

In-process mediator with low-friction API
MIT License
210 stars 41 forks source link

Support Targets With Multiple Query Handler Implementations #10

Closed dvins closed 10 years ago

dvins commented 10 years ago

Enhanced the Mediator.ProcessQueryWithHandler and Mediator.ProcessQueryWithHandlerAsync methods so they perform a more specific method search against the resolved handler. This is accomplished by providing parameter criteria using the IQuery type provided as part of the method call. Doing so allows us to find the correct Handle method when the target implements two or more handler interfaces. Otherwise, we would receive an AmbiguousMatchException.

mhinze commented 10 years ago

Thank you for this fix.

dvins commented 10 years ago

No problem, I wasn't sure if it was a fix or an enhancement! Great job on Shortbus. :+1: