Closed mhinze closed 10 years ago
looks good, sent you a PR with an Example test, your probably going to have to add it manually to the project if you decide to merge it, I only have VS 2013 and didnt want to muck up your project file with all the new crap
@mxmissile thanks!
This is pretty self explanatory, but I updated some sample client code.
Would it be worth considering adding marker interfaces IAsyncCommand and IAsyncQuery so that clients of the Mediator know whether to call the async Send/Request method or not for a given query? My concern is that for a given query/command, the client would not know which method to invoke on the mediator--and invoking the wrong one will fail. If a given query/command supports both async and synchronous, then the message and the handler will need to implement both interfaces indicating such.
I would also suggest that the async handler interfaces Handle method be renamed to HandleAsync. In addition to following the async naming conventions, this will keep the reflection clean in the mediator in the case where a given handler implements both versions.
@mattscully Adding the new markers doesn't take away anything, and enables a migration path to async. My only concern is adding to the concept count. Good call also on HandleAsync
open for comments.. @mxmissile?