tags:

views:

218

answers:

2

I had to design and implement my own publish subscribe eventing to satisfy the requirements of a dynamic UI Winform design. Is there any .Net library that supports pub/sub out there that I can compare mine and improve?

+1  A: 

Why not start with this list-based publish/subscribe pattern (using WCF) on MSDN?

moobaa
A: 

Actually I went further than that. For example you can create a SystemEvent and publish it on a subject with a name of 'Application.UI.TreeInstance.[InstanceName].Node.Clicked' and if you register for anything like 'Application.' or 'Aplication.UI.' or 'Application.UI.TreeInstance.[InstanceName].Node.*' or the full subject you will get called on your delegate through multicast and receive the event. The SystemEvent you can define as you want; it has a ValueNamePairCollection and a public interface to get the data out as you feel like. You can register for synchonous and asynchronous processing and offcourse Unregister as well. My UI elements now process events that they care without having to know who publishes them. If the community has any interest in stuff like this I could package up the code and make it available so we can all share and improve. I have tested it thoroully and works 100%.Also I wrote some monitoring GUI that you can see in real time what is happening with publications and subscriptions as well as registrations and unregistrations.

Neo Christo
I would be interested in this!
Todd Stout