<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>C# Live</title>
	<atom:link href="http://csharplive.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://csharplive.wordpress.com</link>
	<description>Living with C#</description>
	<lastBuildDate>Sat, 18 Feb 2012 07:33:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='csharplive.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/9789e81c55e464e4ca3fdd59249c3515?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>C# Live</title>
		<link>http://csharplive.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://csharplive.wordpress.com/osd.xml" title="C# Live" />
	<atom:link rel='hub' href='http://csharplive.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Application Architecture</title>
		<link>http://csharplive.wordpress.com/2011/02/25/application-architecture/</link>
		<comments>http://csharplive.wordpress.com/2011/02/25/application-architecture/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 19:50:58 +0000</pubDate>
		<dc:creator>Faraz Masood Khan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[O/R Mapping]]></category>
		<category><![CDATA[Object Relational Mapping]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Application Architecture]]></category>

		<guid isPermaLink="false">https://csharplive.wordpress.com/2011/02/25/application-architecture/</guid>
		<description><![CDATA[I believed that business layer and database layer are conceptual layers or set of classes that serves particular domain operations rather than physical classes. However I usually came across projects which contains classes like BusinessLayer or DataAccessLayer and thousands of functions, you can easily find single function (in business layer) with 10 to 20 switch [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=107&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I believed that business layer and database layer are conceptual layers or set of classes that serves particular domain operations rather than physical classes. However I usually came across projects which contains classes like BusinessLayer or DataAccessLayer and thousands of functions, you can easily find single function (in business layer) with 10 to 20 switch cases to satisfy business need or client customization need. This architecture is not robust and maintainable at all. Following is a very simple architecture I have develop/followed far (… In progress )</p>
<p><a href="http://csharplive.files.wordpress.com/2011/02/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://csharplive.files.wordpress.com/2011/02/image_thumb.png?w=571&#038;h=667" alt="image" width="571" height="667" border="0" /></a></p>
<p>&nbsp;</p>
<p>For latest article visit: <a title="Site for all about technology." href="http://www.feedbook.org" target="_blank">Feedbook</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/csharplive.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/csharplive.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/csharplive.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/csharplive.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/csharplive.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/csharplive.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/csharplive.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/csharplive.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/csharplive.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/csharplive.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/csharplive.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/csharplive.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/csharplive.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/csharplive.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=107&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharplive.wordpress.com/2011/02/25/application-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc7e21530c7e2577f02bf4183c0dafc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">faraz</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2011/02/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>ASP.NET Detect Page Refresh</title>
		<link>http://csharplive.wordpress.com/2011/01/04/asp-net-detect-page-refresh/</link>
		<comments>http://csharplive.wordpress.com/2011/01/04/asp-net-detect-page-refresh/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 19:13:45 +0000</pubDate>
		<dc:creator>Faraz Masood Khan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">https://csharplive.wordpress.com/2011/01/04/asp-net-detect-page-refresh/</guid>
		<description><![CDATA[We often wonder how to detect whether post back request is page refresh (F5) from browser or not. Following code does that job for me, I simply check for view state in the request is different or I receive it already, where timestamp make sure that new view state must be different from old one [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=104&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We often wonder how to detect whether post back request is page refresh (F5) from browser or not. Following code does that job for me, I simply check for view state in the request is different or I receive it already, where timestamp make sure that new view state must be different from old one (which we receive in request object)</p>
<p><span style="font-size:xx-small;"><span style="color:blue;">public partial class </span><span style="color:#2b91af;">MyPage </span>: System.Web.UI.</span><span style="font-size:xx-small;"><span style="color:#2b91af;">Page </span>{ <span style="color:blue;">private static readonly </span><span style="color:#2b91af;">ILog </span>Logger = <span style="color:#2b91af;">LogManager</span>.GetLogger(<span style="color:blue;">typeof</span>(<span style="color:#2b91af;">Terms</span>)); <span style="color:blue;">protected bool </span>IsRefresh { <span style="color:blue;">get</span>; <span style="color:blue;">private set</span>; } <span style="color:blue;">protected void </span>Page_Load(<span style="color:blue;">object </span>sender, <span style="color:#2b91af;">EventArgs </span>e) { <span style="color:blue;">this</span>.ViewState[<span style="color:#a31515;">"TIMESTAMP"</span>] = <span style="color:#2b91af;">DateTime</span>.Now.Ticks; <span style="color:blue;">this</span>.IsRefresh = <span style="color:#2b91af;">Convert</span>.ToInt32(<span style="color:blue;">this</span>.Session[<span style="color:blue;">this</span>.Request.RawUrl + <span style="color:#a31515;">"MyViewStateHashCode"</span>]) == (<span style="color:blue;">this</span>.Request[<span style="color:#a31515;">"__VIEWSTATE"</span>] ?? <span style="color:blue;">string</span>.Empty).GetHashCode(); <span style="color:blue;">this</span>.Session[<span style="color:blue;">this</span>.Request.RawUrl + <span style="color:#a31515;">"MyViewStateHashCode"</span>] = (<span style="color:blue;">this</span>.Request[<span style="color:#a31515;">"__VIEWSTATE"</span>] ?? <span style="color:blue;">string</span>.Empty).GetHashCode(); } <span style="color:blue;">protected void </span>btnSave_Click(<span style="color:blue;">object </span>sender, <span style="color:#2b91af;">EventArgs </span>e) { </span><span style="font-size:xx-small;"><span style="color:green;">// Check page request </span><span style="color:blue;">if </span>(!<span style="color:blue;">this</span>.IsRefresh) { </span><span style="font-size:xx-small;"><span style="color:green;">//Do something </span>} } }</span></p>
<p>&nbsp;</p>
<p>For latest article visit: <a title="Site for all about technology." href="http://www.feedbook.org" target="_blank">Feedbook</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/csharplive.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/csharplive.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/csharplive.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/csharplive.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/csharplive.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/csharplive.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/csharplive.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/csharplive.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/csharplive.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/csharplive.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/csharplive.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/csharplive.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/csharplive.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/csharplive.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=104&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharplive.wordpress.com/2011/01/04/asp-net-detect-page-refresh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc7e21530c7e2577f02bf4183c0dafc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">faraz</media:title>
		</media:content>
	</item>
		<item>
		<title>Don&#8217;t Start Developing Windows Phone 7 Application Yet</title>
		<link>http://csharplive.wordpress.com/2010/08/21/dont-start-developing-windows-phone-7-application-yet/</link>
		<comments>http://csharplive.wordpress.com/2010/08/21/dont-start-developing-windows-phone-7-application-yet/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 16:49:59 +0000</pubDate>
		<dc:creator>Faraz Masood Khan</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>

		<guid isPermaLink="false">https://csharplive.wordpress.com/2010/08/21/dont-start-developing-windows-phone-7-application-yet/</guid>
		<description><![CDATA[This article is very important to those who like me, started development of windows phone 7 application, and didn’t realize that they may not be acceptable to submit application on windows phone 7 market place. I have been working on windows phone 7 application for months, and now is almost finish. But when I try [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=100&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This article is very important to those who like me, started development of windows phone 7 application, and didn’t realize that they may not be acceptable to submit application on windows phone 7 market place.</p>
<p>I have been working on windows phone 7 application for months, and now is almost finish. But when I try to register on <a title="https://developer.windowsphone.com" href="http://developer.windowsphone.com">http://developer.windowsphone.com</a>, I found that my country (Pakistan) is not listed in acceptable country for application submission. You should first checkout for your country at <a title="https://developer.windowsphone.com" href="http://developer.windowsphone.com">http://developer.windowsphone.com</a> or check this link: <a title="http://developer.windowsphone.com/Help.aspx?id=fd9b5508-6436-4503-9174-45bf532b9dfd" href="http://developer.windowsphone.com/Help.aspx?id=fd9b5508-6436-4503-9174-45bf532b9dfd">http://developer.windowsphone.com/Help.aspx?id=fd9b5508-6436-4503-9174-45bf532b9dfd</a>, according to it you cannot submit you app unless you resides among acceptable list of countries.</p>
<p>You can check out Feedbook app screen shots at <a href="http://www.feedbook.org">www.feedbook.org</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/csharplive.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/csharplive.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/csharplive.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/csharplive.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/csharplive.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/csharplive.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/csharplive.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/csharplive.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/csharplive.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/csharplive.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/csharplive.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/csharplive.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/csharplive.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/csharplive.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=100&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharplive.wordpress.com/2010/08/21/dont-start-developing-windows-phone-7-application-yet/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc7e21530c7e2577f02bf4183c0dafc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">faraz</media:title>
		</media:content>
	</item>
		<item>
		<title>Feedbook Windows Phone 7 &amp; Me</title>
		<link>http://csharplive.wordpress.com/2010/08/18/feedbook-windows-phone-7-me/</link>
		<comments>http://csharplive.wordpress.com/2010/08/18/feedbook-windows-phone-7-me/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 19:38:19 +0000</pubDate>
		<dc:creator>Faraz Masood Khan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://csharplive.wordpress.com/2010/08/18/feedbook-windows-phone-7-me/</guid>
		<description><![CDATA[There are two main formats of feeds; RSS and ATOM, all feed formats based on XML. Since they were all well known so it become standard way to share data over internet. Twitter and Google also share data in these formats but with some extensions. Its all started, when I tried new LINQ to XML [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=97&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are two main formats of feeds; RSS and ATOM, all feed formats based on XML. Since they were all well known so it become standard way to share data over internet. Twitter and Google also share data in these formats but with some extensions.</p>
<p>Its all started, when I tried new LINQ to XML API, an RSS document was well suited to learn this API, so I begin writing a parser that could parse RSS into POCO … and end up with code that could parse all old and new formats (almost nine different version, but never tested thoroughly) how cool is that?. Anyways parser was ready, now what I need is a amazing user interface to couple it up, hence I opt for WPF, so another era was started ‘Learning of WPF’ … It is a headache but also gives power to do lot of things with UI (although its seem much heavier then Silverlight UI with same effects). Now I have an RSS Reader with nothing to do much; At first I integrate Sidewiki and Google Books with each article or a post, but hmmm … not enough <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  … How about Twitter Feeds ….? Twitter is supporting both RSS and ATOM, so why not integrate it? finally I modify my parser to understand Twitter Feeds. Later on after Open Authentication implementation, <a href="http://feedbook.tk">Feedbook</a> becomes officially a Twitter client <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  &#8230;. than Google Buzz which is another story …</p>
<p>In <a href="http://feedbook.tk">Feedbook WP7</a> (for Windows Phone 7) I have cut down Sidewiki and Google Books and ported class libraries on windows phone platform. I need to recreate all user interfaces with Silverlight (for WP7). Learned a lot during this process, so there are going to be major UI changes plus performance enhancement in desktop version.</p>
<p>In this tenure two open source projects were created; <a href="http://coresystem.codeplex.com">CoreSystem Library</a> and <a href="http://crystalmapper.codeplex.com">CrystalMapper ORM</a> both of them used in Feedbook. CoreSystem library is fairly simple with some database independent API and WPF cross thread update support API. CrystalMapper was another big effort, it was develop to be fastest that could really take on ADO.NET DataSet, later on … LINQ query, dirty object tracking and multiple DBMS support was introduce.</p>
<p><a href="http://www.feedbook.org">Feedbook</a> WP7 is now ready for demo … I am hoping to do lot more …</p>
<blockquote><p>“Keep moving forward …”</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/csharplive.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/csharplive.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/csharplive.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/csharplive.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/csharplive.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/csharplive.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/csharplive.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/csharplive.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/csharplive.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/csharplive.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/csharplive.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/csharplive.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/csharplive.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/csharplive.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=97&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharplive.wordpress.com/2010/08/18/feedbook-windows-phone-7-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc7e21530c7e2577f02bf4183c0dafc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">faraz</media:title>
		</media:content>
	</item>
		<item>
		<title>Feedbook v2.3 Slick UI Enhancements</title>
		<link>http://csharplive.wordpress.com/2010/05/23/feedbook-v2-3-slick-ui-enchancements/</link>
		<comments>http://csharplive.wordpress.com/2010/05/23/feedbook-v2-3-slick-ui-enchancements/#comments</comments>
		<pubDate>Sun, 23 May 2010 02:35:47 +0000</pubDate>
		<dc:creator>Faraz Masood Khan</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[Atom Pub]]></category>
		<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Chat]]></category>
		<category><![CDATA[Podcasts]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[RSS Client]]></category>
		<category><![CDATA[RSS Reader]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[TwitterApps]]></category>

		<guid isPermaLink="false">https://csharplive.wordpress.com/2010/05/23/feedbook-v2-3-slick-ui-enchancements/</guid>
		<description><![CDATA[In this version I mainly concentrate my efforts to make user interface more attractive … windows vista &#38; win 7 both provide chrome extensibility which made it possible to give slick thick glass like background … I also amaze with the end results, it looks so cool now … see follow screens shots … Download: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=93&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<blockquote><p>In this version I mainly concentrate my efforts to make user interface more attractive … windows vista &amp; win 7 both provide chrome extensibility which made it possible to give slick thick glass like background … I also amaze with the end results, it looks so cool now … see follow screens shots …</p></blockquote>
<p>Download: <a href="http://www.feedbook.org">Feedbook</a></p>
<p><a href="http://csharplive.files.wordpress.com/2010/05/image4.png"><img style="display:inline;border-width:0;" title="image" src="http://csharplive.files.wordpress.com/2010/05/image_thumb4.png?w=885&#038;h=487" alt="image" width="885" height="487" border="0" /></a></p>
<p>&nbsp;</p>
<p><a href="http://csharplive.files.wordpress.com/2010/05/image5.png"><img style="display:inline;border-width:0;" title="image" src="http://csharplive.files.wordpress.com/2010/05/image_thumb5.png?w=821&#038;h=607" alt="image" width="821" height="607" border="0" /></a></p>
<p>&nbsp;</p>
<p><a href="http://csharplive.files.wordpress.com/2010/05/image6.png"><img style="display:inline;border-width:0;" title="image" src="http://csharplive.files.wordpress.com/2010/05/image_thumb6.png?w=415&#038;h=580" alt="image" width="415" height="580" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/csharplive.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/csharplive.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/csharplive.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/csharplive.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/csharplive.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/csharplive.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/csharplive.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/csharplive.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/csharplive.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/csharplive.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/csharplive.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/csharplive.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/csharplive.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/csharplive.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=93&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharplive.wordpress.com/2010/05/23/feedbook-v2-3-slick-ui-enchancements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc7e21530c7e2577f02bf4183c0dafc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">faraz</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2010/05/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2010/05/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2010/05/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Feedbook Release 1.2 (Auto Shorten Url, xAuth Twitter &amp; Feed Display Improvements)</title>
		<link>http://csharplive.wordpress.com/2010/05/13/feedbook-release-1-2/</link>
		<comments>http://csharplive.wordpress.com/2010/05/13/feedbook-release-1-2/#comments</comments>
		<pubDate>Thu, 13 May 2010 12:48:48 +0000</pubDate>
		<dc:creator>Faraz Masood Khan</dc:creator>
				<category><![CDATA[Atom]]></category>
		<category><![CDATA[Atom Pub]]></category>
		<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Chat]]></category>
		<category><![CDATA[Podcast]]></category>
		<category><![CDATA[Podcasts]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[RSS Client]]></category>
		<category><![CDATA[RSS Reader]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">https://csharplive.wordpress.com/2010/05/13/feedbook-release-1-2/</guid>
		<description><![CDATA[This new release contains couple of handy new features like auto url shortening and notifications. Download at: Feedbook Twitter oAuth/xAuth Basic authentication will be unsupported by twitter from June 2010, I need to build xAuth  authentication mechanism provided by twitter for desktop client applications. This mechanism is much secure then basic authentication although it doesn’t [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=75&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This new release contains couple of handy new features like auto url shortening and notifications.</p>
<p>Download at: <a href="http://feedbook.org">Feedbook</a></p>
<h5>Twitter oAuth/xAuth</h5>
<p>Basic authentication will be unsupported by <a href="http://twitter.com/">twitter</a> from June 2010, I need to build xAuth  authentication mechanism provided by twitter for desktop client applications. This mechanism is much secure then basic authentication although it doesn’t harm the user level experience that basic auth provides. When you add a new account, Feedbook send yours credentials to twitter and get the token against it which it than stores in the database. When ever you send a new tweet, Feedbook use that token to authenticate your status update request on twitter.</p>
<h5>Auto Shorten Url</h5>
<p>To save characters in tweet Feedbook automatically shorten long url while typing, it uses bit.ly API for this purpose. If you don’t want to shorten your url can simply disable it by unchecking Auto Shorten Url checkbox. Following is tje screenshot of a url after shortening <a href="http://csharplive.wordpress.com">http://csharplive.wordpress.com</a></p>
<p><a href="http://csharplive.files.wordpress.com/2010/05/image.png"><img style="display:inline;border-width:0;" title="image" src="http://csharplive.files.wordpress.com/2010/05/image_thumb.png?w=661&#038;h=189" border="0" alt="image" width="661" height="189" /></a></p>
<h5>Feed Display</h5>
<p>Feed display improves a lot, now you can see feeds pretty much close to what you were seeing in html.</p>
<p>Shot1:</p>
<p><a href="http://csharplive.files.wordpress.com/2010/05/image1.png"><img style="display:inline;border-width:0;" title="image" src="http://csharplive.files.wordpress.com/2010/05/image_thumb1.png?w=672&#038;h=233" border="0" alt="image" width="672" height="233" /></a></p>
<p>Shot2:</p>
<p><a href="http://csharplive.files.wordpress.com/2010/05/image2.png"><img style="display:inline;border-width:0;" title="image" src="http://csharplive.files.wordpress.com/2010/05/image_thumb2.png?w=720&#038;h=330" border="0" alt="image" width="720" height="330" /></a></p>
<h5>Notification</h5>
<p>Feedbook now shows you notification of feeds it downloaded, it best for scenarios where you want keep running Feedbook in background and get latest feeds notifications.</p>
<p><a href="http://csharplive.files.wordpress.com/2010/05/image3.png"><img style="display:inline;border-width:0;" title="image" src="http://csharplive.files.wordpress.com/2010/05/image_thumb3.png?w=252&#038;h=160" border="0" alt="image" width="252" height="160" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/csharplive.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/csharplive.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/csharplive.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/csharplive.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/csharplive.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/csharplive.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/csharplive.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/csharplive.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/csharplive.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/csharplive.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/csharplive.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/csharplive.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/csharplive.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/csharplive.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=75&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharplive.wordpress.com/2010/05/13/feedbook-release-1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc7e21530c7e2577f02bf4183c0dafc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">faraz</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2010/05/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2010/05/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2010/05/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2010/05/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Feedbook RSS Reader, Twitter &amp; Podcasts Client</title>
		<link>http://csharplive.wordpress.com/2010/05/02/feedbook-released/</link>
		<comments>http://csharplive.wordpress.com/2010/05/02/feedbook-released/#comments</comments>
		<pubDate>Sun, 02 May 2010 21:01:33 +0000</pubDate>
		<dc:creator>Faraz Masood Khan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[Atom Pub]]></category>
		<category><![CDATA[Blogger]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Podcast]]></category>
		<category><![CDATA[Podcasts]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[RSS Client]]></category>
		<category><![CDATA[RSS Reader]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">https://csharplive.wordpress.com/2010/05/02/feedbook-released/</guid>
		<description><![CDATA[Feedbook is a rss reader and twitter client build in WPF to give user a pleasant experience. Following are features currently supported. Feed Paper feedbook build news paper of feeds for you, so that you can read feeds of the day just like daily news paper Blog board This is a unique features that turns [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=54&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a title="Feedbook" href="http://feedbook.org">Feedbook</a> is a <a href="http://en.wikipedia.org/wiki/Aggregator">rss reader</a> and <a href="http://twitter.com">twitter</a> client build in WPF to give user a pleasant experience.</p>
<p>Following are features currently supported.</p>
<h3>Feed Paper</h3>
<p>feedbook build news paper of feeds for you, so that you can read feeds of the day just like daily news paper</p>
<h3>Blog board</h3>
<p>This is a unique features that turns your blog into messenger among authors. You will be able to use your blog as chat logs that everybody can see. Currently Blogger and Atom Pub protocol are supported.</p>
<h3>Podcast</h3>
<p>feedbook automatically download podcasts of channels you specified. it also have an embedded media player that supports most common media formats. Microsoft video podcast <a href="http://on10.net/">channel 10</a> is my favorite cake.</p>
<h3>Feed Roll</h3>
<p>This features allows you to see all feeds updates in descending order, so that you can read instant updates from news sites or even twitter <a href="http://hashtags.org/">hastags</a> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Twitter Client</h3>
<p>feedbook allows you to tweet your feeds or something you want to say. It recognizes special keywords like @ or # as a special link source. Follow <a href="http://twitter.com/farazmasoodkhan">me</a> or <a href="http://twitter.com/feedbook">feedbook on twitter</a>.</p>
<h3>Sidewiki Arctiles</h3>
<p>feedbook fetch related article on <a href="http://www.google.com/sidewiki">sidewiki</a> for feeds. However sidewiki api is a bit new so there it might be some strange errors in it.</p>
<h3>Google Books</h3>
<p>feedbook also gets <a href="http://books.google.com/">books</a> related to the feeds on one click. Thanks to google <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Download it at: <a href="http://cid-2f153c0bc47d433f.skydrive.live.com/self.aspx/Misc/Feedbook%20Setup.zip">feedbook</a></p>
<p>Following are screenshots of feedbook</p>
<p><a href="http://csharplive.files.wordpress.com/2010/05/feedbook.png"><img style="display:inline;border-width:0;" title="feedbook" src="http://csharplive.files.wordpress.com/2010/05/feedbook_thumb.png?w=248&#038;h=137" border="0" alt="feedbook" width="248" height="137" /></a> <a href="http://csharplive.files.wordpress.com/2010/05/feedbooktwitter.png"><img style="display:inline;border-width:0;" title="FeedbookTwitter" src="http://csharplive.files.wordpress.com/2010/05/feedbooktwitter_thumb.png?w=248&#038;h=99" border="0" alt="FeedbookTwitter" width="248" height="99" /></a> <a href="http://csharplive.files.wordpress.com/2010/05/feedpaper.png"><img style="display:inline;border-width:0;" title="FeedPaper" src="http://csharplive.files.wordpress.com/2010/05/feedpaper_thumb.png?w=248&#038;h=137" border="0" alt="FeedPaper" width="248" height="137" /></a> <a href="http://csharplive.files.wordpress.com/2010/05/feedroll.png"><img style="display:inline;border-width:0;" title="FeedRoll" src="http://csharplive.files.wordpress.com/2010/05/feedroll_thumb.png?w=263&#038;h=231" border="0" alt="FeedRoll" width="263" height="231" /></a> <a href="http://csharplive.files.wordpress.com/2010/05/podcast.png"><img style="display:inline;border-width:0;" title="Podcast" src="http://csharplive.files.wordpress.com/2010/05/podcast_thumb.png?w=248&#038;h=137" border="0" alt="Podcast" width="248" height="137" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/csharplive.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/csharplive.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/csharplive.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/csharplive.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/csharplive.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/csharplive.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/csharplive.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/csharplive.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/csharplive.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/csharplive.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/csharplive.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/csharplive.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/csharplive.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/csharplive.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=54&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharplive.wordpress.com/2010/05/02/feedbook-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc7e21530c7e2577f02bf4183c0dafc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">faraz</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2010/05/feedbook_thumb.png" medium="image">
			<media:title type="html">feedbook</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2010/05/feedbooktwitter_thumb.png" medium="image">
			<media:title type="html">FeedbookTwitter</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2010/05/feedpaper_thumb.png" medium="image">
			<media:title type="html">FeedPaper</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2010/05/feedroll_thumb.png" medium="image">
			<media:title type="html">FeedRoll</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2010/05/podcast_thumb.png" medium="image">
			<media:title type="html">Podcast</media:title>
		</media:content>
	</item>
		<item>
		<title>CrystalMapper ORM 2.0 Alpha</title>
		<link>http://csharplive.wordpress.com/2010/03/14/crystalmapper-orm-2-0-alpha/</link>
		<comments>http://csharplive.wordpress.com/2010/03/14/crystalmapper-orm-2-0-alpha/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 02:58:27 +0000</pubDate>
		<dc:creator>Faraz Masood Khan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[O/R Mapping]]></category>
		<category><![CDATA[Object Relational Mapping]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://csharplive.wordpress.com/2010/03/14/crystalmapper-orm-2-0-alpha/</guid>
		<description><![CDATA[In effort to provide fast and easy to use ORM I have release another version of CrystalMapper with Linq support. Latest source code is available at http://crystalmapper.codeplex.com. (Don’t forget to give your feedback) This version contains dirty object tracking, predefine referential queries and Linq query. Although it is in early stage but I work hard [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=38&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In effort to provide fast and easy to use ORM I have release another version of CrystalMapper with <strong>Linq</strong> support.</p>
<p>Latest source code is available at <a href="http://crystalmapper.codeplex.com">http://crystalmapper.codeplex.com</a>. (Don’t forget to give your feedback)</p>
<p>This version contains dirty object tracking, predefine referential queries and Linq query. Although it is in early stage but I work hard to provide fairly complete set of <strong>Linq</strong> functions.</p>
<p>Following are some of Linq queries</p>
<p>Inner join example with group by.</p>
<pre class="code"><span style="color:blue;">var </span>query = <span style="color:blue;">from </span>c <span style="color:blue;">in </span><span style="color:#2b91af;">Customer</span>.Query()
            <span style="color:blue;">join </span>o <span style="color:blue;">in </span><span style="color:#2b91af;">Order</span>.Query() <span style="color:blue;">on </span>c.CustomerID <span style="color:blue;">equals </span>o.CustomerID
            <span style="color:blue;">group </span>o <span style="color:blue;">by </span>o.CustomerID <span style="color:blue;">into </span>g
            <span style="color:blue;">select new </span>{ CustomerID = g.Key, Count = g.Count(), Avg = g.Average(o =&gt; o.OrderID) };</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Complex object with take example.</p>
<pre class="code"><span style="color:blue;">var </span>query = (<span style="color:blue;">from </span>c <span style="color:blue;">in </span><span style="color:#2b91af;">Customer</span>.Query()
             <span style="color:blue;">from </span>o <span style="color:blue;">in </span><span style="color:#2b91af;">Order</span>.Query()
             <span style="color:blue;">select new </span>{ Customer = c, Order = o }).Take(1000);</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/csharplive.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/csharplive.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/csharplive.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/csharplive.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/csharplive.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/csharplive.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/csharplive.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/csharplive.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/csharplive.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/csharplive.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/csharplive.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/csharplive.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/csharplive.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/csharplive.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=38&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharplive.wordpress.com/2010/03/14/crystalmapper-orm-2-0-alpha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc7e21530c7e2577f02bf4183c0dafc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">faraz</media:title>
		</media:content>
	</item>
		<item>
		<title>CrystalMapper ORM</title>
		<link>http://csharplive.wordpress.com/2009/06/05/crystalmapper-orm/</link>
		<comments>http://csharplive.wordpress.com/2009/06/05/crystalmapper-orm/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 11:42:18 +0000</pubDate>
		<dc:creator>Faraz Masood Khan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[O/R Mapping]]></category>
		<category><![CDATA[Object Relational Mapping]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://csharplive.wordpress.com/2009/06/05/crystalmapper-orm/</guid>
		<description><![CDATA[CrystalMapper&#160; is a very simple object ORM, infect it needs to improve a lot to qualify as ORM. CrystalMapper written to compete with ADO.NET DataSet fetch speed. It is very fast compare to other ORMs and provides only basic search, create, update and delete operations. Quick Start video tutorial It is fast because it does [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=13&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://csharplive.files.wordpress.com/2009/06/cooltext424775800.png"><img style="display:inline;border-width:0;" title="cooltext424775800" border="0" alt="cooltext424775800" src="http://csharplive.files.wordpress.com/2009/06/cooltext424775800_thumb.png?w=244&#038;h=59" width="244" height="59" /></a></p>
<p>CrystalMapper&#160; is a very simple object ORM, infect it needs to improve a lot to qualify as ORM. CrystalMapper written to compete with ADO.NET DataSet fetch speed. It is very fast compare to other ORMs and provides only basic search, create, update and delete operations.</p>
<p><strong><a title="CrystalMapper QuickStart" href="http://www.youtube.com/watch?v=5_0UxY55ZF4" target="_blank">Quick Start video tutorial</a></strong></p>
<p>It is fast because it does not do any heaving loading task all by itself, instead leaves it to object for filling itself up when ask by CrystalMapper. Don’t you worry about having to writing manually for filling data logic, CrystalMapper includes Template for generating classes and it is integral part of ORM. Templates are written for CodeSmith. I know it is not Open Source but until I get understanding of an open source code generator tool please bear with it. You can use trial versions of CodeSmith for now.</p>
<p>Only very basic level searching is provided, there is no concept on referential entities or object changes tracking. It only allows you to transform an raw data into objects, on that business logic can be build I will show you basic search, complex query search and update functionality.</p>
<p>Note: example provided along with package is of AdventureWork database, normally used in Microsoft Labs Hands On (You can download it easily from codeplex, make sure to download SQL Server 2005 version).</p>
<p><strong>Basic Search:</strong></p>
<p>Basic search can be done with objects where not complex criteria is required.</p>
<pre class="code"><a href="http://csharplive.files.wordpress.com/2009/06/newpicture.png"><img style="display:inline;border-width:0;" title="New Picture" border="0" alt="New Picture" src="http://csharplive.files.wordpress.com/2009/06/newpicture_thumb.png?w=594&#038;h=209" width="594" height="209" /></a></pre>
<p><a href="http://11011.net/software/vspaste"></a><a href="http://11011.net/software/vspaste"></a></p>
<p><strong>Complex Search:</strong></p>
<p>Complex search requires complex criteria where simple equal to (=) does not work.</p>
<p><a href="http://csharplive.files.wordpress.com/2009/06/newpicture1.png"><img style="display:inline;border-width:0;" title="New Picture" border="0" alt="New Picture" src="http://csharplive.files.wordpress.com/2009/06/newpicture_thumb1.png?w=611&#038;h=167" width="611" height="167" /></a></p>
<p><strong>Updating:</strong></p>
<p>Update is very simple just call update function</p>
<p><a href="http://csharplive.files.wordpress.com/2009/06/newpicture2.png"><img style="display:inline;border-width:0;" title="New Picture" border="0" alt="New Picture" src="http://csharplive.files.wordpress.com/2009/06/newpicture_thumb2.png?w=601&#038;h=302" width="601" height="302" /></a></p>
<p><strong>Transactions:</strong></p>
<p>For updating objects in transaction, you just have to call dataContext.BeginTransaction() and dataContext.CommitTransaction() functions. Every object that is update by passing this dataContext in update or create function will effect changes in database with in same transaction.</p>
<p><strong>Open Source</strong></p>
<p>I want this project to be open source, therefore it is hosted on CodePlex.com: <a href="http://crystalmapper.codeplex.com">http://crystalmapper.codeplex.com</a></p>
<p><strong>Future Plans:</strong></p>
<p>Plans are very ambitious, two supports that I want to put in this ORM is LINQ and Parent Child relation entities. This referential relation will not be implemented like other ORM but instead it will only be prebuild queries for accessing Childs objects. Creating parent child relation is mainly a task of modifying template.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/csharplive.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/csharplive.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/csharplive.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/csharplive.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/csharplive.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/csharplive.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/csharplive.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/csharplive.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/csharplive.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/csharplive.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/csharplive.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/csharplive.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/csharplive.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/csharplive.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=13&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharplive.wordpress.com/2009/06/05/crystalmapper-orm/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc7e21530c7e2577f02bf4183c0dafc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">faraz</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2009/06/cooltext424775800_thumb.png" medium="image">
			<media:title type="html">cooltext424775800</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2009/06/newpicture_thumb.png" medium="image">
			<media:title type="html">New Picture</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2009/06/newpicture_thumb1.png" medium="image">
			<media:title type="html">New Picture</media:title>
		</media:content>

		<media:content url="http://csharplive.files.wordpress.com/2009/06/newpicture_thumb2.png" medium="image">
			<media:title type="html">New Picture</media:title>
		</media:content>
	</item>
		<item>
		<title>WPF Data Binding ObservableCollection (cross thread binding support)</title>
		<link>http://csharplive.wordpress.com/2008/09/11/wpf-data-binding-observablecollection-cross-thread-binding-support/</link>
		<comments>http://csharplive.wordpress.com/2008/09/11/wpf-data-binding-observablecollection-cross-thread-binding-support/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 12:59:21 +0000</pubDate>
		<dc:creator>Faraz Masood Khan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[collection]]></category>
		<category><![CDATA[Data binding]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[Cross Thread]]></category>
		<category><![CDATA[DataBinding]]></category>
		<category><![CDATA[ObservableCollection]]></category>

		<guid isPermaLink="false">http://csharplive.wordpress.com/2008/09/11/wpf-data-binding-observablecollection-cross-thread-binding-support/</guid>
		<description><![CDATA[Feedbook is a online RSS Reader and social networking for windows, visit website for more info &#8230; Problem Statement: One of the issues we face in WPF data binding that we cannot update ObservableCollection&#60;T&#62; from other thread (cross thread), other wise we will get an exception &#8220;This type of CollectionView does not support changes to its [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=5&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><a title="Feedbook" href="http://bit.ly/gfeedbook">Feedbook</a> is a online RSS Reader and social networking for windows, visit website for <a href="http://bit.ly/gfeedbook">more info</a> &#8230;</strong></p>
<h4><strong><span style="color:#831efd;">Problem Statement:</span></strong></h4>
<p>One of the issues we face in WPF data binding that we cannot update <span style="color:#2b91af;">ObservableCollection</span>&lt;T&gt; from other thread (cross thread), other wise we will get an exception<span style="color:#ff0000;"> &#8220;This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread&#8221;</span>. So we cannot leverage from any asynchronous operation.  Winforms and WPF controls required single thread apartment to render itself and it also check for cross thread validation. In this article not only we will solved this exception problem, but also fix one memory leak in .NET.</p>
<p><strong>Note: </strong></p>
<p><strong>a) You can download complete visual studio 9 solution from </strong><strong><a href="http://cid-2f153c0bc47d433f.skydrive.live.com/self.aspx/Misc/WpfDispatchedCollectionTest.zip">here</a></strong></p>
<p><strong>b) </strong><strong>All classes are  available in open source class library at CodePlex.com : </strong><a href="http://coresystem.codeplex.com">http://coresystem.codeplex.com</a></p>
<p><strong>c) See <a href="http://myfeedbook.wordpress.com">Feedbook</a> </strong><strong>RSS Reader supports any RSS and Atom news feed, it is also a twitter client and podcasts downloader which heavily use ObservableCollection. It is build using <a href="http://coresystem.codeplex.com">CoreSystem Library</a> and <a href="http://csharplive.wordpress.com/2009/06/05/crystalmapper-orm/">CrystalMapper ORM</a></strong></p>
<h4><span style="color:#831efd;">Briefings and Solution:</span></h4>
<p>When ever in WPF a collection class implements <span style="color:#2b91af;">INotifyCollectionChanged </span>or any class that implement <span style="color:#2b91af;">INotifyPropertyChanged</span> interfaces, they can be use in data binding for automatic updating target property, however data binding requires target property to be DependencyProperty . You should heard the term dependency property a lot in WPF. Why data binding in WPF needs target property to be dependency property? Well there are many good reasons for that. One is the way value assigned to dependency properties  does matters. You will amaze to know that not all values assign through data binding get reflected. I will not go into details because that is not my objective over here but here is a hint: If you ever set a dependency property, let say &#8220;<span style="color:red;">Background</span>&#8221; in <span style="color:#a31515;">Style</span> through setters for specific <span style="color:blue;">&lt;</span><span style="color:#a31515;">Style </span><span style="color:red;">TargetType</span><span style="color:blue;">=&#8221;{</span><span style="color:#a31515;">x</span><span style="color:blue;">:</span><span style="color:#a31515;">Type </span><span style="color:red;">Button</span><span style="color:blue;">}&#8221;&gt; </span>type Button and then for certain Button down the logical tree you reset <span style="color:#a31515;">Button.Background</span> property, then style property will not be applied. dah! Well you will be thinking that Style is set before explicit local value assigned. May be you are write but the thing is that if you were in WPF team, would you rely on user to maintain sequence in declarative language, probably not. So WPF team implemented dependency property and data binding in a way that <em>&#8220;local value&#8221;</em> (explicitly assigned value to property of FrameworkElement object) has higher priority over <em>&#8220;style setters value&#8221;</em> therefore you local value override the style value. There are at least seven to eight different source classifications on priority level. If you want to learn WPF look at this great book <a href="http://www.adamnathan.net/wpf/">WPF Unleashed</a>.</p>
<h5></h5>
<h5><strong><em>Cause of Problem:</em></strong></h5>
<p>Forget <span style="color:#2b91af;">CollectionView </span>mentioned in exception for a second because you might get confused. Every UI Controls that registers its handlers to publishers like <span style="color:#2b91af;">ObservableCollection</span>&lt;T&gt;, when handlers get fired on every subscribers, in this case UI Controls! take certain action on it to keep itself updated. Now lets take ListBox (WPF one) it exposes ItemsSource dependency property, when we bind a collection to it ( <span style="color:blue;">&lt;</span><span style="color:#a31515;">ListBox </span><span style="color:red;">ItemsSource</span><span style="color:blue;">=&#8221;{</span><span style="color:#a31515;">Binding </span><span style="color:red;">Source</span><span style="color:blue;">={</span><span style="color:#a31515;">StaticResource </span><span style="color:red;">myCollection</span><span style="color:blue;">}}&#8221; /&gt; </span>myCollection defined some where in window or application resources or higher in visual tree), it registers its handlers since INotifyCollectionChanged interface is implemented by <span style="color:#2b91af;">ObservableCollection</span>&lt;T&gt; to track collection changed. If an item is add on collection in a call to &#8220;collection.Add(myItem)&#8221; function. This add function not only add an item to collection but also raise a CollectionChanged event in this &#8220;Add&#8221; function call, that raise event function invoke all handlers internally, and execute them one by one on the bases of FCFS algorithm in same thread. After all handlers got executed then finally &#8220;Add&#8221; function returns. Problem arises if this whole operation is under a thread that is different from UI thread. In this case handlers attached by ListBox internally take action on added &#8220;myItem&#8221; and tries to update itself, at this point call to thread validation by ListBox fails.</p>
<h5></h5>
<h5><strong><em>Solution to the Problem:</em></strong></h5>
<p>We can solved this problem by firing handler(s) in same UI thread. But wait a minute, how we gonna known that in which UI thread to fire a specific handler(s) register by certain control, there can be multiple different UI threads and multiple controls from different thread register there handlers. if we some how able to fire handlers in one particular UI thread, the exception will still going to be raise. As we know that when a UI control registers its handler, it will always register in its own thread, at the time of registration if we simply store registering thread information along with handler, then later on we can fire each handler in there respective threads. For instance some thing like this:</p>
<pre><span style="color:blue;">public override event </span><span style="color:#2b91af;">NotifyCollectionChangedEventHandler </span>CollectionChanged
{
    <span style="color:blue;">add </span>{
        <span style="color:green;">//base.CollectionChanged += value; </span><span style="color:blue;">this</span>.handlersThread.Add(<span style="color:blue;">value</span>, <span style="color:#2b91af;">Thread</span>.CurrentThread); <span style="color:green;">//We know that Current thread must be UI thread //of that specific control other while expection //will be thrown at registering time. </span>}
    <span style="color:blue;">remove </span>{
        <span style="color:green;">//base.CollectionChanged -= value; </span><span style="color:blue;">this</span>.handlersThread.Remove(<span style="color:blue;">value</span>);
    }
}</pre>
<p>Where <span style="color:blue;">value</span> is a .NET special class System.Delegate. When firing handlers we simply override OnCollectionChange method something like this:</p>
<p><span style="color:blue;">protected override void</span>OnCollectionChanged(<span style="color:#2b91af;">NotifyCollectionChangedEventArgs </span>e)</p>
<p>{</p>
<p><span style="color:green;">//base.OnCollectionChanged(e); </span></p>
<p><span style="color:blue;">foreach</span>(<span style="color:#2b91af;">Delegate</span>handler <span style="color:blue;">in this</span>.handlersThread.Keys)</p>
<p>{</p>
<p><span style="color:#2b91af;">Dispatcher</span>dispatcher = <span style="color:#2b91af;">Dispatcher</span>.FromThread(<span style="color:blue;">this</span>.handlersThread[handler]);</p>
<p>dispatcher.Invoke(<span style="color:#2b91af;">DispatcherPriority</span>.Send, handler, <span style="color:blue;">this</span>, e);</p>
<p>}</p>
<p>}</p>
<h5><strong><em>.NET Memory Leak:</em></strong></h5>
<p>Above solution works fine so far as we need it to work transparently. I have told you that value here is nothing but System.Delegate class object. When ever a objects subscribe to some publishers for respond, publisher holds reference of subscriber in order to respond back when particular event occurred. System.<span style="color:#2b91af;">Delegate</span>.Target property holds this reference of subscriber. This action produces memory leak, for example you create an object of certain class and subscribe its public collection changed event like:</p>
<pre><span style="color:blue;">public void </span>MemoryLeakTest()
{
    <span style="color:#2b91af;">ObservableCollection</span>&lt;<span style="color:#2b91af;">Object</span>&gt; myCollection = <span style="color:blue;">new </span><span style="color:#2b91af;">ObservableCollection</span>&lt;<span style="color:blue;">object</span>&gt;();   

    <span style="color:#2b91af;">DummSubscriber </span>subscriber = <span style="color:blue;">new </span><span style="color:#2b91af;">DummSubscriber</span>();   

    <span style="color:green;">// Holds reference to an object but allow it to garbage collected </span><span style="color:#2b91af;">WeakReference </span>subcriberRef = <span style="color:blue;">new </span><span style="color:#2b91af;">WeakReference</span>(subscriber);   

    myCollection.CollectionChanged += <span style="color:blue;">new </span>System.Collections.Specialized.<span style="color:#2b91af;">NotifyCollectionChangedEventHandler</span>(subscriber.CollectionChanged);             

    <span style="color:green;">// Setting null so that it can be collected by GC </span>subscriber = <span style="color:blue;">null</span>;   

    <span style="color:green;">// Calling GC so that object could be collected </span><span style="color:#2b91af;">GC</span>.WaitForPendingFinalizers();   

    <span style="color:green;">// Checking for subcriber refereced; </span><span style="color:blue;">if </span>(<span style="color:blue;">null </span>!= subcriberRef.Target)
        <span style="color:#2b91af;">Debugger</span>.Break(); <span style="color:green;">//Conditionaly allow breaking in debug mode. </span>}</pre>
<p>It will certainly break at &#8220;<span style="color:#2b91af;">Debugger</span>.Break();&#8221; because <span style="color:blue;">value</span> of type System.<span style="color:#2b91af;">Delegate</span>.Target certainly holds subscriber reference. Bad thing here is you lost object reference, therefore it is going to be reside in memory and you cannot unsubscribe it anymore.</p>
<h5></h5>
<h5><strong><em>Memory Leak Solution:</em></strong></h5>
<p>To find solution for this problem we need to do some work and make classes so that the code will be clean and those classes can be used by any other Publisher object who&#8217;s subscribers are UI controls and memory leak will be handled gracefully. Lets go to implementation, we will have two classes <span style="color:#2b91af;">DispatchEvent <span style="color:#000000;">and</span> DispatchEvent.DispatchHandler</span>, <span style="color:#2b91af;">DispatchHandler </span>is private class in <span style="color:#2b91af;">DispatchEvent</span>. <span style="color:#2b91af;">DispatchEvent </span>exposes three major functions Add, Remove and Fire, all these function are replacement of <span style="color:blue;">event</span> object in .NET. Our DispatchEvent contains a <span style="color:#2b91af;">List</span>&lt;<span style="color:#2b91af;">DispatchHandler</span>&gt; handlerList private member to holds all subscribers, where <span style="color:#2b91af;">DispatchHandler </span>represent each subscriber. Now lets see what <span style="color:#2b91af;">DispatchHandler </span>is:</p>
<pre><span style="color:blue;">private class </span><span style="color:#2b91af;">DispatchHandler </span>: <span style="color:#2b91af;">IDisposable </span>{
    <span style="color:blue;">private </span><span style="color:#2b91af;">MethodInfo </span>handlerInfo;
    <span style="color:blue;">private </span><span style="color:#2b91af;">WeakReference </span>targetRef;
    <span style="color:blue;">private </span><span style="color:#2b91af;">WeakReference </span>dispatcherRef;   

    <span style="color:blue;">public </span>DispatchHandler(<span style="color:#2b91af;">Delegate </span>handler, <span style="color:#2b91af;">Dispatcher </span>dispatcher)
    {
        <span style="color:blue;">this</span>.handlerInfo = handler.Method;
        <span style="color:blue;">this</span>.targetRef = <span style="color:blue;">new </span><span style="color:#2b91af;">WeakReference</span>(handler.Target);
        <span style="color:blue;">this</span>.dispatcherRef = <span style="color:blue;">new </span><span style="color:#2b91af;">WeakReference</span>(dispatcher);
    }   

    <span style="color:blue;">public bool </span>IsDisposable
    {
        <span style="color:blue;">get </span>{
            <span style="color:blue;">object </span>target = <span style="color:blue;">this</span>.Target;
            <span style="color:#2b91af;">Dispatcher </span>dispatcher = <span style="color:blue;">this</span>.Dispatcher;   

            <span style="color:blue;">return </span>(target == <span style="color:blue;">null </span>|| dispatcher == <span style="color:blue;">null </span>|| (target <span style="color:blue;">is </span><span style="color:#2b91af;">DispatcherObject </span>&amp;&amp;
                       (dispatcher.Thread.ThreadState &amp; (<span style="color:#2b91af;">ThreadState</span>.Aborted
                                                        | <span style="color:#2b91af;">ThreadState</span>.Stopped
                                                        | <span style="color:#2b91af;">ThreadState</span>.StopRequested
                                                        | <span style="color:#2b91af;">ThreadState</span>.AbortRequested)) != 0 ));
        }
    }   

    <span style="color:blue;">public void </span>Invoke(<span style="color:blue;">object </span>arg, <span style="color:blue;">params object</span>[] args)
    {
        <span style="color:blue;">object </span>target = <span style="color:blue;">this</span>.Target;
        <span style="color:#2b91af;">Dispatcher </span>dispatcher = <span style="color:blue;">this</span>.Dispatcher;                 

        <span style="color:blue;">if </span>(!<span style="color:blue;">this</span>.IsDisposable)
        {
            <span style="color:blue;">if </span>(<span style="color:blue;">this</span>.IsDispatcherThreadAlive)
            {
                dispatcher.Invoke(<span style="color:#2b91af;">DispatcherPriority</span>.Send, <span style="color:blue;">new </span><span style="color:#2b91af;">EventHandler</span>(
                                                                            <span style="color:blue;">delegate</span>(<span style="color:blue;">object </span>sender, <span style="color:#2b91af;">EventArgs </span>e)
                                                                            {
                                                                                <span style="color:blue;">this</span>.handlerInfo.Invoke(target, <span style="color:blue;">new object</span>[] { arg, e });
                                                                            }), arg, args);
            }
            <span style="color:blue;">else if </span>(target <span style="color:blue;">is </span><span style="color:#2b91af;">DispatcherObject</span>)
            {
                dispatcher.BeginInvoke(<span style="color:#2b91af;">DispatcherPriority</span>.Send, <span style="color:blue;">new </span><span style="color:#2b91af;">EventHandler</span>(
                                                                                <span style="color:blue;">delegate</span>(<span style="color:blue;">object </span>sender, <span style="color:#2b91af;">EventArgs </span>e)
                                                                                {
                                                                                    <span style="color:blue;">this</span>.handlerInfo.Invoke(target, <span style="color:blue;">new object</span>[] { arg, e });
                                                                                }), arg, args);
            }
            <span style="color:blue;">else </span>{
                <span style="color:#2b91af;">ArrayList </span>paramList = <span style="color:blue;">new </span><span style="color:#2b91af;">ArrayList</span>();
                paramList.Add(arg);
                paramList.AddRange(args);
                <span style="color:blue;">this</span>.handlerInfo.Invoke(target, paramList.ToArray());
            }   

        }
    }              

    <span style="color:blue;">public bool </span>DelegateEquals(<span style="color:#2b91af;">Delegate </span>other)
    {
        <span style="color:blue;">object </span>target = <span style="color:blue;">this</span>.Target;
        <span style="color:blue;">return </span>(target != <span style="color:blue;">null </span>&amp;&amp; <span style="color:blue;">object</span>.ReferenceEquals(target, other.Target)
                &amp;&amp;  <span style="color:blue;">this</span>.handlerInfo.Name == other.Method.Name);
    }             

}</pre>
<p>If you look closely you can see that <span style="color:#2b91af;">DispatchHandler </span>holds weak reference to target object therefore it will allow subscriber to be garbage collected. The important function here is <span style="color:#2b91af;">DispatchHandler</span>.Invoke(<span style="color:blue;">object </span>arg, <span style="color:blue;">params object</span>[] args). This function try three ways to invoke call on target object, first it invoke synchronous call through dispatcher if thread is Alive and not in sleep mode, otherwise it checks if target object is a <span style="color:#2b91af;">DispatcherObject</span> class object which means it required same thread (UI thread in which it is created) to fire handler, then fire handler asynchronously but on <span style="color:#2b91af;">DispatcherObject</span>&#8216; s thread and in the last it fires handler in current thread which causes event to occurred synchronously. IsDisposable check many scenarios to verify that handler is still active (one it verify that target object is still alive and not yet been collected by GC). This finally solved over problem of holding strong reference to subscriber object and allow it to be garbage collected since it has its weak reference. <span style="color:#2b91af;">DispatchEvent </span>is simple class that holds <span style="color:#2b91af;">DispatchHandler </span>objects and fires them, here is implementation:</p>
<pre><span style="color:blue;">public class </span><span style="color:#2b91af;">DispatchEvent </span>{
    <span style="color:blue;">private </span><span style="color:#2b91af;">List</span>&lt;<span style="color:#2b91af;">DispatchHandler</span>&gt; handlerList = <span style="color:blue;">new </span><span style="color:#2b91af;">List</span>&lt;<span style="color:#2b91af;">DispatchHandler</span>&gt;();   

    <span style="color:blue;">public void </span>Add(<span style="color:#2b91af;">Delegate </span>handler)
    {
        <span style="color:blue;">this</span>.Add(handler, <span style="color:#2b91af;">Dispatcher</span>.CurrentDispatcher);
    }   

    <span style="color:blue;">public void </span>Remove(<span style="color:#2b91af;">Delegate </span>handler)
    {
        <span style="color:blue;">var </span>rmvHandlers = (<span style="color:blue;">from </span>dispatchHandler <span style="color:blue;">in </span>handlerList
                           <span style="color:blue;">where </span>dispatchHandler.DelegateEquals(handler)
                           <span style="color:blue;">select </span>dispatchHandler).ToArray();   

        <span style="color:blue;">if </span>(rmvHandlers != <span style="color:blue;">null </span>&amp;&amp; rmvHandlers.Length &gt; 0)
        {
            <span style="color:blue;">this</span>.handlerList.Remove(rmvHandlers[0]);
            rmvHandlers[0].Dispose();
        }
    }   

    <span style="color:blue;">public void </span>Fire(<span style="color:blue;">object </span>sender, <span style="color:#2b91af;">EventArgs </span>args)
    {
        <span style="color:blue;">var </span>disposableHandler = <span style="color:blue;">from </span>handler <span style="color:blue;">in </span>handlerList
                                <span style="color:blue;">where </span>handler.IsDisposable
                                <span style="color:blue;">select </span>handler;
        <span style="color:blue;">foreach </span>(<span style="color:#2b91af;">DispatchHandler </span>rmvHandler <span style="color:blue;">in </span>disposableHandler.ToArray())
        {
            <span style="color:blue;">this</span>.handlerList.Remove(rmvHandler);
            rmvHandler.Dispose();
        }   

        <span style="color:blue;">foreach </span>(<span style="color:#2b91af;">DispatchHandler </span>handler <span style="color:blue;">in </span>handlerList)
            handler.Invoke(sender, args);
    }}</pre>
<p>Current thread <span style="color:#2b91af;">Dispatcher </span>can also be get from <span style="color:#2b91af;">Dispatcher</span>.CurrentDispatcher. It has simple Add, Remove and Fire to invoke all handles in FCFS way. Fire function also checks for disposable handlers. it you can see that handler reside in memory until event is occurred, well it is not as harm full as heavy .NET UI object memory leaked.</p>
<h4></h4>
<h4><strong><span style="color:#831efd;">Implementing Dispatched Event Collection:</span></strong></h4>
<p>I have implement derived class <span style="color:#2b91af;">DispatchedObservableCollection</span>&lt;Titem&gt; derived from <span style="color:#2b91af;">ObservableCollection</span>&lt;T&gt; and override same functions as discussed &#8220;Solution to Problem&#8221; section. <span style="color:#2b91af;">DispatchedObservableCollection</span>&lt;Titem&gt; implementation:</p>
<pre><span style="color:blue;">public class </span><span style="color:#2b91af;">DispatchedObservableCollection</span>&lt;Titem&gt; : <span style="color:#2b91af;">ObservableCollection</span>&lt;Titem&gt;
{
    <span style="color:#2b91af;">DispatchEvent </span>collectionChanged = <span style="color:blue;">new </span><span style="color:#2b91af;">DispatchEvent</span>();
    <span style="color:#2b91af;">DispatchEvent </span>propertyChanged = <span style="color:blue;">new </span><span style="color:#2b91af;">DispatchEvent</span>();   

    <span style="color:blue;">protected override void </span>OnCollectionChanged(<span style="color:#2b91af;">NotifyCollectionChangedEventArgs </span>e)
    {
        <span style="color:green;">//base.OnCollectionChanged(e); </span><span style="color:blue;">this</span>.collectionChanged.Fire(<span style="color:blue;">this</span>, e);
    }   

    <span style="color:blue;">protected override void </span>OnPropertyChanged(<span style="color:#2b91af;">PropertyChangedEventArgs </span>e)
    {
        <span style="color:green;">//base.OnPropertyChanged(e); </span><span style="color:blue;">this</span>.propertyChanged.Fire(<span style="color:blue;">this</span>, e);
    }   

    <span style="color:blue;">public override event </span><span style="color:#2b91af;">NotifyCollectionChangedEventHandler </span>CollectionChanged
    {
        <span style="color:blue;">add </span>{ <span style="color:blue;">this</span>.collectionChanged.Add(<span style="color:blue;">value</span>); }
        <span style="color:blue;">remove </span>{ <span style="color:blue;">this</span>.collectionChanged.Remove(<span style="color:blue;">value</span>); }
    }   

    <span style="color:blue;">protected override event </span><span style="color:#2b91af;">PropertyChangedEventHandler </span>PropertyChanged
    {
        <span style="color:blue;">add </span>{ <span style="color:blue;">this</span>.propertyChanged.Add(<span style="color:blue;">value</span>); }
        <span style="color:blue;">remove </span>{ <span style="color:blue;">this</span>.propertyChanged.Remove(<span style="color:blue;">value</span>); }
    }
}</pre>
<h5><strong><em>Implementation Test:</em></strong></h5>
<p>This is simple test application with a fork button that create same window in a different thread and also subscribe a <span style="color:#2b91af;">DummSubscriber </span>object to this photos collection (Photos collection is defined in application resources). <span style="color:#2b91af;">Photos </span>Class derived from <span style="color:#2b91af;">DispatchedObservableCollection</span>&lt;Titem&gt;, It also has internal file watchers that are tracking image folder for any new picture and then add it to photos collection, this intern trigger CollectionChanged event (same other thread). As soon as you close forked window (second window) <span style="color:#2b91af;">DummSubscriber </span>and forked window is collected by GC. Click <a href="http://cid-2f153c0bc47d433f.skydrive.live.com/self.aspx/Misc/WpfDispatchedCollectionTest.zip">here</a> to download visual studio solution.</p>
<p><a href="http://farazmasoodkhan.files.wordpress.com/2008/03/image1.png"><img style="border-width:0;" src="http://farazmasoodkhan.files.wordpress.com/2008/03/image-thumb1.png?w=482&#038;h=303" alt="image" width="482" height="303" border="0" /></a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/csharplive.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/csharplive.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/csharplive.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/csharplive.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/csharplive.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/csharplive.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/csharplive.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/csharplive.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/csharplive.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/csharplive.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/csharplive.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/csharplive.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/csharplive.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/csharplive.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/csharplive.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/csharplive.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=csharplive.wordpress.com&amp;blog=4635329&amp;post=5&amp;subd=csharplive&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://csharplive.wordpress.com/2008/09/11/wpf-data-binding-observablecollection-cross-thread-binding-support/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1dc7e21530c7e2577f02bf4183c0dafc?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">faraz</media:title>
		</media:content>

		<media:content url="http://farazmasoodkhan.files.wordpress.com/2008/03/image-thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>
