Hi guys,
I need an alternative for Dispatcher
(.net 3.0) to use for a windows service (done in .net 2.0). Can you give me some idea how to achieve something like that or point me some links?
I know that a dispatcher has a SynchronizationContext
behind, but I don't know how I can use a SynchronizationContext
into a service.
If you think that I should stick to the Dispatcher
(.net 3.0) ... how can I manipulate it (OnServiceStop
, OnServiceStart
)
edited: More details (see also...here)
Idea is that I would like to host into my windows service some extensions/plugins which would communicate between each-other through a method ExecuteCommand(type, params)
.
This method also raises an event to the service in order to receive results if it was executed from inside the plugin. Each plugin could have its own thread from where it calls this method ExecuteCommand
so I would like to gather and synchronize all the calls into one thread (main service thread) in order to return the result appropriately.
This is why Dispatcher came into play. But I would like to have, maybe, something in .net 2.0 or do you think Dispatcher is good in my case?
Thanks.