Note that there are some explanatory texts on larger screens.

plurals
  1. POAlternative of Dispatcher class (from .net 3.0) to use in .net 2.0 context
    primarykey
    data
    text
    <p>I need an alternative for <a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher.aspx" rel="nofollow noreferrer"><code>Dispatcher</code></a> (.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?</p> <p>I know that a dispatcher has a <code>SynchronizationContext</code> behind, but I don't know how I can use a <code>SynchronizationContext</code> into a service.</p> <p>If you think that I should stick to the <code>Dispatcher</code> (.net 3.0) ... how can I manipulate it (<code>OnServiceStop</code>, <code>OnServiceStart</code>)</p> <p><strong>edited:</strong> <em>More details</em> (see also...<a href="https://stackoverflow.com/questions/3447189/c-multiple-sources-different-threads-one-event-handler">here</a>) </p> <p>Idea is that I would like to host into my windows service some extensions/plugins which would communicate between each-other through a method <code>ExecuteCommand(type, params)</code>. </p> <p>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 <code>ExecuteCommand</code> so I would like to gather and synchronize all the calls into one thread (main service thread) in order to return the result appropriately.</p> <p>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? </p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload