<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Unexpected Results using InvokeRequired and Multi-threading Secrets Revealed!</title>
	<atom:link href="http://goneale.com/2009/02/10/unexpected-results-using-invokerequired-and-multi-threading-secrets-revealed/feed/" rel="self" type="application/rss+xml" />
	<link>http://goneale.com/2009/02/10/unexpected-results-using-invokerequired-and-multi-threading-secrets-revealed/</link>
	<description>Graham O&#039;Neale – Deep In .NET Development: ASP.NET, MVC, jQuery, WPF, WCF, Silverlight</description>
	<lastBuildDate>Fri, 27 Aug 2010 04:30:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Bhupinder Singh.</title>
		<link>http://goneale.com/2009/02/10/unexpected-results-using-invokerequired-and-multi-threading-secrets-revealed/comment-page-1/#comment-4577</link>
		<dc:creator>Bhupinder Singh.</dc:creator>
		<pubDate>Wed, 09 Dec 2009 13:52:38 +0000</pubDate>
		<guid isPermaLink="false">http://goneale.wordpress.com/?p=252#comment-4577</guid>
		<description>This very detailed and very helpful. We were having a problem with GUI. Even though I am a C++ programmer, I was quickly able to understand and fix the C# problem after reading this article.

Thanks a lot for submitting this valuable stuff. Keep it up.</description>
		<content:encoded><![CDATA[<p>This very detailed and very helpful. We were having a problem with GUI. Even though I am a C++ programmer, I was quickly able to understand and fix the C# problem after reading this article.</p>
<p>Thanks a lot for submitting this valuable stuff. Keep it up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Esben Bjerregaard</title>
		<link>http://goneale.com/2009/02/10/unexpected-results-using-invokerequired-and-multi-threading-secrets-revealed/comment-page-1/#comment-267</link>
		<dc:creator>Esben Bjerregaard</dc:creator>
		<pubDate>Tue, 09 Jun 2009 13:27:11 +0000</pubDate>
		<guid isPermaLink="false">http://goneale.wordpress.com/?p=252#comment-267</guid>
		<description>Thanx alot! -you just saved me alot of time.

Just goggled this specific problem and ended with trillions of hits on basic Cross-Thread stuff</description>
		<content:encoded><![CDATA[<p>Thanx alot! -you just saved me alot of time.</p>
<p>Just goggled this specific problem and ended with trillions of hits on basic Cross-Thread stuff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kazi Manzur Rashid</title>
		<link>http://goneale.com/2009/02/10/unexpected-results-using-invokerequired-and-multi-threading-secrets-revealed/comment-page-1/#comment-88</link>
		<dc:creator>Kazi Manzur Rashid</dc:creator>
		<pubDate>Tue, 10 Feb 2009 02:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://goneale.wordpress.com/?p=252#comment-88</guid>
		<description>This is a simple way to raise event or call method from a child thread to update control which does not belongs to that thread.</description>
		<content:encoded><![CDATA[<p>This is a simple way to raise event or call method from a child thread to update control which does not belongs to that thread.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graham O'Neale</title>
		<link>http://goneale.com/2009/02/10/unexpected-results-using-invokerequired-and-multi-threading-secrets-revealed/comment-page-1/#comment-87</link>
		<dc:creator>Graham O'Neale</dc:creator>
		<pubDate>Tue, 10 Feb 2009 02:15:11 +0000</pubDate>
		<guid isPermaLink="false">http://goneale.wordpress.com/?p=252#comment-87</guid>
		<description>Are you describing a different way in which to invoke there Kazi?
I&#039;m not exactly sure what it is set out to achieve. Thanks for your comment though.</description>
		<content:encoded><![CDATA[<p>Are you describing a different way in which to invoke there Kazi?<br />
I&#8217;m not exactly sure what it is set out to achieve. Thanks for your comment though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kazi Manzur Rashid</title>
		<link>http://goneale.com/2009/02/10/unexpected-results-using-invokerequired-and-multi-threading-secrets-revealed/comment-page-1/#comment-86</link>
		<dc:creator>Kazi Manzur Rashid</dc:creator>
		<pubDate>Tue, 10 Feb 2009 01:04:08 +0000</pubDate>
		<guid isPermaLink="false">http://goneale.wordpress.com/?p=252#comment-86</guid>
		<description>Try This:

internal static class EventInvoker
{
    public static void Invoke(Delegate method,
    object[] args)
    {
        if (method != null)
        {
            Delegate[] delegates = method.GetInvocationList();

            if (delegates.Length &gt; 0)
            {
                for(int i = 0; i &lt; delegates.Length; i++)
                {
                    Delegate del = delegates[i];

                    if (del.Target is System.ComponentModel.ISynchronizeInvoke)
                    {
                        ((System.ComponentModel.ISynchronizeInvoke) del.Target).Invoke (del, args);
                    }
                    else
                    {
                        del.DynamicInvoke(args);
                    }
                }
            }
        }
    }
}

Then in Client:

public event EventHandler Paused;
		private void OnPaused()
		{
			if (Paused != null)
			{
				EventInvoker.Invoke(Paused, new object[] {this, EventArgs.Empty});
			}
		}</description>
		<content:encoded><![CDATA[<p>Try This:</p>
<p>internal static class EventInvoker<br />
{<br />
    public static void Invoke(Delegate method,<br />
    object[] args)<br />
    {<br />
        if (method != null)<br />
        {<br />
            Delegate[] delegates = method.GetInvocationList();</p>
<p>            if (delegates.Length &gt; 0)<br />
            {<br />
                for(int i = 0; i &lt; delegates.Length; i++)<br />
                {<br />
                    Delegate del = delegates[i];</p>
<p>                    if (del.Target is System.ComponentModel.ISynchronizeInvoke)<br />
                    {<br />
                        ((System.ComponentModel.ISynchronizeInvoke) del.Target).Invoke (del, args);<br />
                    }<br />
                    else<br />
                    {<br />
                        del.DynamicInvoke(args);<br />
                    }<br />
                }<br />
            }<br />
        }<br />
    }<br />
}</p>
<p>Then in Client:</p>
<p>public event EventHandler Paused;<br />
		private void OnPaused()<br />
		{<br />
			if (Paused != null)<br />
			{<br />
				EventInvoker.Invoke(Paused, new object[] {this, EventArgs.Empty});<br />
			}<br />
		}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DotNetShoutout</title>
		<link>http://goneale.com/2009/02/10/unexpected-results-using-invokerequired-and-multi-threading-secrets-revealed/comment-page-1/#comment-85</link>
		<dc:creator>DotNetShoutout</dc:creator>
		<pubDate>Tue, 10 Feb 2009 00:32:58 +0000</pubDate>
		<guid isPermaLink="false">http://goneale.wordpress.com/?p=252#comment-85</guid>
		<description>&lt;strong&gt;Unexpected Results using InvokeRequired and Multi-threading Secrets Revealed!...&lt;/strong&gt;

Thank you for submitting this cool story - Trackback from DotNetShoutout...</description>
		<content:encoded><![CDATA[<p><strong>Unexpected Results using InvokeRequired and Multi-threading Secrets Revealed!&#8230;</strong></p>
<p>Thank you for submitting this cool story &#8211; Trackback from DotNetShoutout&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
