<?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: Unity Application Block Event Broker</title>
	<atom:link href="http://RandyPatterson.com/index.php/2008/05/02/unity-application-block-event-broker/feed/" rel="self" type="application/rss+xml" />
	<link>http://RandyPatterson.com/index.php/2008/05/02/unity-application-block-event-broker/</link>
	<description>Code To Live, Live To Code</description>
	<lastBuildDate>Wed, 08 Sep 2010 06:25:33 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Oleg Sych</title>
		<link>http://RandyPatterson.com/index.php/2008/05/02/unity-application-block-event-broker/comment-page-1/#comment-8</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Sun, 04 May 2008 00:21:31 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/2008/05/02/UnityApplicationBlockEventBroker.aspx#comment-8</guid>
		<description>What would be the advantage in using the Simple Event Broker compared to something like this:

public static class MyEvents {
    public static event EventHandler TransactionComplete;
    public static void OnTransactionComplete(object sender, EventArgs e) { 
        if (TransactionComplete != null)
            TransactionComplete(sender, e);
    };
}

class Publisher {
    void DoStuff() {
        MyEvents.OnTransactionComplete(this, new EventArgs());
    }    
}

class Subscriber {
    public Subscriber() {
        MyEvents.TransactionComplete += TransactionCompleteHandler;
    }

    public void TransactionCompleteHandler(object sender, EventArgs e) {   
        //Do Something.....   
    }  
}</description>
		<content:encoded><![CDATA[<p>What would be the advantage in using the Simple Event Broker compared to something like this:</p>
<p>public static class MyEvents {<br />
    public static event EventHandler TransactionComplete;<br />
    public static void OnTransactionComplete(object sender, EventArgs e) {<br />
        if (TransactionComplete != null)<br />
            TransactionComplete(sender, e);<br />
    };<br />
}</p>
<p>class Publisher {<br />
    void DoStuff() {<br />
        MyEvents.OnTransactionComplete(this, new EventArgs());<br />
    }<br />
}</p>
<p>class Subscriber {<br />
    public Subscriber() {<br />
        MyEvents.TransactionComplete += TransactionCompleteHandler;<br />
    }</p>
<p>    public void TransactionCompleteHandler(object sender, EventArgs e) {<br />
        //Do Something&#8230;..<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
