In my Windows 8.1 applications i have multiple events, publishers and subscribers.
Event A or B or C can be published by multiple publishers and can be received by multiple subscribers. All these entities have many to many relationship. So obviously decoupling and code maintainability comes into picture. I have decided to use Event Aggregator pattern or Event broker pattern. http://martinfowler.com/eaaDev/EventAggregator.html.
Info which i got from here https://social.msdn.microsoft.com/Forums/en-US/85b62a26-dd77-43db-8c2b-25b76d7129a1/use-events-or-delegates-in-my-application?forum=csharpgeneral. Thanks to Magnus for the information.
I have checked that Prism library provided Event Aggregator framework. So the portable library of Prism EventPubSub solves the purpose in Windows 8.1 But here i see the c# langauge events are not used instead objects are used as events and delegates as event handlers.Probably because events can not be used as types.
Checked couple of more links like http://msforge.net/blogs/paki/archive/2007/11/20/EventBroker-implementation-in-C_2300_-full-source-code.aspx which displays the event broker pattern by using delegates.
i would like to confirm if events itself can participate in the event aggregator pattern ?
cheers,
Saurav