Ever needed "channels" for CM's EventAggregator???

Topics: Feature Requests, Framework Services
Jan 23, 2012 at 12:31 AM

Stephan,

I've come upon this kind of need a couple of times, and I've been thinking about how to implement it internally in the viewmodels.  What I've wanted is some kind of request-response message correlation. 

I spent some hours looking for some sort of lightweight message bus to use for in-process messaging in CM, but everything I've found seems really heavy.

If anyone has any ideas for libraries to use, or code to look at, I'd be grateful.

Vikram

Jan 23, 2012 at 10:52 AM

TinyIoc also provides a messenger implementation which is quite similar to the MVVM light implementation. Heres a link to the wiki page. The NuGet package just adds a TinyIoC.cs file to your project with all the source so you can even extend it quite easily and the IoC container works quite well with CM

Jan 23, 2012 at 12:46 PM
Edited Jan 23, 2012 at 12:46 PM

yep, it's pretty straightforward

https://github.com/kmees/DiabloRL/blob/master/src/Client.Web/AppBootstrapper.cs#L96-109

Jan 23, 2012 at 12:55 PM
Edited Jan 23, 2012 at 12:56 PM

Yeah the good thing about it is that it works on WPF, SL and WP7 (although with slightly different resolution features), so you don't have to switch containers for different plattforms.