<?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>pushbomb &#187; concepts implemented</title>
	<atom:link href="http://team.pushbomb.com/category/concepts-implemented/feed/" rel="self" type="application/rss+xml" />
	<link>http://team.pushbomb.com</link>
	<description>tv programmed by the collective</description>
	<lastBuildDate>Tue, 05 Jan 2010 22:49:48 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='team.pushbomb.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/a08732ed34e6814d5a5513fe8cde5696?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>pushbomb &#187; concepts implemented</title>
		<link>http://team.pushbomb.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://team.pushbomb.com/osd.xml" title="pushbomb" />
	<atom:link rel='hub' href='http://team.pushbomb.com/?pushpress=hub'/>
		<item>
		<title>Silverlight 3 RELEASE Video Player Demo using H.264 AAC MP4</title>
		<link>http://team.pushbomb.com/2009/07/23/silverlight_3_beta_adobe_video_playerworking_now/</link>
		<comments>http://team.pushbomb.com/2009/07/23/silverlight_3_beta_adobe_video_playerworking_now/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 05:08:00 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[Adobe Video Formats]]></category>
		<category><![CDATA[Digital Media]]></category>
		<category><![CDATA[HD Video]]></category>
		<category><![CDATA[Industry News]]></category>
		<category><![CDATA[Proof Driven Development]]></category>
		<category><![CDATA[Siverlight]]></category>
		<category><![CDATA[Smooth Streaming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[concepts implemented]]></category>
		<category><![CDATA[software as strategic]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[f4v]]></category>
		<category><![CDATA[flash video]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[H.264]]></category>
		<category><![CDATA[H.264 AAC MP4]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[SilverLight]]></category>
		<category><![CDATA[silverlight 3]]></category>
		<category><![CDATA[silverlight 3 beta]]></category>
		<category><![CDATA[silverlight adobe]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2009/04/05/silverlight_3_beta_adobe_video_playerworking_now/</guid>
		<description><![CDATA[Silverlight 3 plays H.264 AAC MP4  video just fine. Really. Here is proof and a bit of fun with hardware accelerated 50+ FPS results<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1314&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;"><a href="http://www.domaindotnet.com/silver3adobevideo.htm" target="_blank"><img class="  " style="display:inline;background:black 0 0;border:black 5px solid;margin:5px;" src="http://www.domaindotnet.com/adobe_logo.gif" alt="" width="90" height="91" align="right" /></a></p>
<p style="text-align:left;">
<p style="text-align:left;"><em>This is now a complete media platform for synchronized content from Internet (MRSS, iTunes) as well as private sources with our integration Cloud support out of the box for Amazon S3.</em></p>
<p style="text-align:left;"><em> </em></p>
<p style="text-align:left;"><em>Here is one of the framework generated experiences (you can do your own but not in this demo) which transforms the Apple Movie Trailers content:</em></p>
<p><a href="http://media.tangentux.com/index.htm"></a></p>
<p> </p>
<p> </p>
<p style="text-align:right;"><div id="x-video-0" class="video-player">
<embed id="video0" src="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.18&#038;guid=B04BewKm&#038;width=510&#038;height=382&#038;locksize=no&#038;qc_publisherId=p-18-mFEk4J448M" type="application/x-shockwave-flash" width="510" height="382" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true"" title="tangent.ux Silverlight 3 Media Platform"></embed>
</div></p>
<p style="text-align:left;">Or click here to go direct:</p>
<p><a href="http://media.tangentux.com/index.htm">http://media.tangentux.com/index.htm</a><a href="http://smooth.s3.amazonaws.com/default.htm"></a></p>
<p style="text-align:left;">Adobe has no reason to ignore <a href="http://en.wikipedia.org/wiki/Silverlight_" target="_blank">Silverlight </a>now…They do that at their own peril and eventual harm.</p>
<h3><strong> </strong></h3>
<p>We will have a free version of this media center environment (yes indeed it is a lot like Windows Media Center, only completely built for Internet content). The demo above shows off some Deep Zoom integration, as well as some intelligent playback optimized for quality over M4v, MP4, and associated file types.</p>
<p>There is also a large demo with tons of smooth streaming content. Let me know if your interested.</p>
<div style="text-align:left;">
<h3><strong><br />
</strong></h3>
</div>
<h3>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1b73a0b4-ab03-4eb6-8d91-005e51fe20d9" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/adobe">adobe</a>,<a rel="tag" href="http://del.icio.us/popular/f4v">f4v</a>,<a rel="tag" href="http://del.icio.us/popular/flash+video">flash video</a>,<a rel="tag" href="http://del.icio.us/popular/Flex">Flex</a>,<a rel="tag" href="http://del.icio.us/popular/flv">flv</a>,<a rel="tag" href="http://del.icio.us/popular/RIA">RIA</a>,<a rel="tag" href="http://del.icio.us/popular/SilverLight">SilverLight</a>,<a rel="tag" href="http://del.icio.us/popular/silverlight+3">silverlight 3</a>,<a rel="tag" href="http://del.icio.us/popular/silverlight+3+beta">silverlight 3 beta</a>,<a rel="tag" href="http://del.icio.us/popular/silverlight+adobe">silverlight adobe</a>,<a rel="tag" href="http://del.icio.us/popular/Video">Video</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7011ac63-84fa-4317-a7b5-0c6e00e87398" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/adobe">adobe</a>,<a rel="tag" href="http://technorati.com/tags/f4v">f4v</a>,<a rel="tag" href="http://technorati.com/tags/flash+video">flash video</a>,<a rel="tag" href="http://technorati.com/tags/Flex">Flex</a>,<a rel="tag" href="http://technorati.com/tags/flv">flv</a>,<a rel="tag" href="http://technorati.com/tags/RIA">RIA</a>,<a rel="tag" href="http://technorati.com/tags/SilverLight">SilverLight</a>,<a rel="tag" href="http://technorati.com/tags/silverlight+3">silverlight 3</a>,<a rel="tag" href="http://technorati.com/tags/silverlight+3+beta">silverlight 3 beta</a>,<a rel="tag" href="http://technorati.com/tags/silverlight+adobe">silverlight adobe</a>,<a rel="tag" href="http://technorati.com/tags/Video">Video</a></div>
</h3>
<br />Posted in Adobe Video Formats, concepts implemented, Digital Media, HD Video, Industry News, Proof Driven Development, Siverlight, Smooth Streaming, software as strategic, Technology Tagged: adobe, f4v, flash video, Flex, flv, H.264, H.264 AAC MP4, RIA, SilverLight, silverlight 3, silverlight 3 beta, silverlight adobe, Video <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/1314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/1314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/1314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/1314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/1314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/1314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/1314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/1314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/1314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/1314/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1314&subd=dcarr&ref=&feed=1" /><div><a href="http://team.pushbomb.com/2009/07/23/silverlight_3_beta_adobe_video_playerworking_now/"><img alt="tangent.ux Silverlight 3 Media Platform" src="http://cdn.videos.wordpress.com/B04BewKm/silverlightmedia_std.original.jpg" width="160" height="120" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2009/07/23/silverlight_3_beta_adobe_video_playerworking_now/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
	<enclosure url="http://cdn.videos.wordpress.com/B04BewKm/silverlightmedia_std.mp4" length="9577472" type="video/mp4" />

		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://www.domaindotnet.com/adobe_logo.gif" medium="image" />

		<media:group>
			<media:content url="http://cdn.videos.wordpress.com/B04BewKm/silverlightmedia_std.mp4" fileSize="9577472" type="video/mp4" medium="video" isDefault="true" duration="94" width="400" height="300" />

			<media:content url="http://cdn.videos.wordpress.com/B04BewKm/silverlightmedia_fmt1.ogv" fileSize="9577472" type="video/ogg" medium="video" isDefault="false" duration="94" width="400" height="300" />

			<media:rating scheme="urn:mpaa">g</media:rating>
			<media:title type="plain">tangent.ux Silverlight 3 Media Platform</media:title>
			<media:description type="plain">Watch the power of deep zoom when combined with the most demanding video. Normally you&#039;d be waiting and waiting. Finally now this is delivered at the speed of thought via the cloud (we support Amazon , Google, Azure, etc.)</media:description>
			<media:thumbnail url="http://cdn.videos.wordpress.com/B04BewKm/silverlightmedia_std.original.jpg" width="256" height="192" />
			<media:player url="http://v.wordpress.com/B04BewKm" width="400" height="300" />
		</media:group>
	</item>
		<item>
		<title>JetBrains Resharper 4.5 is out</title>
		<link>http://team.pushbomb.com/2009/04/16/resharper_4_5_rocks_for_dot_net_c_sharp_silverlight_devs/</link>
		<comments>http://team.pushbomb.com/2009/04/16/resharper_4_5_rocks_for_dot_net_c_sharp_silverlight_devs/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 02:12:43 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[C# 3.0 for Internal DSL]]></category>
		<category><![CDATA[Cannot live Without]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[Industry News]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Siverlight]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[Windows Presentation Foundation]]></category>
		<category><![CDATA[concepts implemented]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[software as strategic]]></category>
		<category><![CDATA[.NET 3.5. software craftsman]]></category>
		<category><![CDATA[best addin]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Must-Have]]></category>
		<category><![CDATA[Refactoring]]></category>
		<category><![CDATA[Resharper]]></category>
		<category><![CDATA[SilverLight]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2009/04/16/resharper_4_5_rocks_for_dot_net_c_sharp_silverlight_devs/</guid>
		<description><![CDATA[9 our of 10 studies prove: Resharper make your your hair grow back, your dog come home (yes even if he died), your wife will love you again and your kids will listen to you.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1339&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p align="center">&#160;</p>
<p align="center"><a href="http://www.domaindotnet.com/resharper/whatsnew45.html" target="_blank">Click Here</a> to Watch What’s New </p>
<h5>9 our of 10 studies prove: Resharper make your your hair grow back, your dog come home (yes even if he died), your wife will love you again and your kids will listen to you.</h5>
<p>OK perhaps it is not a country music song played backwards. </p>
<blockquote><p>BUT your nuts to even think about wasting all that time not using it. For someone who knows it is people not tools that always win, this is my only exception in 20 years that I will stand behind.</p>
</blockquote>
<p>&#160;</p>
<p>Why stare at a keyboard for hours wondering how to navigate a nasty tangled refactoring you know you must do when you can do the right thing AND make the 5:30 train.</p>
<p>Me? I hit the shift-ctrl-space repeatedly and am shocked when nothing happens. Then I install it and life is good again.</p>
<h4>ReSharper 4.5 Released</h4>
<p>April 8, 2009</p>
<h6>In This Issue</h6>
<p><a href="http://www.jetbrains.com/news/dotnet/news.html#rs45Intro">Introduction</a>     <br /><a href="http://www.jetbrains.com/news/dotnet/news.html#rs45-1">Performance and Memory Usage Improvements</a>     <br /><a href="http://www.jetbrains.com/news/dotnet/news.html#rs45-2">Solution-Wide Code Inspections</a></p>
<p><a href="http://www.jetbrains.com/news/dotnet/news.html#rs45-3">VB9 Support</a>     <br /><a href="http://www.jetbrains.com/news/dotnet/news.html#rs45-4">Extended Naming Style Configuration</a>     <br /><a href="http://www.jetbrains.com/news/dotnet/news.html#rs45-5">Other Enhancements</a></p>
<h5>Introduction</h5>
<p><b>ReSharper 4.5</b> is finally out, so your next productivity upgrade is just a mouse click away!</p>
<p>As announced, the new version features major improvements in performance and memory usage. After all, what is a productivity tool for if not for being agile, robust and responsive?</p>
<p>In addition to focusing on performance enhancements, we also added a number of intelligence features and improvements.</p>
<p>We&#8217;ve prepared a short <a href="http://www.jetbrains.com/resharper/documentation/presentation/rs45/whatsnew-rs45.html">Flash movie</a> to introduce the new features in ReSharper 4.5. Get the hang of things in just a few minutes! </p>
<p>For users of older versions we have a ReSharper 3.0 vs. ReSharper 4.5 <a href="http://www.jetbrains.com/resharper/features/resharper3_vs_resharper45.html">Comparison matrix</a>. <a href="http://dcarr.files.wordpress.com/2009/04/image.png"><img style="display:inline;border-width:0;margin:2px 0;" title="image" border="0" alt="image" align="right" src="http://dcarr.files.wordpress.com/2009/04/image-thumb.png?w=243&#038;h=244" width="243" height="244" /></a></p>
<p>However, if you believe a thousand words say more than a picture does, or even a movie, go ahead and read the descriptions below :)</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p align="right"><strong>Alex Morozov      <br /></strong>NET product marketing manager&#160; <br />JetBrains</p>
<h5>Performance and Memory Usage Improvements</h5>
<p>We have managed to make ReSharper load and work faster and more smoothly in general, particularly on big (and we mean BIG) solutions:</p>
<ul>
<li>Wall-time measurements of solution loading show 20 to 40 percent acceleration until the solution is ready for code editing. </li>
<li>Web site loading time has also been reduced by a third. </li>
<li>For instance, a certain mixed-language solution consisting of about 15 thousand classes now takes only 70 seconds to load, and this includes making every ReSharper feature available. </li>
</ul>
<p>The list of significantly accelerated operations includes:</p>
<ul>
<li>renaming symbols </li>
<li>finding commonly used symbols </li>
<li>creating symbols from usage </li>
<li>analyzing large XAML files. </li>
</ul>
<p>We&#8217;ve also cut down the volume of memory resources required to analyze jumbo autogenerated code files, which should especially benefit those who work with ASP.NET and LINQ to SQL. </p>
<h5>Solution-Wide Code Inspections</h5>
<p>To enable you to detect unused non-private members on the fly, we have enlisted the help of our ever-improving solution-wide analysis. We have introduced a set of specialized code inspections that only work when you let ReSharper analyze your whole solution. They help you discover:</p>
<ul>
<li>Unused non-private declarations </li>
<li>Unused return values of non-private methods </li>
<li>Unaccessed non-private fields </li>
<li>Unused parameters in non-private members </li>
<li>Abstract or virtual events that are never invoked </li>
<li>Unassigned fields </li>
<li>Members and types that can be made internal instead of public </li>
</ul>
<p>Look for these inspections in your code and on the Marker Bar, highlighted as warnings or suggestions. In addition, new code annotations are available that you can use to mark certain unused non-private types and members to prevent ReSharper from fussing about them.</p>
<h5>VB9 Support – We can forgive this transgression (Damon)</h5>
<p> Visual Basic .NET developers can now benefit from VB9 language support that includes implicitly typed local variables, object initializers, anonymous types, extension methods, lambda expressions, partial methods, and embedded XML. VB9 support is all around you, courtesy of new context actions, code completion, refactorings, and Parameter Info, among other supporting features.<br />
<h5>Extended Naming Style Configuration</h5>
<p>Now you can define custom naming style settings for different languages and symbols including:</p>
<ul>
<li>types </li>
<li>namespaces </li>
<li>interfaces </li>
<li>parameters </li>
<li>method properties and events </li>
<li>static and instance fields, etc. </li>
</ul>
<p>For every kind of symbol, you can configure one of five casing options, prefixes and suffixes, variations for different access rights, abbreviations to preserve, or enable naming inspections. As a result, you can precisely align the way ReSharper completes and generates code with your specific coding guidelines.</p>
<h5>Other Enhancements</h5>
<ul>
<li><b>Go to Implementation</b> &#8211; This new navigation feature lets you jump from usage of a base type or member to any of its end implementations, bypassing intermediate steps in the inheritance chain. </li>
<li><b>New and Improved Refactorings</b> &#8211; ReSharper 4.5 has added Inline Field to its family of Inline refactorings. Rename refactoring now provides name completion, and some of the other refactorings were thoroughly refactored themselves, to make them perform faster. </li>
<li><b>Native MSTest Support</b> &#8211; Initially available through VstsUnit Plugin and then Gallio, MSTest support has finally made its way to being provided natively in ReSharper, on par with nUnit. </li>
<li><b>Wider Cross-Language Capabilities</b> &#8211; Quick-fixes and context actions work better in many cross-language scenarios: for example, you can extend a control written in VB.NET+XAML by choosing &quot;create from usage&quot; right from a C# usage. Add increased coverage for XAML and ASP.NET, and you get a substantial package of improvements. </li>
<li><b>Smoother Language and Framework Support</b> &#8211; Following the tradition of ReSharper 4.1, we have improved compatibility with F#, Compact Framework, Silverlight 2, and other languages and tools. </li>
</ul>
<p>Grab your all-new productivity &#8211; download ReSharper 4.5 now at <a href="http://www.jetbrains.com/resharper/download/index.html">http://www.jetbrains.com/resharper/download</a>. </p>
<p>ReSharper 4.5 is provided as a free upgrade from ReSharper 4.0. If you own an older version, please contact us to check your upgrade availability at <a href="mailto:sales@jetbrains.com">sales@jetbrains.com</a>. </p>
<p>&#160;</p>
<h4>JetBrains Team</h4>
<ul>
<li>
<p><a href="http://www.jetbrains.com/company/people/Anchipolevsky_Sergey.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Sergey_Anchipolevsky_small.gif" />Sergey           <br />Anchipolevsky</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Alshannikov_Igor.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Alshannikov_Igor_small.gif" />Igor           <br />Alshannikov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Anisimov_Alexander.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Anisimov_Alexander_small.gif" />Alexander           <br />Anisimov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Avdeev_Dmitry.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Avdeev_Dmitry_small.gif" />Dmitry           <br />Avdeev</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Baranov_Sergey.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Sergey_Baranov_small.gif" />Sergey           <br />Baranov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Belyaev_Yury.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Yury_Belyaev_small.gif" />Yury           <br />Belyaev</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Belyaeva_Natalia.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Natalia_Belyaeva_small.gif" />Natalia           <br />Belyaeva</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Bukreeva_Elena.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Bukreeva_Elena_small.gif" />Elena           <br />Bukreeva</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Bulenkov_Konstantin.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Bulenkov_Konstantin_small.gif" />Bulenkov           <br />Konstantin</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Charif_Jana.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Jana_Charif_small.gif" />Jana           <br />Charif</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Chashnikov_Nikolay.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Nikolay_Chashnikov_small.gif" />Nikolay           <br />Chashnikov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Alexander_Chernikov.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/soon.gif" />Alexander           <br />Chernikov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Chernyatchik_Roman.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Roman_Chernyatchik_small.gif" />Roman           <br />Chernyatchik</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Coox_Sergey.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Coox_Sergey_small.gif" />Sergey           <br />Coox</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Dmitriev_Sergey.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Sergey_Dmitriev_small.gif" />Sergey           <br />Dmitriev</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Dumov_Ilia.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Ilia_Dumov_small.gif" />Ilia           <br />Dumov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Falk_Kirill.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Kirill_Falk_small.gif" />Kirill           <br />Falk</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Gerasimov_Michael.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Michael_Gerasimov_small.gif" />Michael           <br />Gerasimov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Golovachev_Sergey.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Sergey_Golovachev_small.gif" />Sergey           <br />Golovachev</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Gopachenko_Alexey.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Alexey_Gopachenko_small.gif" />Alexey           <br />Gopachenko</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Gromov_Peter.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Gromov_Peter_small.gif" />Peter           <br />Gromov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Michaela_Hroncova.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Michaela_Hroncova_small.gif" />Michaela           <br />Hroncová</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Jemerov_Dmitry.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Dmitry_Jemerov_small.gif" />Dmitry           <br />Jemerov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Khalusova_Maria.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Khalusova_Maria_small.gif" />Maria           <br />Khalusova</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Kipiatkov_Valentin.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Valentin_Kipiatkov_small.gif" />Valentin           <br />Kipiatkov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Konopko_Cyril.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Konopko_Kirill_small.gif" />Cyril           <br />Konopko</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Kozlova_Anna.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/soon.gif" />Anna           <br />Kozlova</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Kropotov_Mikhail.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Mikhail_Kropotov_small.gif" />Mikhail           <br />Kropotov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Kudelevsky_Eugene.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Kudelevsky_Eugene_small.gif" />Eugene           <br />Kudelevsky</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Kudravtsev_Alexey.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Alexey_Kudravtsev_small.gif" />Alexey           <br />Kudravtsev</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Lobacheva_Olga.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Lobacheva_Olga_small.gif" />Olga           <br />Lobacheva</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Lukianov_Vyacheslav.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Vyacheslav_Lukianov_small.gif" />Vyacheslav           <br />Lukianov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Makeev_Anton.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Anton_Makeev_small.gif" />Anton           <br />Makeev</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Malishev_Egor.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Malishev_Egor_small.gif" />Egor           <br />Malyshev</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Marakulina_Maria.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Maria_Marakulina_small.gif" />Maria           <br />Marakulina</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Maximov_Kirill.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Kirill_Maximov_small.gif" />Kirill           <br />Maximov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Maximova_Sasha.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Sasha_Maximova_small.gif" />Sasha           <br />Maximova</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Megorskaya_Irina.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/soon.gif" />Irina           <br />Megorskaya</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Morawiecova_Lucie.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Morawiecova_Lucie_small.gif" />Lucie           <br />Morawiecova</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Morozov_Alexander.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Morozov_Alexander_small.gif" />Alexander           <br />Morozov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Mossienko_Maxim.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Mossienko_Maxim_small.gif" />Maxim           <br />Mossienko</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Musienko_Ekaterina.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Musienko_Ekaterina_small.gif" />Ekaterina           <br />Musienko</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Oreshnikova_Ann.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Ann_Oreshnikova_small.gif" />Ann           <br />Oreshnikova</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Pasynkov_Eugene.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Eugene_Pasynkov_small.gif" />Eugene           <br />Pasynkov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Pech_Vaclav.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Vaclav_Pech_small.gif" />Vaclav           <br />Pech</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Pegov_Alexey.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Alexey_Pegov_small.gif" />Alexey           <br />Pegov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Petrenko_Eugene.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Petrenko_Eugene_small.gif" />Eugene           <br />Petrenko</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Petrovskaya_Irina.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Irina_Petrovskaya_small.gif" />Irina           <br />Petrovskaya</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Pilin_Mikhail.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Mikhail_Pilin_small.gif" />Mikhail           <br />Pilin</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Repina_Julia.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Julia_Repina_small.gif" />Julia           <br />Repina</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Revyakina_Elizaveta.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Elizaveta_Revyakina_small.gif" />Elizaveta           <br />Revyakina</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Ryzhenkov_Ilya.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Ryzhenkov_Ilya_small.gif" />Ilya           <br />Ryzhenkov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Serebryansky_Andrew.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Serebryansky_Andrew_small.gif" />Andrew           <br />Serebryansky</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Sergey_Ilya.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Sergey_Ilya_small.gif" />Ilya           <br />Sergey</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Shafirov_Maxim.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Maxim_Shafirov_small.gif" />Maxim           <br />Shafirov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Slavina_Tatiana.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Tatiana_Slavina_small.gif" />Tatiana           <br />Slavina</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Smirnova_Olesya.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Olesya_Smirnova_small.gif" />Olesya           <br />Smirnova</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Solomatov_Konstantin.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Konstantin_Solomatov_small.gif" />Konstantin           <br />Solomatov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Stepanov_Oleg.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Oleg_Stepanov_small.gif" />Oleg           <br />Stepanov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Sher_Pavel.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Sher_Pavel_small.gif" />Pavel           <br />Sher</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Shliakhovetskaja_Ekaterina.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Shliakhovetskaja_Ekaterina_small.gif" />Ekaterina           <br />Shliakhovetskaja</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Shpynov_Oleg.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Shpynov_Oleg_small.gif" />Oleg           <br />Shpynov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Shrago_Gregory.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Shrago_Gregory_small.gif" />Gregory           <br />Shrago</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Toporov_Eugene.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Eugene_Toporov_small.gif" />Eugene           <br />Toporov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Udov_George.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Udov_George_small.gif" />George           <br />Udov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Vasiliev_Sergey.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Sergey_Vasiliev_small.gif" />Sergey           <br />Vasiliev</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Yaremych_Natalie.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Natalie_Yaremych_small.gif" />Natalie           <br />Yaremych</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Yarko_Yegor.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Yarko_Yegor_small.gif" />Yegor           <br />Yarko</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Zambalayev_Timur.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Zambalayev_Timur_small.gif" />Timur           <br />Zambalayev</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Zhukov_Sergey.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Sergey_Zhukov_small.gif" />Sergey           <br />Zhukov</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Zhuravlev_Eugene.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Eugene_Zhuravlev_small.gif" />Eugene           <br />Zhuravlev</a></p>
</li>
<li>
<p><a href="http://www.jetbrains.com/company/people/Alexander_Zverev.html"><img alt="photo" src="http://www.jetbrains.com/company/people/photos/Alexander_Zverev_small.gif" />Alexander           <br />Zverev</a></p>
</li>
</ul>
<div class="wlWriterHeaderFooter" style="text-align:right;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=http%3a%2f%2fdcarr.wordpress.com%2f2009%2f04%2f16%2fresharper_4_5_rocks_for_dot_net_c_sharp_silverlight_devs%2f&amp;title=JetBrains+Resharper+4.5+is+out"><img src="http://digg.com/img/badges/100x20-digg-button.png" width="100" height="20" alt="Digg This" title="Digg This" border="0" style="border:0;" /></a></div>
<br />Posted in C# 3.0 Enhancements, C# 3.0 for Internal DSL, Cannot live Without, concepts implemented, Functional Programming, Industry News, Linq, resharper, Siverlight, software as strategic, Software Design, Software Futures, Technology, Tips and Tricks, Visual Studio 2010, Windows Presentation Foundation Tagged: .NET 3.5. software craftsman, best addin, C#, Must-Have, Refactoring, Resharper, SilverLight, Visual Studio 2008 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/1339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/1339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/1339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/1339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/1339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/1339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/1339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/1339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/1339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/1339/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1339&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2009/04/16/resharper_4_5_rocks_for_dot_net_c_sharp_silverlight_devs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2009/04/image-thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Anchipolevsky_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Alshannikov_Igor_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Anisimov_Alexander_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Avdeev_Dmitry_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Baranov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Yury_Belyaev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Natalia_Belyaeva_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Bukreeva_Elena_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Bulenkov_Konstantin_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Jana_Charif_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Nikolay_Chashnikov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/soon.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Roman_Chernyatchik_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Coox_Sergey_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Dmitriev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Ilia_Dumov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Kirill_Falk_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Michael_Gerasimov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Golovachev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Alexey_Gopachenko_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Gromov_Peter_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Michaela_Hroncova_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Dmitry_Jemerov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Khalusova_Maria_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Valentin_Kipiatkov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Konopko_Kirill_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/soon.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Mikhail_Kropotov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Kudelevsky_Eugene_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Alexey_Kudravtsev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Lobacheva_Olga_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Vyacheslav_Lukianov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Anton_Makeev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Malishev_Egor_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Maria_Marakulina_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Kirill_Maximov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sasha_Maximova_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/soon.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Morawiecova_Lucie_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Morozov_Alexander_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Mossienko_Maxim_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Musienko_Ekaterina_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Ann_Oreshnikova_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Eugene_Pasynkov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Vaclav_Pech_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Alexey_Pegov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Petrenko_Eugene_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Irina_Petrovskaya_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Mikhail_Pilin_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Julia_Repina_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Elizaveta_Revyakina_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Ryzhenkov_Ilya_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Serebryansky_Andrew_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Ilya_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Maxim_Shafirov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Tatiana_Slavina_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Olesya_Smirnova_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Konstantin_Solomatov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Oleg_Stepanov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sher_Pavel_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Shliakhovetskaja_Ekaterina_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Shpynov_Oleg_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Shrago_Gregory_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Eugene_Toporov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Udov_George_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Vasiliev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Natalie_Yaremych_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Yarko_Yegor_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Zambalayev_Timur_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Zhukov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Eugene_Zhuravlev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Alexander_Zverev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>C# Delegate Shortcut &#8211; No more null testing on events for subscribers</title>
		<link>http://team.pushbomb.com/2008/11/27/very_nice_c_sharp_shortcut/</link>
		<comments>http://team.pushbomb.com/2008/11/27/very_nice_c_sharp_shortcut/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 20:57:14 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[concepts implemented]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[delegate]]></category>
		<category><![CDATA[IDesign]]></category>
		<category><![CDATA[Juval Lowy]]></category>
		<category><![CDATA[null]]></category>
		<category><![CDATA[null object pattern]]></category>
		<category><![CDATA[shortcut]]></category>
		<category><![CDATA[skip check]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/11/27/very_nice_c_sharp_shortcut/</guid>
		<description><![CDATA[This is fairly well known but I realized I hadn’t seen it blogged about (sorry if already covered).<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1168&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f11%2f27%2fvery_nice_c_sharp_shortcut%2f"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f11%2f27%2fvery_nice_c_sharp_shortcut%2f" border="0" alt="kick it on DotNetKicks.com" /></a></p>
<p>This is fairly well known but I realized I hadn’t seen it blogged about (sorry if already covered).</p>
<p>Your likely used to doing this:</p>
<pre class="code"><strong> public event EventHandler&lt;AnimationImageEventArgs&gt;
                AnimationImageClicked;</strong></pre>
<pre class="code"><strong> private void OnClick(object sender, AnimationImageEventArgs e)
{</strong></pre>
<pre class="code"><strong>    if (AnimationImageClicked != null)</strong></pre>
<pre class="code"><strong>          AnimationImageClicked(sender, e);
}</strong></pre>
<p>No need for that null check. I for one tend to forget them in the bowels of my teams code. What is better then eliminating the issue!</p>
<p>This is a way to ‘always have one subscriber’ which you can consider a sort of <a href="http://en.wikipedia.org/wiki/Null_Object_pattern">‘null object’ pattern</a> implementation for delegates. Checking for null just sucks and I love this kind of ubiquitous removal of it.</p>
<p>The first person I saw doing this was <a href="http://www.oreillynet.com/pub/au/741">Juval Lowy</a>, the master craftsman for basically all things .NET but known recently for utter mastery of WCF in his books and at his firm <a href="http://www.idesign.net/idesign/">IDesign</a>. Highly recommend all his writing, code samples and thoughts.</p>
<pre class="code"><strong>public event EventHandler&lt;AnimationImageEventArgs&gt;
            AnimationImageClicked = delegate { };</strong></pre>
<pre class="code"><strong>private void OnClick(object sender, AnimationImageEventArgs e)
{</strong></pre>
<pre class="code"><strong>           AnimationImageClicked(sender, e);
}</strong></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Damon</p>
<div class="wlWriterHeaderFooter" style="text-align:left;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=http%3a%2f%2fdcarr.wordpress.com%2f2008%2f11%2f27%2fvery_nice_c_sharp_shortcut%2f&amp;title=C%23+Delegate+Shortcut+%e2%80%93+No+more+null+testing+on+events+for+subscribers"><img style="border:0;" title="Digg This" src="http://digg.com/img/badges/100x20-digg-button.png" border="0" alt="Digg This" width="100" height="20" /></a></div>
<br />Posted in concepts implemented, Technology, Tips and Tricks Tagged: C#, delegate, IDesign, Juval Lowy, null, null object pattern, shortcut, skip check <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/1168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/1168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/1168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/1168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/1168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/1168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/1168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/1168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/1168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/1168/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1168&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/11/27/very_nice_c_sharp_shortcut/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f11%2f27%2fvery_nice_c_sharp_shortcut%2f" medium="image">
			<media:title type="html">kick it on DotNetKicks.com</media:title>
		</media:content>

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>SharePoint MOSS 2007 &#8216;DeepZoom 3D&#8217; is Here&#8230;.Click Below&#8230;</title>
		<link>http://team.pushbomb.com/2008/11/19/sharepoint-moss-3d-is-almost-ready-this-was-taken-this-morning/</link>
		<comments>http://team.pushbomb.com/2008/11/19/sharepoint-moss-3d-is-almost-ready-this-was-taken-this-morning/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 15:25:56 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[Framework Design]]></category>
		<category><![CDATA[Industry News]]></category>
		<category><![CDATA[Siverlight]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows Presentation Foundation]]></category>
		<category><![CDATA[agile practices]]></category>
		<category><![CDATA[concepts implemented]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[software as strategic]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[domain.dot.net]]></category>
		<category><![CDATA[MOSS]]></category>
		<category><![CDATA[Opacity]]></category>
		<category><![CDATA[Perspective]]></category>
		<category><![CDATA[taxonomy]]></category>
		<category><![CDATA[Visualization]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/?p=1111</guid>
		<description><![CDATA[The breakthough for discovering your information in the Sharepoint world is almost here. This image is absolutely real and 100% cross-platform in the browser via Silverlight. None of us have ever seen anything like this. How about you?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1111&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"> </p>
<p style="text-align:center;"> <span>can </span></p>
<p style="text-align:center;"><span>you</span></p>
<p style="text-align:center;"><span>find</span></p>
<p style="text-align:center;"><span>the</span></p>
<p style="text-align:center;"><span>ghosts?</span></p>
<div id="attachment_1112" class="wp-caption aligncenter" style="width: 250px"><a href="http://www.domaindotnet.com/ClientBin/DeepZoom3D.html"><img class="size-full wp-image-1112 " style="display:inline;border:black 2px solid;margin:0 55px 0 0;" title="sharepoint3d" src="http://dcarr.files.wordpress.com/2008/11/sharepoint3d.png?w=240&#038;h=188" alt="a PowerPoint document in our breakthrough navigation and discovery technology" width="240" height="188" align="left" /></a><p class="wp-caption-text">click me and be prepared</p></div>
<p> </p>
<p style="text-align:center;">Send a screen shot if you find them to : <a href="mailto:innovate@domaindotnet.com">innovate@domaindotnet.com</a> and the best image will recieve some swag! Non-trivial swag as well! </p>
<p style="text-align:center;"> </p>
<p style="text-align:center;"><a title="Full perspective in 3D" href="http://blog.domaindotnet.com/2008/11/07/sharepoint-moss-3d-is-almost-ready-this-was-taken-this-morning/sharepoint3d/"></a></p>
<div class="vcard"><span class="fn n"><span class="given-name">Damon</span> <span class="additional-name">Wilder</span> <span class="given-family">Carr</span> </span></div>
<div class="org">domain.dot.net</div>
<div class="org">team labs</div>
<div><a class="email" href="mailto:damon@domaindotnet.com">damon@domaindotnet.com</a></div>
<div class="adr">
<div class="tel"><a class="htc" href="646.853.3504"></a><a class="htc" href="646.853.3504"></a><a class="htc" href="646.853.3504"><a class="htc" href="646.853.3504">646.853.3504</a></a></div>
<div><a class="url" href="http://www.domaindotnet.com">http://www.domaindotnet.com</a></div>
</div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<h3>Related Posts</h3>
<div class="wlw_related_posts">from tag <a href="http://del.icio.us/damoncarr/sharepoint">SharePoint</a></div>
<ul>
<li><a href="http://msdn2.microsoft.com/en-us/office/bb251754.aspx">Business Data Catalog</a></li>
<li><a href="http://sharepointrss.com/">SharePoint RSS Alpha</a></li>
<li><a href="http://www.microsoft.com/technet/windowsserver/sharepoint/wssapps/templates/default.mspx">Templates for SharePoint</a></li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms948927.aspx">Creating a Web Part with Custom Properties</a></li>
<li><a href="http://www.sharepoint-tips.com/2007/05/sharepoint-designer-article-2-creating.html">SharePoint Creating XSLT DataView</a></li>
<li><a href="http://www.codeplex.com/smartpart">SmartPart for SharePoint &#8211; Home</a></li>
<li><a href="http://msdn2.microsoft.com/en-us/library/bb264593.aspx">Windows SharePoint Services 3.0</a></li>
</ul>
<p>from tag <a href="http://del.icio.us/damoncarr/C#">C#</a></p>
<ul>
<li><a href="terms=video&amp;folder=103006&amp;folder=103007&amp;folder=103008&amp;folder=103009&amp;folder=103010&amp;folder=103011&amp;folder=103012&amp;sort=14&amp;queryType=1">Video Favorites</a></li>
<li><a href="http://www.codeplex.com/SharpArchitecture">S#arp Architecture: ASP.NET MVC with NHibernate &#8211; Home</a></li>
<li><a href="http://skillsmatter.com/go/open-source-dot-net">Skills Matter OPEN SOURCE .NET</a></li>
<li><a href="http://www.castleproject.org/">Home :: Castle Project</a></li>
<li><a href="http://blog.domaindotnet.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/">NHibernate 2.0 gold Released – Must Wait for ‘Linq to NHibernate’ « ubiquitous fluency</a></li>
</ul>
<p><a href="http://del.icio.us/damoncarr/C#">(more..)</a></p>
<br />Posted in agile practices, C# 3.0 Enhancements, concepts implemented, Framework Design, Industry News, sharepoint, Siverlight, software as strategic, Software Design, Software Futures, Technology, Windows Presentation Foundation Tagged: .NET 3.5, 3D, C#, domain.dot.net, MOSS, Opacity, Perspective, sharepoint, taxonomy, Visualization <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/1111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/1111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/1111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/1111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/1111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/1111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/1111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/1111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/1111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/1111/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1111&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/11/19/sharepoint-moss-3d-is-almost-ready-this-was-taken-this-morning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/11/sharepoint3d.png" medium="image">
			<media:title type="html">sharepoint3d</media:title>
		</media:content>
	</item>
		<item>
		<title>NHibernate Profiler from Ayende : Maturity in ORM is here</title>
		<link>http://team.pushbomb.com/2008/11/06/nhibernate_profiler_orm_maturity_is_here/</link>
		<comments>http://team.pushbomb.com/2008/11/06/nhibernate_profiler_orm_maturity_is_here/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 07:31:13 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[Framework Design]]></category>
		<category><![CDATA[Industry News]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[ADO.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[Domain Driven]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linq to Entities]]></category>
		<category><![CDATA[NHibernate Profiler]]></category>
		<category><![CDATA[SQL Profiler]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/11/06/nhibernate_profiler_orm_maturity_is_here/</guid>
		<description><![CDATA[The always astoundingly good Ayende (Oren) is getting ready to release one of the most compelling software tools for people doing far less work with far higher quality by using NHibernate.  For the last two years or so I keep thinking ‘soon’ I can just assume teams will understand the facts around ORM and I continue to be astounded at the waste I encounter instead.





That MS SQL Certification is hard to let go I realize but is it worth acting like Sisyphus for? I have more interesting things to do and I KNOW your stakeholders are not cool with you wasting their money.





I simply mean you can think, talk, brainstorm etc. with your ‘domain experts’ without the silly attempt to handle two different systems (Relational and OO) of thought. You all share one. And you should know it. It’s called object oriented.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1109&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:right;">Stop</p>
<p style="text-align:right;">Writing.</p>
<p style="text-align:right;">Data</p>
<p style="text-align:right;">Access</p>
<p style="text-align:right;">Code</p>
<p>That MS SQL Certification is hard to let go I realize but is it worth acting like <a target="_blank" href="http://en.wikipedia.org/wiki/Sisyphus_">Sisyphus </a><a target="_blank" href="http://en.wikipedia.org/wiki/Sysphus_"></a>for? I have more interesting things to do and <strong>I KNOW your stakeholders are not cool with you wasting their money.</strong></p>
<p><strong></strong></p>
<p><a href="http://en.wikipedia.org/wiki/Image:Nekyia_Staatliche_Antikensammlungen_1494_n2.jpg"><img style="display:inline;margin:10px 0 10px 25px;" border="0" alt="" align="right" src="http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Nekyia_Staatliche_Antikensammlungen_1494_n2.jpg/280px-Nekyia_Staatliche_Antikensammlungen_1494_n2.jpg" width="233" height="240" /></a></p>
<p>I simply mean you can think, talk, brainstorm etc. with your ‘domain experts’ without the silly attempt to handle two different systems (Relational and OO) of thought. You all share one. And you should know it. It’s called object oriented.</p>
<p>Anyway… Enough pithiness (is that a word?)…</p>
<p>The always astoundingly good <a target="_blank" href="http://www.ayende.com">Ayende</a> (Oren) is getting ready to release one of the most compelling software tools for people wasting far less and ‘for free’ gaining far higher quality by using NHibernate.</p>
<p>I expect it will be a fantastic tool to use in trying to work with teams desperately clutching their ADO.NET books….</p>
<p><a href="http://ayende.com/">This is all his content from here out:</a></p>
<p>NH Prof has reached the level in which I can actually talk about the features that it has in more than abstract terms. There is still a big feature area that I want to cover (which should be a nice surprise), but the basics are there, and today I had ample proof that it is maturing just nicely. I was able to deal with quite a few of the remaining tasks by applying check listing. Basically, to do X, I had to do A,B &amp; C. Trivially simple, and quite satisfying.</p>
<p>Test coverage went back up to over 90% on the backend again, which is also nice.</p>
<p>Anyway, let us start with the tour, shall we?</p>
<p><a href="http://ayende.com/Blog/archive/2008/11/04/nh-prof-a-guided-tour.aspx"><img border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_2.png" width="655" height="557" /></a></p>
<p>The left upper pane shows the captured sessions. You can see the number of statements per each session, as well as the length time it was open.&#160; Let us move down a bit, and explore statistics.</p>
<p><a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_8.png"><img border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_3.png" width="655" height="557" /></a></p>
<p>The session factory statistics pane include a <em>lot</em> of information about NHibernate, which can give you a good indication about what is going on in the application in a global fashion. In 2.0 we have quite a few data points, but the statistics feature was significantly expanded in 2.1, and contains a lot more data and more finely grained statistics.</p>
<p>But that is probably not what gets you excited. What is likely to thrill you are the statement view.</p>
<p><a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_12.png"><img border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_5.png" width="748" height="495" /></a></p>
<p>I put a lot of though into designing those (well, into thinking about them, the actual design was handled by people who actually know what they are doing, design wise). The upper section of the screen is optimized to allow the human eye to quickly scan it in order to find all sorts of interesting patterns. Compare this to SQL Profiler UI, and you can see why I think that this is a much better version, just from that stand point.</p>
<p>The bottom half, however, is what I <em>really</em> like. This is the part I use the most often, in order to really see what is going on. I did an ad-hoc demo of the profiler in Dallas, and one of the things that cam out of this was the format that you see on the lower pane. This UI is set to allow you to just copy the query from the profiler and immediately execute a readable, easy to understand query on Management Studio or Toad. Again, another piece where I think that I providing a lot more value than SQL Profiler does.</p>
<p>For quick reference, we put the parameter values on the left of the query, so you can inspect them without having to go into a potentially complex queries to try to figure out what is what.</p>
<p>But this isn&#8217;t where it ends, let us take a look at the stack trace tab:</p>
<p><a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_16.png"><img border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_7.png" width="751" height="504" /></a></p>
<p>The stack trace will let you correlate a query and the code that generated it, and not only that, it will take you directly from the query to the code (opening visual studio, loading the file and landing you directly in the place in the code that caused this query to be executed.</p>
<p>Oh, and one more thing&#8230;</p>
<p><a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_18.png"><img border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_8.png" width="764" height="538" /></a></p>
<p>I have over four years of experience working with NHibernate, a time during which I learned quite a bit about what work, what doesn&#8217;t and what kind of things we should be aware off. The profiler has given me the chance to codify a lot of these patterns, and put them in a way that allow you to have apply early detection and prevention mechanisms.</p>
<p>And one last thing, this time it will really be the last. Session / Entity inspection:</p>
<p><a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_20.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;" border="0" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_9.png" width="749" height="527" /></a></p>
<p>You can see exactly what are the entities that were loaded by this session, including counts per entity and all the ids that were loaded.</p>
<p>I hope to be able to open it for beta testing in two to three weeks, and a 1.0 release about a month after that. Pricing is tentatively set at 200$ per user, but this is subject to change.</p>
<p><a title="http://ayende.com/Blog/archive/2008/11/04/nh-prof-a-guided-tour.aspx" href="http://ayende.com/Blog/archive/2008/11/04/nh-prof-a-guided-tour.aspx">http://ayende.com/Blog/archive/2008/11/04/nh-prof-a-guided-tour.aspx</a></p>
<h3>Amazing stuff……Buy this from Oren!</h3>
<br />Posted in Framework Design, Industry News, nhibernate, ORM, Software Futures Tagged: ADO.NET, C#, C# 3.0, Domain, Domain Driven, Linq, Linq to Entities, nhibernate, NHibernate Profiler, ORM, SQL Profiler <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/1109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/1109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/1109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/1109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/1109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/1109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/1109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/1109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/1109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/1109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=1109&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/11/06/nhibernate_profiler_orm_maturity_is_here/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Nekyia_Staatliche_Antikensammlungen_1494_n2.jpg/280px-Nekyia_Staatliche_Antikensammlungen_1494_n2.jpg" medium="image" />

		<media:content url="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/NHProfAguidedtour_6720/image_thumb_9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Linq to Gac : Use Linq to Power Query your Gac via this C# Bridge to Fusion</title>
		<link>http://team.pushbomb.com/2008/09/20/fusion_c_sharp_wrapper_for_linq_to_gac_access/</link>
		<comments>http://team.pushbomb.com/2008/09/20/fusion_c_sharp_wrapper_for_linq_to_gac_access/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 00:43:45 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[C# 3.0 for Internal DSL]]></category>
		<category><![CDATA[Framework Design]]></category>
		<category><![CDATA[Generics]]></category>
		<category><![CDATA[Proof Driven Development]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[concepts implemented]]></category>
		<category><![CDATA[CSharp]]></category>
		<category><![CDATA[DomainDriven]]></category>
		<category><![CDATA[Fusion]]></category>
		<category><![CDATA[GAC]]></category>
		<category><![CDATA[Global Assembly Cache]]></category>
		<category><![CDATA[IEnumerable]]></category>
		<category><![CDATA[IEnumerator]]></category>
		<category><![CDATA[Internals]]></category>
		<category><![CDATA[Lambada]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linq to Gac]]></category>
		<category><![CDATA[Linq to Objects]]></category>
		<category><![CDATA[Machine]]></category>
		<category><![CDATA[Registry]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/09/20/fusion_c_sharp_wrapper_for_linq_to_gac_access/</guid>
		<description><![CDATA[Now we attach the Gac Here we provide a full Linq to Objects IEnumerable wrapper over the Fusion API to allow you to have all the power of Linq queries over your entire GAC (as well as most other parts of you computer you can now join on!). This is a post to get you the GAC info now, as many have asked for it (and it might be the most widely used of this work). Things do get fun however when you start joining your GAC with your files with you registry....<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=928&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f09%2f20%2ffusion_c_sharp_wrapper_for_linq_to_gac_access%2f"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f09%2f20%2ffusion_c_sharp_wrapper_for_linq_to_gac_access%2f" border="0" alt="kick it on DotNetKicks.com" /></a></p>
<p><a href="http://digg.com/submit?url=http%3a%2f%2fdcarr.wordpress.com%2f2008%2f09%2f20%2ffusion_c_sharp_wrapper_for_linq_to_gac_access%2f&amp;title=%e2%80%98Linq+to+Gac%e2%80%99+%3a+Use+Linq+to+Power+Query+your+Gac+via+this+C%23+Bridge+to+Fusion"><img style="border-width:0;" title="Digg This" src="http://digg.com/img/badges/100x20-digg-button.png" border="0" alt="Digg This" width="100" /></a></p>
<h4>This post gets you <a href="http://en.wikipedia.org/wiki/Language_Integrated_Query" target="_blank">Linq</a> access to the GAC with no fuss.</h4>
<p>Fusion is wrapped for you so no need to understand the unmanaged stuff unless you want to. Your up and running with GAC as a new Linq to Objects source in minutes.</p>
<h2>The Big Picture of the Project (You can skip to the next section if you just want the GAC code)</h2>
<p>Note: The reason both the Gac and MyEnvironment IEnumerable&lt;T&gt; references below are different? See the reference on the bottom right of the picture into the entry point to all of it (ThisBox)?</p>
<h2>Introduction to the Fusion  IEnumerable Wrapper</h2>
<p>A simple case. I want to know how my GAC is broken into ‘Major Vendors’. We assume this is roughly the first part of the name. (i.e. Microsoft.System = Microsoft).</p>
<p>Oh yeah. Exclude the assemblies that only occur once. We are looking for the larger view here.</p>
<p>Here is an easy solution:</p>
<pre class="code"><span style="font-size:x-small;"><span style="background:black none repeat scroll 0 0;color:white;">        [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Fact</span></span><span style="font-size:x-small;"><span style="background:black none repeat scroll 0 0;color:white;">]
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public void </span></span><span style="font-size:x-small;"><span style="background:black none repeat scroll 0 0;color:white;">should_show_gac_by_vendor()
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">result = </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">from </span><span style="background:black none repeat scroll 0 0;color:white;">matchedAssembly </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">in </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">ThisBox</span><span style="background:black none repeat scroll 0 0;color:white;">.By&lt;</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">AssemblyDetail</span></span><span style="font-size:x-small;"><span style="background:black none repeat scroll 0 0;color:white;">&gt;()
                         </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">group </span><span style="background:black none repeat scroll 0 0;color:white;">matchedAssembly </span></span><span style="background:black none repeat scroll 0 0;color:#ecc03e;"><span style="font-size:x-small;">by
                             </span></span><span style="font-size:x-small;"><span style="background:black none repeat scroll 0 0;color:white;">matchedAssembly.MajorName
                             </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">into </span></span><span style="font-size:x-small;"><span style="background:black none repeat scroll 0 0;color:white;">grouping
                             </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">where </span></span><span style="font-size:x-small;"><span style="background:black none repeat scroll 0 0;color:white;">grouping.Count() &gt; 1
                             </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">orderby </span><span style="background:black none repeat scroll 0 0;color:white;">grouping.Count() </span></span><span style="background:black none repeat scroll 0 0;color:#ecc03e;"><span style="font-size:x-small;">descending
                             select </span></span><span style="font-size:x-small;"><span style="background:black none repeat scroll 0 0;color:white;">grouping;

            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span></span><span style="font-size:x-small;"><span style="background:black none repeat scroll 0 0;color:white;">TotalSum = result.Sum(ad =&gt; ad.Count());

            </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Console</span><span style="background:black none repeat scroll 0 0;color:white;">.WriteLine(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">"** ASSEMBLIES BY NAME WITH &gt; 1 REGISTERED  = {0} ***"</span></span><span style="font-size:x-small;"><span style="background:black none repeat scroll 0 0;color:white;">, TotalSum);

            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">foreach </span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">firstGroup </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">in </span></span><span style="font-size:x-small;"><span style="background:black none repeat scroll 0 0;color:white;">result)
            {
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span></span><span style="font-size:x-small;"><span style="background:black none repeat scroll 0 0;color:white;">groupCount = firstGroup.Count();
                </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Console</span><span style="background:black none repeat scroll 0 0;color:white;">.WriteLine(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">"Group '{0}' Assemblies={1} Percent={2} Public Keys Used={3}"</span></span><span style="background:black none repeat scroll 0 0;color:white;"><span style="font-size:x-small;">,
                                    firstGroup.Key,
                                    groupCount,
                                    groupCount.ToPctString(TotalSum),
                                    firstGroup.Select(ad =&gt; ad.PublicKey).Distinct().Count()
                                    );
            }
        }</span></span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<h2>** ASSEMBLIES BY NAME WITH &gt; 1 REGISTERED  = 664 ***</h2>
<p>Group &#8216;Microsoft&#8217; Assemblies=466 Percent=70.18% Public Keys Used=5<br />
Group &#8216;DevExpress&#8217; Assemblies=73 Percent=10.99% Public Keys Used=2<br />
Group &#8216;System&#8217; Assemblies=71 Percent=10.69% Public Keys Used=4<br />
Group &#8216;Policy&#8217; Assemblies=14 Percent=2.11% Public Keys Used=2<br />
Group &#8216;FSharp&#8217; Assemblies=11 Percent=1.66% Public Keys Used=1<br />
Group &#8216;VLinq&#8217; Assemblies=10 Percent=1.51% Public Keys Used=1<br />
Group &#8216;policy&#8217; Assemblies=6 Percent=0.9% Public Keys Used=2<br />
Group &#8216;PresentationFramework&#8217; Assemblies=5 Percent=0.75% Public Keys Used=1<br />
Group &#8216;mscorcfg&#8217; Assemblies=2 Percent=0.3% Public Keys Used=1<br />
Group &#8216;WebDev&#8217; Assemblies=2 Percent=0.3% Public Keys Used=1<br />
Group &#8216;VSTADTEProvider&#8217; Assemblies=2 Percent=0.3% Public Keys Used=1<br />
Group &#8216;VsWebSite&#8217; Assemblies=2 Percent=0.3% Public Keys Used=1</p>
<p><span style="font-size:x-small;"><span style="font-size:x-small;">Try that with GacUtil (grin)..</span></span></p>
<h2>C# GAC IEnumerable&lt;Assembly&gt; implementation</h2>
<p>Ah yes the GAC Fusion wrapper code.  Thanks to <a href="http://dotnetjunkies.com/WebLog/debasish/" target="_blank">Debasish Bose</a> for his help here.</p>
<h1>C# Fusion Gac Enumerable : <a href="http://blog.domaindotnet.com/">Domain.Dot.Net</a> Team</h1>
<p><a href="http://dcarr.files.wordpress.com/2008/09/classdiagram21.png"><img style="display:inline;border-width:0;" title="ClassDiagram2" src="http://dcarr.files.wordpress.com/2008/09/classdiagram2-thumb1.png?w=684" border="0" alt="ClassDiagram2" width="684" /></a></p>
<pre class="code"><span style="background:black none repeat scroll 0 0;color:white;">    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
    /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Just to have some room to breath
    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public class </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">AssemblyDetail </span><span style="background:black none repeat scroll 0 0;color:white;">: </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">AssemblyDetailBase
    </span><span style="background:black none repeat scroll 0 0;color:white;">{
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public </span><span style="background:black none repeat scroll 0 0;color:white;">AssemblyDetail(</span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName </span><span style="background:black none repeat scroll 0 0;color:white;">currentAssembly) : </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">base</span><span style="background:black none repeat scroll 0 0;color:white;">(currentAssembly) {}

        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public override </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">String </span><span style="background:black none repeat scroll 0 0;color:white;">FullName
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get
            </span><span style="background:black none repeat scroll 0 0;color:white;">{
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">_fullName;
            }
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public override string </span><span style="background:black none repeat scroll 0 0;color:white;">Version
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get
            </span><span style="background:black none repeat scroll 0 0;color:white;">{
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">_versionString;
            }
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public override int </span><span style="background:black none repeat scroll 0 0;color:white;">Major
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get
            </span><span style="background:black none repeat scroll 0 0;color:white;">{
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">VersionComponent(0);
            }
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public override int </span><span style="background:black none repeat scroll 0 0;color:white;">Minor
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get
            </span><span style="background:black none repeat scroll 0 0;color:white;">{
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">VersionComponent(1);
            }
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public override int </span><span style="background:black none repeat scroll 0 0;color:white;">Revision
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get
            </span><span style="background:black none repeat scroll 0 0;color:white;">{
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">VersionComponent(2);
            }
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public override int </span><span style="background:black none repeat scroll 0 0;color:white;">Build
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get
            </span><span style="background:black none repeat scroll 0 0;color:white;">{
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">VersionComponent(3);
            }
        }

        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public override string </span><span style="background:black none repeat scroll 0 0;color:white;">PublicKey
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get
            </span><span style="background:black none repeat scroll 0 0;color:white;">{
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">_pkey;
            }
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public override string </span><span style="background:black none repeat scroll 0 0;color:white;">MajorName
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get
            </span><span style="background:black none repeat scroll 0 0;color:white;">{
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">_majorName;
            }
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">String </span><span style="background:black none repeat scroll 0 0;color:white;">Name
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get
            </span><span style="background:black none repeat scroll 0 0;color:white;">{
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">_fullName;
            }
        }

        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">VersionComponent(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">position)
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">_version.Length &lt;= position + 1
                           ? </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Convert</span><span style="background:black none repeat scroll 0 0;color:white;">.ToInt32(_version[position]) : 0;
        }
    }</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="background:black none repeat scroll 0 0;color:white;">    #region

    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System;
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System.Runtime.InteropServices;

    #endregion

    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
    /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Alpha - Comment and Add Regressions
    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public abstract class </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">AssemblyDetailBase
    </span><span style="background:black none repeat scroll 0 0;color:white;">{
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">protected string </span><span style="background:black none repeat scroll 0 0;color:white;">_fullName;
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">protected string </span><span style="background:black none repeat scroll 0 0;color:white;">_majorName;
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">string</span><span style="background:black none repeat scroll 0 0;color:white;">[] _nameSplit;
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">protected string </span><span style="background:black none repeat scroll 0 0;color:white;">_pkey;
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">string </span><span style="background:black none repeat scroll 0 0;color:white;">_rawname;
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">protected string</span><span style="background:black none repeat scroll 0 0;color:white;">[] _version;
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">protected string </span><span style="background:black none repeat scroll 0 0;color:white;">_versionString;

        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
        /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Initializes a new instance of the </span><span style="background:black none repeat scroll 0 0;color:gray;">&lt;see cref=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"AssemblyDetailBase"</span><span style="background:black none repeat scroll 0 0;color:gray;">/&gt; </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">class.
        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
        /// &lt;param name=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"Current"</span><span style="background:black none repeat scroll 0 0;color:gray;">&gt;</span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">The current.</span><span style="background:black none repeat scroll 0 0;color:gray;">&lt;/param&gt;
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">protected </span><span style="background:black none repeat scroll 0 0;color:white;">AssemblyDetailBase(</span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName </span><span style="background:black none repeat scroll 0 0;color:white;">Current)
        {
            ExtractParsedDetail(Current);
        }

        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public abstract string </span><span style="background:black none repeat scroll 0 0;color:white;">FullName
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get</span><span style="background:black none repeat scroll 0 0;color:white;">;
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public abstract string </span><span style="background:black none repeat scroll 0 0;color:white;">Version
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get</span><span style="background:black none repeat scroll 0 0;color:white;">;
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public abstract int </span><span style="background:black none repeat scroll 0 0;color:white;">Major
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get</span><span style="background:black none repeat scroll 0 0;color:white;">;
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public abstract int </span><span style="background:black none repeat scroll 0 0;color:white;">Minor
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get</span><span style="background:black none repeat scroll 0 0;color:white;">;
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public abstract int </span><span style="background:black none repeat scroll 0 0;color:white;">Revision
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get</span><span style="background:black none repeat scroll 0 0;color:white;">;
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public abstract int </span><span style="background:black none repeat scroll 0 0;color:white;">Build
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get</span><span style="background:black none repeat scroll 0 0;color:white;">;
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public abstract string </span><span style="background:black none repeat scroll 0 0;color:white;">PublicKey
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get</span><span style="background:black none repeat scroll 0 0;color:white;">;
        }
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public abstract string </span><span style="background:black none repeat scroll 0 0;color:white;">MajorName
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get</span><span style="background:black none repeat scroll 0 0;color:white;">;
        }

        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
        /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">I do not want to persist the IAssemblyName
        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">as it might introduce a COM reference when
        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">we just can extract what we need and let it
        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">pass away into whatever...
        </span><span style="background:black none repeat scroll 0 0;color:gray;">///
        /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Extracts the parsed detail.
        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
        /// &lt;param name=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"Current"</span><span style="background:black none repeat scroll 0 0;color:gray;">&gt;</span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">The current.</span><span style="background:black none repeat scroll 0 0;color:gray;">&lt;/param&gt;
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">void </span><span style="background:black none repeat scroll 0 0;color:white;">ExtractParsedDetail(</span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName </span><span style="background:black none repeat scroll 0 0;color:white;">Current)
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">const int </span><span style="background:black none repeat scroll 0 0;color:white;">stongKeyPosition = 3;
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">const int </span><span style="background:black none repeat scroll 0 0;color:white;">versionPosition = 1;

            </span><span style="background:black none repeat scroll 0 0;color:#bcf5c9;">// Main Work Happens Here
            </span><span style="background:black none repeat scroll 0 0;color:white;">_fullName = GetDisplayName(Current);

            </span><span style="background:black none repeat scroll 0 0;color:#bcf5c9;">// Simply parse the ", " that seperates the full
            // name
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">_parsedDetails = _fullName.Split(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">new</span><span style="background:black none repeat scroll 0 0;color:white;">[]
                                                 {
                                                         </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">", "
                                                 </span><span style="background:black none repeat scroll 0 0;color:white;">}, </span><span style="background:black none repeat scroll 0 0;color:#b8a223;">StringSplitOptions</span><span style="background:black none repeat scroll 0 0;color:white;">.RemoveEmptyEntries);

            ExtractVersionInfo(versionPosition, _parsedDetails);
            ExtractAddition(stongKeyPosition, _parsedDetails);
        }

        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">void </span><span style="background:black none repeat scroll 0 0;color:white;">ExtractAddition(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">stongKeyPosition, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">string</span><span style="background:black none repeat scroll 0 0;color:white;">[] parsedDetails)
        {
            _pkey = parsedDetails[stongKeyPosition];
            _rawname = parsedDetails[0].Trim();
            _nameSplit = _rawname.Split(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">'.'</span><span style="background:black none repeat scroll 0 0;color:white;">);
            _majorName = _nameSplit[0].Trim();
        }

        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
        /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Gets the display name from the unmanaged pointer
        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
        /// &lt;param name=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"aName"</span><span style="background:black none repeat scroll 0 0;color:gray;">&gt;</span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">A name.</span><span style="background:black none repeat scroll 0 0;color:gray;">&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">static string </span><span style="background:black none repeat scroll 0 0;color:white;">GetDisplayName(</span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName </span><span style="background:black none repeat scroll 0 0;color:white;">aName)
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">displayFlags = </span><span style="background:black none repeat scroll 0 0;color:#b8a223;">AssemblyNameDisplayFlags</span><span style="background:black none repeat scroll 0 0;color:white;">.ALL;

            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint </span><span style="background:black none repeat scroll 0 0;color:white;">uiLen = 0;

            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">string </span><span style="background:black none repeat scroll 0 0;color:white;">_displayAssemblyName = </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">null</span><span style="background:black none repeat scroll 0 0;color:white;">;

            </span><span style="background:black none repeat scroll 0 0;color:#bcf5c9;">// Get the length
            </span><span style="background:black none repeat scroll 0 0;color:white;">aName.GetDisplayName(</span><span style="background:black none repeat scroll 0 0;color:#76a38a;">IntPtr</span><span style="background:black none repeat scroll 0 0;color:white;">.Zero, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">ref </span><span style="background:black none repeat scroll 0 0;color:white;">uiLen, (</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint</span><span style="background:black none repeat scroll 0 0;color:white;">) displayFlags);

            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">if </span><span style="background:black none repeat scroll 0 0;color:white;">(uiLen &gt; 0)
            {
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">byteBuffer = </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">new byte</span><span style="background:black none repeat scroll 0 0;color:white;">[(uiLen + 1)*2];
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">unsafe </span><span style="background:black none repeat scroll 0 0;color:#bcf5c9;">//turn on sunsafe in project properties
                </span><span style="background:black none repeat scroll 0 0;color:white;">{
                    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">fixed </span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">byte</span><span style="background:black none repeat scroll 0 0;color:white;">* numRef1 = byteBuffer)
                    {
                        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">ptr1 = </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">new </span><span style="background:black none repeat scroll 0 0;color:#76a38a;">IntPtr</span><span style="background:black none repeat scroll 0 0;color:white;">(numRef1);
                        aName.GetDisplayName(ptr1, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">ref </span><span style="background:black none repeat scroll 0 0;color:white;">uiLen, (</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint</span><span style="background:black none repeat scroll 0 0;color:white;">) displayFlags);
                        _displayAssemblyName = </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Marshal</span><span style="background:black none repeat scroll 0 0;color:white;">.PtrToStringUni(ptr1);
                    }
                }
            }

            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">_displayAssemblyName;
        }

        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
        /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Extracts the version info.
        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
        /// &lt;param name=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"versionPosition"</span><span style="background:black none repeat scroll 0 0;color:gray;">&gt;</span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">The version position.</span><span style="background:black none repeat scroll 0 0;color:gray;">&lt;/param&gt;
        /// &lt;param name=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"parsedDetails"</span><span style="background:black none repeat scroll 0 0;color:gray;">&gt;</span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">The parsed details.</span><span style="background:black none repeat scroll 0 0;color:gray;">&lt;/param&gt;
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">void </span><span style="background:black none repeat scroll 0 0;color:white;">ExtractVersionInfo(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">versionPosition, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">string</span><span style="background:black none repeat scroll 0 0;color:white;">[] parsedDetails)
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">versionLiteral = parsedDetails[versionPosition];
            _versionString = ToCoreVersion(versionPosition, versionLiteral);
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">if </span><span style="background:black none repeat scroll 0 0;color:white;">(_versionString != </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">String</span><span style="background:black none repeat scroll 0 0;color:white;">.Empty)
                _version = _versionString.Split(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">'.'</span><span style="background:black none repeat scroll 0 0;color:white;">);
        }

        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
        /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Gets the nice clean x.x.x.x string
        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
        /// &lt;param name=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"versionPosition"</span><span style="background:black none repeat scroll 0 0;color:gray;">&gt;</span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">The version position.</span><span style="background:black none repeat scroll 0 0;color:gray;">&lt;/param&gt;
        /// &lt;param name=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"versionLiteral"</span><span style="background:black none repeat scroll 0 0;color:gray;">&gt;</span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">The version literal.</span><span style="background:black none repeat scroll 0 0;color:gray;">&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">static string </span><span style="background:black none repeat scroll 0 0;color:white;">ToCoreVersion(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">versionPosition, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">string </span><span style="background:black none repeat scroll 0 0;color:white;">versionLiteral)
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">returnVal = </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">String</span><span style="background:black none repeat scroll 0 0;color:white;">.Empty;

            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">if </span><span style="background:black none repeat scroll 0 0;color:white;">(!</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">String</span><span style="background:black none repeat scroll 0 0;color:white;">.IsNullOrEmpty(versionLiteral))
            {
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">_indexOf = versionLiteral.IndexOf(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">"="</span><span style="background:black none repeat scroll 0 0;color:white;">);

                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">if </span><span style="background:black none repeat scroll 0 0;color:white;">(_indexOf != -1)
                    returnVal = versionLiteral.Substring(_indexOf + versionPosition);
            }

            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">returnVal;
        }
    }</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="background:black none repeat scroll 0 0;color:white;">#region

</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System.Runtime.InteropServices;

#endregion

</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">class </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">GAC
</span><span style="background:black none repeat scroll 0 0;color:white;">{
    GAC() {}

    [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">DllImport</span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">"Fusion.dll"</span><span style="background:black none repeat scroll 0 0;color:white;">, CharSet = </span><span style="background:black none repeat scroll 0 0;color:#b8a223;">CharSet</span><span style="background:black none repeat scroll 0 0;color:white;">.Auto)]
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public static extern int </span><span style="background:black none repeat scroll 0 0;color:white;">CreateAssemblyEnum(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyEnum </span><span style="background:black none repeat scroll 0 0;color:white;">ppEnum,
                                                </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IApplicationContext </span><span style="background:black none repeat scroll 0 0;color:white;">pAppCtx,
                                                </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName </span><span style="background:black none repeat scroll 0 0;color:white;">pName, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint </span><span style="background:black none repeat scroll 0 0;color:white;">dwFlags,
                                                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">pvReserved);
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="background:black none repeat scroll 0 0;color:white;">#region

</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System.Runtime.InteropServices;
</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System.Security;

#endregion

[</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">SuppressUnmanagedCodeSecurity</span><span style="background:black none repeat scroll 0 0;color:white;">, </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">ComImport</span><span style="background:black none repeat scroll 0 0;color:white;">, </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Guid</span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">"7C23FF90-33AF-11D3-95DA-00A024A85B51"</span><span style="background:black none repeat scroll 0 0;color:white;">),
 </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">InterfaceType</span><span style="background:black none repeat scroll 0 0;color:white;">(1)]
</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public interface </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IApplicationContext
</span><span style="background:black none repeat scroll 0 0;color:white;">{
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">void </span><span style="background:black none repeat scroll 0 0;color:white;">SetContextNameObject(</span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName </span><span style="background:black none repeat scroll 0 0;color:white;">pName);

    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">void </span><span style="background:black none repeat scroll 0 0;color:white;">GetContextNameObject([</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Out</span><span style="background:black none repeat scroll 0 0;color:white;">] </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName </span><span style="background:black none repeat scroll 0 0;color:white;">ppName);

    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">void </span><span style="background:black none repeat scroll 0 0;color:white;">Set([</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">MarshalAs</span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#b8a223;">UnmanagedType</span><span style="background:black none repeat scroll 0 0;color:white;">.LPWStr)] </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">string </span><span style="background:black none repeat scroll 0 0;color:white;">szName, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">pvValue, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint </span><span style="background:black none repeat scroll 0 0;color:white;">cbValue,
             </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint </span><span style="background:black none repeat scroll 0 0;color:white;">dwFlags);

    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">void </span><span style="background:black none repeat scroll 0 0;color:white;">Get([</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">MarshalAs</span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#b8a223;">UnmanagedType</span><span style="background:black none repeat scroll 0 0;color:white;">.LPWStr)] </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">string </span><span style="background:black none repeat scroll 0 0;color:white;">szName, [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Out</span><span style="background:black none repeat scroll 0 0;color:white;">] </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out int </span><span style="background:black none repeat scroll 0 0;color:white;">pvValue,
             </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">ref uint </span><span style="background:black none repeat scroll 0 0;color:white;">pcbValue, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint </span><span style="background:black none repeat scroll 0 0;color:white;">dwFlags);

    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">void </span><span style="background:black none repeat scroll 0 0;color:white;">GetDynamicDirectory([</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Out</span><span style="background:black none repeat scroll 0 0;color:white;">] </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out int </span><span style="background:black none repeat scroll 0 0;color:white;">wzDynamicDir, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">ref uint </span><span style="background:black none repeat scroll 0 0;color:white;">pdwSize);
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="background:black none repeat scroll 0 0;color:white;">#region

</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System;
</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System.Runtime.InteropServices;
</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System.Security;
</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System.Text;

#endregion

</span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
/// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">IAssemblyName from Fusion
</span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
</span><span style="background:black none repeat scroll 0 0;color:white;">[</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">SuppressUnmanagedCodeSecurity</span><span style="background:black none repeat scroll 0 0;color:white;">, </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">ComImport</span><span style="background:black none repeat scroll 0 0;color:white;">, </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Guid</span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">"CD193BC0-B4BC-11D2-9833-00C04FC31D2E"</span><span style="background:black none repeat scroll 0 0;color:white;">),
 </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">InterfaceType</span><span style="background:black none repeat scroll 0 0;color:white;">(1)]
</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public interface </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName
</span><span style="background:black none repeat scroll 0 0;color:white;">{
    [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">PreserveSig</span><span style="background:black none repeat scroll 0 0;color:white;">]
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">SetProperty(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint </span><span style="background:black none repeat scroll 0 0;color:white;">PropertyId, </span><span style="background:black none repeat scroll 0 0;color:#76a38a;">IntPtr </span><span style="background:black none repeat scroll 0 0;color:white;">pvProperty, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint </span><span style="background:black none repeat scroll 0 0;color:white;">cbProperty);

    [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">PreserveSig</span><span style="background:black none repeat scroll 0 0;color:white;">]
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">GetProperty(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint </span><span style="background:black none repeat scroll 0 0;color:white;">PropertyId, </span><span style="background:black none repeat scroll 0 0;color:#76a38a;">IntPtr </span><span style="background:black none repeat scroll 0 0;color:white;">pvProperty, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">ref uint </span><span style="background:black none repeat scroll 0 0;color:white;">pcbProperty);

    [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">PreserveSig</span><span style="background:black none repeat scroll 0 0;color:white;">]
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">Finalize();

    [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">PreserveSig</span><span style="background:black none repeat scroll 0 0;color:white;">]
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">GetDisplayName(</span><span style="background:black none repeat scroll 0 0;color:#76a38a;">IntPtr </span><span style="background:black none repeat scroll 0 0;color:white;">szDisplayName, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">ref uint </span><span style="background:black none repeat scroll 0 0;color:white;">pccDisplayName, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint </span><span style="background:black none repeat scroll 0 0;color:white;">dwDisplayFlags);

    [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">PreserveSig</span><span style="background:black none repeat scroll 0 0;color:white;">]
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">BindToObject(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">object </span><span style="background:black none repeat scroll 0 0;color:white;">refIID, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">object </span><span style="background:black none repeat scroll 0 0;color:white;">pAsmBindSink,
                     </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IApplicationContext </span><span style="background:black none repeat scroll 0 0;color:white;">pApplicationContext,
                     [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">MarshalAs</span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#b8a223;">UnmanagedType</span><span style="background:black none repeat scroll 0 0;color:white;">.LPWStr)] </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">string </span><span style="background:black none repeat scroll 0 0;color:white;">szCodeBase, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">long </span><span style="background:black none repeat scroll 0 0;color:white;">llFlags,
                     </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">pvReserved, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint </span><span style="background:black none repeat scroll 0 0;color:white;">cbReserved, [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Out</span><span style="background:black none repeat scroll 0 0;color:white;">] </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out int </span><span style="background:black none repeat scroll 0 0;color:white;">ppv);

    [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">PreserveSig</span><span style="background:black none repeat scroll 0 0;color:white;">]
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">GetName(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">ref uint </span><span style="background:black none repeat scroll 0 0;color:white;">lpcwBuffer,
                [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Out</span><span style="background:black none repeat scroll 0 0;color:white;">, </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">MarshalAs</span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#b8a223;">UnmanagedType</span><span style="background:black none repeat scroll 0 0;color:white;">.LPWStr)] </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">StringBuilder </span><span style="background:black none repeat scroll 0 0;color:white;">pwzName);

    [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">PreserveSig</span><span style="background:black none repeat scroll 0 0;color:white;">]
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">GetVersion([</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Out</span><span style="background:black none repeat scroll 0 0;color:white;">] </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out uint </span><span style="background:black none repeat scroll 0 0;color:white;">pdwVersionHi, [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Out</span><span style="background:black none repeat scroll 0 0;color:white;">] </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out uint </span><span style="background:black none repeat scroll 0 0;color:white;">pdwVersionLow);

    [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">PreserveSig</span><span style="background:black none repeat scroll 0 0;color:white;">]
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">IsEqual(</span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName </span><span style="background:black none repeat scroll 0 0;color:white;">pName, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint </span><span style="background:black none repeat scroll 0 0;color:white;">dwCmpFlags);

    [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">PreserveSig</span><span style="background:black none repeat scroll 0 0;color:white;">]
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">Clone([</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Out</span><span style="background:black none repeat scroll 0 0;color:white;">] </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName </span><span style="background:black none repeat scroll 0 0;color:white;">pName);
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="background:black none repeat scroll 0 0;color:white;">#region

</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System.Runtime.InteropServices;
</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System.Security;

#endregion

[</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">SuppressUnmanagedCodeSecurity</span><span style="background:black none repeat scroll 0 0;color:white;">, </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">ComImport</span><span style="background:black none repeat scroll 0 0;color:white;">, </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Guid</span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">"21B8916C-F28E-11D2-A473-00C04F8EF448"</span><span style="background:black none repeat scroll 0 0;color:white;">),
 </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">InterfaceType</span><span style="background:black none repeat scroll 0 0;color:white;">(1)]
</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">interface </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyEnum
</span><span style="background:black none repeat scroll 0 0;color:white;">{
    [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">PreserveSig</span><span style="background:black none repeat scroll 0 0;color:white;">]
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">GetNextAssembly([</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Out</span><span style="background:black none repeat scroll 0 0;color:white;">] </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IApplicationContext </span><span style="background:black none repeat scroll 0 0;color:white;">ppAppCtx,
                        [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Out</span><span style="background:black none repeat scroll 0 0;color:white;">] </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName </span><span style="background:black none repeat scroll 0 0;color:white;">ppName, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint </span><span style="background:black none repeat scroll 0 0;color:white;">dwFlags);

    [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">PreserveSig</span><span style="background:black none repeat scroll 0 0;color:white;">]
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">Reset();

    [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">PreserveSig</span><span style="background:black none repeat scroll 0 0;color:white;">]
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">Clone([</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Out</span><span style="background:black none repeat scroll 0 0;color:white;">] </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyEnum </span><span style="background:black none repeat scroll 0 0;color:white;">ppEnum);
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="background:black none repeat scroll 0 0;color:white;">#region

</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System.Collections;
</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System.Collections.Generic;
</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">using </span><span style="background:black none repeat scroll 0 0;color:white;">System.Runtime.InteropServices;

#endregion

</span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
/// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Fairly basic stuff once the
</span><span style="background:black none repeat scroll 0 0;color:gray;">/// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">unmanaged stuff is all mapped
</span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public class </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">GacEnumerable </span><span style="background:black none repeat scroll 0 0;color:white;">: </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IEnumerator</span><span style="background:black none repeat scroll 0 0;color:white;">&lt;</span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName</span><span style="background:black none repeat scroll 0 0;color:white;">&gt;, </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IEnumerable</span><span style="background:black none repeat scroll 0 0;color:white;">&lt;</span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName</span><span style="background:black none repeat scroll 0 0;color:white;">&gt;
{
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">readonly </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyEnum </span><span style="background:black none repeat scroll 0 0;color:white;">_enumeration;
    </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName </span><span style="background:black none repeat scroll 0 0;color:white;">_enumCurrentAssembly;

    GacEnumerable()
    {
        HandleCom(</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">GAC</span><span style="background:black none repeat scroll 0 0;color:white;">.CreateAssemblyEnum(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out </span><span style="background:black none repeat scroll 0 0;color:white;">_enumeration, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">null</span><span style="background:black none repeat scroll 0 0;color:white;">, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">null</span><span style="background:black none repeat scroll 0 0;color:white;">,
                                         (</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">uint</span><span style="background:black none repeat scroll 0 0;color:white;">) </span><span style="background:black none repeat scroll 0 0;color:#b8a223;">AssemblyCacheFlags</span><span style="background:black none repeat scroll 0 0;color:white;">.GAC, 0));
    }

    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public static </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">GacEnumerable </span><span style="background:black none repeat scroll 0 0;color:white;">New
    {
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get
        </span><span style="background:black none repeat scroll 0 0;color:white;">{
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return new </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">GacEnumerable</span><span style="background:black none repeat scroll 0 0;color:white;">();
        }
    }

    #region IEnumerable&lt;IAssemblyName&gt; Members

    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
    /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Returns an enumerator that iterates through the collection.
    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
    /// &lt;returns&gt;
    /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">A </span><span style="background:black none repeat scroll 0 0;color:gray;">&lt;see cref=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"T:System.Collections.Generic.IEnumerator`1"</span><span style="background:black none repeat scroll 0 0;color:gray;">/&gt; </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">that can be used to iterate through the collection.
    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/returns&gt;
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IEnumerator</span><span style="background:black none repeat scroll 0 0;color:white;">&lt;</span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName</span><span style="background:black none repeat scroll 0 0;color:white;">&gt; GetEnumerator()
    {
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return this</span><span style="background:black none repeat scroll 0 0;color:white;">;
    }

    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
    /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Returns an enumerator that iterates through a collection.
    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
    /// &lt;returns&gt;
    /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">An </span><span style="background:black none repeat scroll 0 0;color:gray;">&lt;see cref=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"T:System.Collections.IEnumerator"</span><span style="background:black none repeat scroll 0 0;color:gray;">/&gt; </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">object that can be used to iterate through the collection.
    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/returns&gt;
    </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IEnumerator IEnumerable</span><span style="background:black none repeat scroll 0 0;color:white;">.GetEnumerator()
    {
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">GetEnumerator();
    }

    #endregion

    #region IEnumerator&lt;IAssemblyName&gt; Members

    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
    /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Advances the enumerator to the next element of the collection.
    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
    /// &lt;returns&gt;
    /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/returns&gt;
    /// &lt;exception cref=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"T:System.InvalidOperationException"</span><span style="background:black none repeat scroll 0 0;color:gray;">&gt;</span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">The collection was modified after the enumerator was created. </span><span style="background:black none repeat scroll 0 0;color:gray;">&lt;/exception&gt;
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">bool </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IEnumerator</span><span style="background:black none repeat scroll 0 0;color:white;">.MoveNext()
    {
        </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IApplicationContext </span><span style="background:black none repeat scroll 0 0;color:white;">context1;
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">(0 ==
                _enumeration.GetNextAssembly(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out </span><span style="background:black none repeat scroll 0 0;color:white;">context1, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">out </span><span style="background:black none repeat scroll 0 0;color:white;">_enumCurrentAssembly, 0));
    }

    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
    /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Sets the enumerator to its initial position, which is before the first element in the collection.
    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
    /// &lt;exception cref=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"T:System.InvalidOperationException"</span><span style="background:black none repeat scroll 0 0;color:gray;">&gt;</span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">The collection was modified after the enumerator was created. </span><span style="background:black none repeat scroll 0 0;color:gray;">&lt;/exception&gt;
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">void </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IEnumerator</span><span style="background:black none repeat scroll 0 0;color:white;">.Reset()
    {
        _enumeration.Reset();
    }

    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
    /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">IAssemblyName is a Fusion interface
    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Gets the element in the collection at the current position of the enumerator.
    </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
    /// &lt;value&gt;&lt;/value&gt;
    /// &lt;returns&gt;</span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">The element in the collection at the current position of the enumerator.</span><span style="background:black none repeat scroll 0 0;color:gray;">&lt;/returns&gt;
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IAssemblyName </span><span style="background:black none repeat scroll 0 0;color:white;">Current
    {
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get
        </span><span style="background:black none repeat scroll 0 0;color:white;">{
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">_enumCurrentAssembly;
        }
    }
    </span><span style="background:black none repeat scroll 0 0;color:#bcf5c9;">// Properties
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">object </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IEnumerator</span><span style="background:black none repeat scroll 0 0;color:white;">.Current
    {
        </span><span style="background:black none repeat scroll 0 0;color:#bcf5c9;">// Go to the other darn Current not this one
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">get
        </span><span style="background:black none repeat scroll 0 0;color:white;">{
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">Current;
        }
    }
    </span><span style="background:black none repeat scroll 0 0;color:#bcf5c9;">// Fields
    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public void </span><span style="background:black none repeat scroll 0 0;color:white;">Dispose()
    {
        _enumCurrentAssembly = </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">null</span><span style="background:black none repeat scroll 0 0;color:white;">;
    }

    #endregion

    </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">internal static void </span><span style="background:black none repeat scroll 0 0;color:white;">HandleCom(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">hResult)
    {
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">if </span><span style="background:black none repeat scroll 0 0;color:white;">(hResult &lt; 0)
            </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Marshal</span><span style="background:black none repeat scroll 0 0;color:white;">.ThrowExceptionForHR(hResult);
    }
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p><span style="font-size:x-small;"> </span></p>
<pre class="code"><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">[</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Flags</span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">]
</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">enum </span></span><span style="background:black none repeat scroll 0 0;color:#b8a223;"><span style="font-size:x-small;font-family:Consolas;">AssemblyCacheFlags
</span></span><span style="background:black none repeat scroll 0 0;color:white;"><span style="font-size:x-small;font-family:Consolas;">{
    NGenCache = 0x1,
    GAC = 0x2,
    DownloadCache = 0x4
}</span></span></pre>
<p><span style="font-size:x-small;"><br />
</span></p>
<pre class="code"><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">[</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Flags</span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">]
</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public enum </span></span><span style="background:black none repeat scroll 0 0;color:#b8a223;"><span style="font-size:x-small;font-family:Consolas;">AssemblyNameDisplayFlags
</span></span><span style="background:black none repeat scroll 0 0;color:white;"><span style="font-size:x-small;font-family:Consolas;">{
    VERSION = 0x01,
    CULTURE = 0x02,
    PUBLIC_KEY_TOKEN = 0x04,
    PROCESSORARCHITECTURE = 0x20,
    RETARGETABLE = 0x80,
    ALL = VERSION |
        CULTURE | PROCESSORARCHITECTURE |
        PUBLIC_KEY_TOKEN | RETARGETABLE
}</span></span></pre>
<h2>More to Come</h2>
<p>This is the tip of the iceberg so to speak. Here is a test case to show you what this now is doing and perhaps you can give us ideas where to take it. There is a lot of code. Should it be up on CodePlex? Google Code?  Your Environment Variables:</p>
<pre class="code"><span style="background:black none repeat scroll 0 0;color:white;">    <span style="font-size:x-small;font-family:Consolas;">   [</span></span><span style="background:black none repeat scroll 0 0;color:#2b91af;"><span style="font-size:x-small;font-family:Consolas;">Fact</span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">]
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public void </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">should_show_my_env()
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">sw = </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Stopwatch</span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">.StartNew();
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">dirs = </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">from </span><span style="background:black none repeat scroll 0 0;color:white;">env </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">in </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">ThisBox</span><span style="background:black none repeat scroll 0 0;color:white;">.By&lt;</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">EnvironmentVariable</span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">&gt;()
                       </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">select </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">env;
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">foreach </span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">s </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">in </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">dirs)
            {
                </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Console</span><span style="background:black none repeat scroll 0 0;color:white;">.WriteLine(s.TypeOfEnv + </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">" " </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">+ s.KeyName);
                </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Console</span><span style="background:black none repeat scroll 0 0;color:white;">.WriteLine(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">"  ==&gt;" </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">+ s.Value);
            }
            </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Console</span><span style="background:black none repeat scroll 0 0;color:white;">.WriteLine(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">"Count : " </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">+ dirs.Count());
            </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Console</span><span style="background:black none repeat scroll 0 0;color:white;">.WriteLine(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">"Search Took : " </span><span style="background:black none repeat scroll 0 0;color:white;">+ sw.ElapsedMilliseconds + </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">" ms"</span></span><span style="background:black none repeat scroll 0 0;color:white;"><span style="font-size:x-small;font-family:Consolas;">);
            sw.Stop();
        }</span></span></pre>
<p><span style="font-size:x-small;font-family:Consolas;">Let’s join our GAC with our registry!</span></p>
<p><span style="font-size:x-small;font-family:Consolas;">NOTE: we get 592 hits in 20 or so seconds… </span></p>
<pre class="code"><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">        [</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Fact</span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">]
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public void </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">should_join_policy_registry_section()
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">sw = </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Stopwatch</span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">.StartNew();

            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">result = </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:#ecc03e;">from
                             </span><span style="background:black none repeat scroll 0 0;color:white;">gac </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">in </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">ThisBox</span><span style="background:black none repeat scroll 0 0;color:white;">.By&lt;</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">AssemblyDetail</span></span><span style="background:black none repeat scroll 0 0;color:white;"><span style="font-size:x-small;font-family:Consolas;">&gt;()
                         </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:#ecc03e;">join
                             </span><span style="background:black none repeat scroll 0 0;color:white;">registryKey </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">in </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">ThisBox</span><span style="background:black none repeat scroll 0 0;color:white;">.By&lt;</span><span style="background:black none repeat scroll 0 0;color:#2b91af;">RegistryKey</span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">&gt;() 

                         </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">on </span><span style="background:black none repeat scroll 0 0;color:white;">gac.MajorName </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">equals </span></span><span style="background:black none repeat scroll 0 0;color:white;"><span style="font-size:x-small;font-family:Consolas;">registryKey.FirstRegValue()

                         </span></span><span style="background:black none repeat scroll 0 0;color:#ecc03e;"><span style="font-size:x-small;font-family:Consolas;">select new
                                </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">{
                                        gac, RegVal=registryKey.FirstRegValue()
                                };

            </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Console</span><span style="background:black none repeat scroll 0 0;color:white;">.WriteLine(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">"Count : " </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">+ result.Count());
            sw.Stop();
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">foreach </span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">a </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">in </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">result)
            {
                </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Console</span><span style="background:black none repeat scroll 0 0;color:white;">.WriteLine(a.gac.MajorName + </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">" == " </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">+ a.RegVal);
                </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Console</span><span style="background:black none repeat scroll 0 0;color:white;">.WriteLine(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">" ==&gt;" </span></span><span style="font-family:Consolas;"><span style="background:black none repeat scroll 0 0;color:white;">+ a.gac.FullName);
            }

            </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Console</span><span style="background:black none repeat scroll 0 0;color:white;">.WriteLine(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">"Search Took : " </span><span style="background:black none repeat scroll 0 0;color:white;">+ sw.ElapsedMilliseconds + </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">" ms"</span></span><span style="background:black none repeat scroll 0 0;color:white;"><span style="font-size:x-small;font-family:Consolas;">);
        }</span>
</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<h2>Appendix : A Few Extension Methods we Use<span style="background:black none repeat scroll 0 0;color:white;"> </span></h2>
<pre class="code"><span style="background:black none repeat scroll 0 0;color:white;">  </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">static class </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">LinqProviderTestExtensions
    </span><span style="background:black none repeat scroll 0 0;color:white;">{
        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;summary&gt;
        /// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Will perform each action for each
        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">'row' in the included collection
        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Each 'row' is of Type TTreeNode
        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// </span><span style="background:black none repeat scroll 0 0;color:#9ff5fd;">Will typically only be one action
        </span><span style="background:black none repeat scroll 0 0;color:gray;">/// &lt;/summary&gt;
        /// &lt;typeparam name=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"T"</span><span style="background:black none repeat scroll 0 0;color:gray;">&gt;&lt;/typeparam&gt;
        /// &lt;param name=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"items"</span><span style="background:black none repeat scroll 0 0;color:gray;">&gt;&lt;/param&gt;
        /// &lt;param name=</span><span style="background:black none repeat scroll 0 0;color:#9feca5;">"actions"</span><span style="background:black none repeat scroll 0 0;color:gray;">&gt;&lt;/param&gt;
        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">static internal void </span><span style="background:black none repeat scroll 0 0;color:white;">ForEach&lt;T&gt;(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">this </span><span style="background:black none repeat scroll 0 0;color:#9185fa;">IEnumerable</span><span style="background:black none repeat scroll 0 0;color:white;">&lt;T&gt; items, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">params </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Action</span><span style="background:black none repeat scroll 0 0;color:white;">&lt;T&gt;[] actions)
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">foreach </span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">t </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">in </span><span style="background:black none repeat scroll 0 0;color:white;">items)
                </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">foreach </span><span style="background:black none repeat scroll 0 0;color:white;">(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">var </span><span style="background:black none repeat scroll 0 0;color:white;">act </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">in </span><span style="background:black none repeat scroll 0 0;color:white;">actions)
                    act.Invoke(t);
        }

        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public static string </span><span style="background:black none repeat scroll 0 0;color:white;">FirstRegValue(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">this </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">RegistryKey </span><span style="background:black none repeat scroll 0 0;color:white;">registryKey)
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">registryKey.ValueCount &gt; 0
                           ? (</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">string</span><span style="background:black none repeat scroll 0 0;color:white;">) registryKey.GetValueNames().GetValue(0) : </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">String</span><span style="background:black none repeat scroll 0 0;color:white;">.Empty;
        }

        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public static double </span><span style="background:black none repeat scroll 0 0;color:white;">ToPercent(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">this int </span><span style="background:black none repeat scroll 0 0;color:white;">target, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">total)
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">target.ToPercent((</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">double</span><span style="background:black none repeat scroll 0 0;color:white;">) total);
        }

        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public static </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">String </span><span style="background:black none repeat scroll 0 0;color:white;">ToPctString(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">this int </span><span style="background:black none repeat scroll 0 0;color:white;">target, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">int </span><span style="background:black none repeat scroll 0 0;color:white;">total)
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:white;">target.ToPercent((</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">double</span><span style="background:black none repeat scroll 0 0;color:white;">) total) + </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">"%"</span><span style="background:black none repeat scroll 0 0;color:white;">;
        }

        </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">public static double </span><span style="background:black none repeat scroll 0 0;color:white;">ToPercent(</span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">this int </span><span style="background:black none repeat scroll 0 0;color:white;">target, </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">double </span><span style="background:black none repeat scroll 0 0;color:white;">total)
        {
            </span><span style="background:black none repeat scroll 0 0;color:#ecc03e;">return </span><span style="background:black none repeat scroll 0 0;color:#2b91af;">Math</span><span style="background:black none repeat scroll 0 0;color:white;">.Round((target/total)*100, 2);
        }
    }</span></pre>
<pre class="code"><span style="background:black none repeat scroll 0 0;color:white;">A huge Thanks:</span></pre>
<pre class="code"><a title="http://dotnetjunkies.com/WebLog/debasish/" href="http://dotnetjunkies.com/WebLog/debasish/" target="_blank">Debasish Bose</a></pre>
<pre class="code">
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4996f79e-bdd5-4823-85e8-11fd4c706280" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/Advanced+C%23">Advanced C#</a>,<a rel="tag" href="http://del.icio.us/popular/C%23+Unmanaged+Wrapper">C# Unmanaged Wrapper</a>,<a rel="tag" href="http://del.icio.us/popular/Fusion">Fusion</a>,<a rel="tag" href="http://del.icio.us/popular/GAC">GAC</a>,<a rel="tag" href="http://del.icio.us/popular/Global+Assembly+Cache">Global Assembly Cache</a>,<a rel="tag" href="http://del.icio.us/popular/IEnumerable">IEnumerable</a>,<a rel="tag" href="http://del.icio.us/popular/IEnumerator">IEnumerator</a>,<a rel="tag" href="http://del.icio.us/popular/Internals">Internals</a>,<a rel="tag" href="http://del.icio.us/popular/Lambada">Lambada</a>,<a rel="tag" href="http://del.icio.us/popular/Linq+to+Gac">Linq to Gac</a>,<a rel="tag" href="http://del.icio.us/popular/Linq+to+Objects">Linq to Objects</a>,<a rel="tag" href="http://del.icio.us/popular/Machine">Machine</a>,<a rel="tag" href="http://del.icio.us/popular/Registry">Registry</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d890b055-0d6b-4680-a4e0-6f7fb6c20546" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/Advanced+C%23">Advanced C#</a>,<a rel="tag" href="http://technorati.com/tags/C%23+Unmanaged+Wrapper">C# Unmanaged Wrapper</a>,<a rel="tag" href="http://technorati.com/tags/Fusion">Fusion</a>,<a rel="tag" href="http://technorati.com/tags/GAC">GAC</a>,<a rel="tag" href="http://technorati.com/tags/Global+Assembly+Cache">Global Assembly Cache</a>,<a rel="tag" href="http://technorati.com/tags/IEnumerable">IEnumerable</a>,<a rel="tag" href="http://technorati.com/tags/IEnumerator">IEnumerator</a>,<a rel="tag" href="http://technorati.com/tags/Internals">Internals</a>,<a rel="tag" href="http://technorati.com/tags/Lambada">Lambada</a>,<a rel="tag" href="http://technorati.com/tags/Linq+to+Gac">Linq to Gac</a>,<a rel="tag" href="http://technorati.com/tags/Linq+to+Objects">Linq to Objects</a>,<a rel="tag" href="http://technorati.com/tags/Machine">Machine</a>,<a rel="tag" href="http://technorati.com/tags/Registry">Registry</a></div>
</pre>
<h3>Related Posts</h3>
<div class="wlw_related_posts">from tag <a href="http://del.icio.us/damoncarr/Fusion">Fusion</a></p>
<ul>
<li><a href="http://blog.domaindotnet.com/2008/09/20/fusion_c_sharp_wrapper_for_linq_to_gac_access/">Linq to Gac : Use Linq to Power Query your Gac via this C# Bridge to Fusion « team domain.dot.net</a></li>
</ul>
<p>from tag <a href="http://del.icio.us/damoncarr/Lambada">Lambada</a></p>
<ul>
<li><a href="http://blog.domaindotnet.com/2008/07/24/linq-c-30-enumerable-extension-method-reference/">Linq C# 3.0 Enumerable Extension Method Reference « don’t give up on software just yet</a></li>
</ul>
<p>from tag <a href="http://del.icio.us/damoncarr/Linq">Linq</a></p>
<ul>
<li><a href="http://www.istartedsomething.com/20061029/royale-noir/">Royale Noir: secret XP theme uncovered (download) &#8211; istartedsomething</a></li>
<li><a href="/cifs/opt">linux</a></li>
<li><a href="http://www.google.co.uk/search?hl=en&amp;ie=UTF-8&amp;q=%s&amp;meta=cr%3DcountryUK%7CcountryGB">guk</a></li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms345135.aspx">Managed Data Access Inside SQL Server with ADO.NET and SQLCLR</a></li>
<li><a href="http://damon.agilefactor.com/feed">where(dev=&gt; Is.Broken(dev)).tryinject(commonsense)</a></li>
<li><a href="http://www.daveandal.net/articles/esbdocs/">Microsoft ESB Guidance (August 2007 CTP Release)</a></li>
<li><a href="http://pinguy.infogami.com/blog/210ee">What to Install After a Fresh XP Install (PinGUY&#8217;s Website)</a></li>
<li><a href="http://evanhoff.com/archive/2007/07/23/39.aspx">NHibernate SysCache Issues &#8211; Solved</a></li>
<li><a href="http://nightweed.com/printableusavotefacts.html">20 Amazing Facts About  Voting in the USA</a></li>
<li><a href="http://cdimage.ubuntu.com/kubuntu-kde4/releases/8.04/release/kubuntu-kde4-8.04.1-desktop-i386.iso">http://cdimage.ubuntu.com/kubuntu-kde4/releases/8.04/release/kubuntu-kde4-8.04.1-desktop-i386.iso</a></li>
<li><a href="http://feeds.feedburner.com/adaptiveblue/feed">BlueBlog</a></li>
<li><a href="http://damoncarr.freepolls.com/cgi-bin/util/site_admin">free Web polls</a></li>
<li><a href="http://code.google.com/">Developer Home &#8211; Google Code</a></li>
<li><a href="http://www.xmllab.net/mvpxml/">Mvp.Xml Library Documentation &#8211; Mvp.Xml.Common Namespace</a></li>
<li><a href="http://www.codeplex.com/esb">patterns &amp; practices Enterprise Service Bus Guidance &#8211; Home</a></li>
<li><a href="http://www.ifcfilms.com/">IFC Entertainment</a></li>
<li><a href="http://www.buildinglink.com/default.asp">BuildingLink</a></li>
<li><a href="http://msdn.microsoft.com/msdnmag/issues/07/02/SQLRegex/default.aspx">SQL Server 2005 Regular Expressions Make Pattern Matching</a></li>
</ul>
<p><a href="http://del.icio.us/damoncarr/Linq">(more..)</a></p>
</div>
<div class="wlWriterHeaderFooter" style="text-align:left;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=http%3a%2f%2fdcarr.wordpress.com%2f2008%2f09%2f20%2ffusion_c_sharp_wrapper_for_linq_to_gac_access%2f&amp;title=Linq+to+Gac+%3a+Use+Linq+to+Power+Query+your+Gac+via+this+C%23+Bridge+to+Fusion"><img style="border:0;" title="Digg This" src="http://digg.com/img/badges/100x20-digg-button.png" border="0" alt="Digg This" width="100" height="20" /></a></div>
<br />Posted in C# 3.0 Enhancements, C# 3.0 for Internal DSL, concepts implemented, Framework Design, Generics, Proof Driven Development, Software Design, Software Futures, Technology Tagged: CSharp, DomainDriven, Fusion, GAC, Global Assembly Cache, IEnumerable, IEnumerator, Internals, Lambada, Linq, Linq to Gac, Linq to Objects, Machine, Registry <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/928/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=928&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/09/20/fusion_c_sharp_wrapper_for_linq_to_gac_access/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<georss:point>30.196311 -97.730807</georss:point>
		<geo:lat>30.196311</geo:lat>
		<geo:long>-97.730807</geo:long>
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f09%2f20%2ffusion_c_sharp_wrapper_for_linq_to_gac_access%2f" medium="image">
			<media:title type="html">kick it on DotNetKicks.com</media:title>
		</media:content>

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/09/classdiagram2-thumb1.png" medium="image">
			<media:title type="html">ClassDiagram2</media:title>
		</media:content>

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>Expose New Linq Operations from the Screaming HashSet&lt;T&gt; Collection</title>
		<link>http://team.pushbomb.com/2008/09/08/the_fastest_dot_net_hash_set_collection_with_linq_extended_features/</link>
		<comments>http://team.pushbomb.com/2008/09/08/the_fastest_dot_net_hash_set_collection_with_linq_extended_features/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 01:36:20 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[C# 3.0 for Internal DSL]]></category>
		<category><![CDATA[Framework Design]]></category>
		<category><![CDATA[Generics]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[concepts implemented]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[HashSet]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linq to NHibernate]]></category>
		<category><![CDATA[Linq Undocumented]]></category>
		<category><![CDATA[ORM]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/09/08/the_fastest_dot_net_hash_set_collection_with_linq_extended_features/</guid>
		<description><![CDATA[Linq is not just about databases. It’s about reading the registry, your hard-disk, or even a list of function pointers to be invoked. Linq is about more event then sets (collections). It’s about making tasks easier in many cases and vastly more powerful (and most importantly your code more readable and maintainable at the same time).<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=874&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p><a target="_blank" href="http://en.wikipedia.org/wiki/Language_Integrated_Query">Linq</a> is not just about databases. It’s about reading the registry, your hard-disk, or even a list of function pointers to be invoked. Linq is about more even then sets (collections). It’s about making tasks easier in many cases and vastly more powerful (and most importantly your code more readable and maintainable at the same time).     <br /><a href="http://dcarr.files.wordpress.com/2008/09/premature-6.jpg"><img style="border-width:0;margin:0 0 15px 20px;" title="premature_optimization" border="0" alt="premature_optimization" align="right" src="http://dcarr.files.wordpress.com/2008/09/premature-6-thumb.jpg?w=244&#038;h=181" width="244" height="181" /></a></p>
<blockquote><h3>It’s astounding just how fast the <a target="_blank" href="http://msdn.microsoft.com/en-us/library/bb397727.aspx">HashSet&lt;T&gt;</a> collection is.</h3>
</blockquote>
<p>This post will show how to gain additional power that is fully supported from Microsoft which is often overlooked, yet it can solve some of the hardest problems (especially around performance however don’t prematurely optimize!).</p>
<p>&#160; <br />There are tons of cases where we need a real powerhouse to manage super-large sets (in this example we will use the registry). An entire part of the registry actually. </p>
<p>Here is the API we want to use to query the HKLM part of our registry:</p>
<pre class="code"><span style="background:black;color:white;">            </span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">FindFontsColors = </span><span style="background:black;color:#ecc03e;">from </span><span style="background:black;color:white;">rk </span><span style="background:black;color:#ecc03e;">in </span><span style="background:black;color:#2b91af;">RegistryServer</span><span style="background:black;color:white;">.Hklm
                                  </span><span style="background:black;color:#ecc03e;">where
                                          </span><span style="background:black;color:white;">rk.Name.Contains(</span><span style="background:black;color:#ecc03e;">&quot;VisualStudio&quot;</span><span style="background:black;color:white;">) &amp;&amp;
                                          rk.Name.EndsWith(</span><span style="background:black;color:#ecc03e;">&quot;FontsAndColors&quot;</span><span style="background:black;color:white;">) &amp;&amp;
                                          rk.ValueCount &gt; 0

                                  </span><span style="background:black;color:#ecc03e;">select </span><span style="background:black;color:white;">rk.Name;

</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<ul>
  </ul>
<ul>
<li>
<div align="left">The core win here is &#8216;ease of development and maintenance’ without the typical trade-off<br />
        <br />in performance. The entire equation is shifted actually so the tradeoff becomes irrelevant. </div>
</li>
<li>
<div align="left">Sure you could do this with a lot more code perhaps even a few ms faster. But at what real cost over the life of your code?</div>
</li>
<li>
<div align="left">The entire point of this post is the far greater win in maintenance and ease of understanding, without the assumed loss of things like performance.</div>
</li>
</ul>
<p>&#160;</p>
<p>When there is no intelligence available on a ‘back-end’ to parse your requests, yet you need the power of finding complex conditional results and much more, there is one recently introduced superstar that is often not described in terms of Linq:</p>
<h2>HashSet&lt;T&gt;</h2>
<p>Let’s start with some code. You know you can call ToList, ToArray, ToDictionary &amp; ToLookup on your collections (we’ll call them Sequences to stay in line with Linq terms).</p>
<ul>
<li>
<div align="right">You will see ‘sets’, ‘collections’ &amp; sequences used together in documentation today. The differences are mostly academic, however the HashSet does illustrate some of those semantic differences which we point out.</div>
</li>
</ul>
<p>We are going to add an extension method to provide us a ToHashSet capability off any IEnumerable&lt;T&gt; (in exactly the same implementation style Microsoft used internally).</p>
<p>Here is how we gain access to this type in the easiest way:</p>
<pre class="code"><span style="background:black;color:white;">    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Collections.Generic;

    </span><span style="background:black;color:gray;">/// &lt;summary&gt;
    /// </span><span style="background:black;color:#9ff5fd;">This extension method class will add a ToHashSet</span><span style="background:black;color:gray;">&lt;typeparamref name=</span><span style="background:black;color:#9feca5;">&quot;&gt;&quot;</span><span style="background:black;color:gray;">/&gt;
    /// </span><span style="background:black;color:#9ff5fd;">in exactly the same way it is provided by the others:
    </span><span style="background:black;color:gray;">///
    /// </span><span style="background:black;color:#9ff5fd;">ToList(), ToArray(), ToDictionary().. Now ToHashSet() is available
    </span><span style="background:black;color:gray;">/// &lt;/summary&gt;
    </span><span style="background:black;color:#ecc03e;">public static class </span><span style="background:black;color:#2b91af;">HashSetLinqAccess
    </span><span style="background:black;color:white;">{
        </span><span style="background:black;color:#ecc03e;">public static </span><span style="background:black;color:#2b91af;">HashSet</span><span style="background:black;color:white;">&lt;T&gt; ToHashSet&lt;T&gt;(</span><span style="background:black;color:#ecc03e;">this </span><span style="background:black;color:#9185fa;">IEnumerable</span><span style="background:black;color:white;">&lt;T&gt; fromEnumerable,
            </span><span style="background:black;color:#9185fa;">IEqualityComparer</span><span style="background:black;color:white;">&lt;T&gt; comparer)
        {
            </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(fromEnumerable == </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">)
                </span><span style="background:black;color:#ecc03e;">throw new </span><span style="background:black;color:#2b91af;">ArgumentNullException</span><span style="background:black;color:white;">(</span><span style="background:black;color:#ecc03e;">&quot;fromEnumerable&quot;</span><span style="background:black;color:white;">);

            </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(comparer == </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">)
                comparer = </span><span style="background:black;color:#2b91af;">EqualityComparer</span><span style="background:black;color:white;">&lt;T&gt;.Default;

            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">!</span><span style="background:black;color:#ecc03e;">typeof</span><span style="background:black;color:white;">(</span><span style="background:black;color:#2b91af;">HashSet</span><span style="background:black;color:white;">&lt;T&gt;).IsAssignableFrom(fromEnumerable.GetType())
                           ? </span><span style="background:black;color:#ecc03e;">new </span><span style="background:black;color:#2b91af;">HashSet</span><span style="background:black;color:white;">&lt;T&gt;(fromEnumerable, comparer)
                           : (</span><span style="background:black;color:#2b91af;">HashSet</span><span style="background:black;color:white;">&lt;T&gt;)fromEnumerable;
        }

        </span><span style="background:black;color:#ecc03e;">public static </span><span style="background:black;color:#2b91af;">HashSet</span><span style="background:black;color:white;">&lt;T&gt; ToHashSet&lt;T&gt;(</span><span style="background:black;color:#ecc03e;">this </span><span style="background:black;color:#9185fa;">IEnumerable</span><span style="background:black;color:white;">&lt;T&gt; fromEnumerable) {

            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">ToHashSet(fromEnumerable, </span><span style="background:black;color:#2b91af;">EqualityComparer</span><span style="background:black;color:white;">&lt;T&gt;.Default);
        }
    }</span></pre>
<p>Ok so what are we going to do with the HashSet&lt;T&gt; and why?</p>
<p>The benefit comes when we have in-memory large sequences to deal with. I will be using the following code as the ‘server’ here. This is code that provides a ‘Registry Server’ to our application. We will populate up a HashSet&lt;T&gt; with RegistryKey instances and then see just how fast it is.</p>
<p>In the next post we will cover all of the additional methods the HashSet&lt;T&gt; exposes. </p>
<p>Here is the code for our Registry Server. NOTE: Please do not try to modify this to change your registry unless you know what you are doing. This is an immutable (read-only) projection from the registry for a very good reason: You can thrash your machine otherwise.</p>
<p>&#160;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<pre class="code"><span style="background:black;color:#ecc03e;">namespace </span><span style="background:black;color:white;">domaindotnet.LinqToRegistry {
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Collections;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Collections.Generic;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Linq;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Runtime.CompilerServices;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Threading;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">Castle.Core;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">LinqToCore;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">Microsoft.Win32;

    </span><span style="background:black;color:gray;">/// &lt;summary&gt;
    /// </span><span style="background:black;color:#9ff5fd;">Provider immutable projections from the registry
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">of the machine, as well as events for status and errors
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">via a singeton wrapper on the .NET Registry
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">singleton.
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">Here we are only exposing the HKLM area
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">subkey but you can see it is easily extensible
    </span><span style="background:black;color:gray;">/// &lt;/summary&gt;
    </span><span style="background:black;color:#ecc03e;">public class </span><span style="background:black;color:#2b91af;">RegistryServer </span><span style="background:black;color:white;">: </span><span style="background:black;color:#9185fa;">IEqualityComparer</span><span style="background:black;color:white;">&lt;</span><span style="background:black;color:#2b91af;">RegistryKey</span><span style="background:black;color:white;">&gt;, </span><span style="background:black;color:#9185fa;">IInitializable</span><span style="background:black;color:white;">,
                                  </span><span style="background:black;color:#9185fa;">IEnumerable</span><span style="background:black;color:white;">&lt;</span><span style="background:black;color:#2b91af;">RegistryKey</span><span style="background:black;color:white;">&gt; {
        </span><span style="background:black;color:#f5f01f;">// IInitializable is from Castle.Core Contractually
        // saying we need a call on our Initialize() method
        // before we can be given out as a service to
        // others

        </span><span style="background:black;color:#ecc03e;">private static readonly </span><span style="background:black;color:#2b91af;">RegistryServer </span><span style="background:black;color:white;">_instance;
        </span><span style="background:black;color:#ecc03e;">private static int </span><span style="background:black;color:white;">iCounter;
        </span><span style="background:black;color:#ecc03e;">private </span><span style="background:black;color:#2b91af;">HashSet</span><span style="background:black;color:white;">&lt;</span><span style="background:black;color:#2b91af;">RegistryKey</span><span style="background:black;color:white;">&gt; allKeys;
        </span><span style="background:black;color:#ecc03e;">private </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">eventArgStatus;
        </span><span style="background:black;color:#ecc03e;">private bool </span><span style="background:black;color:white;">isInitialized;
</span></pre>
<pre class="code"><span style="background:black;color:white;">        </span><span style="background:black;color:#ecc03e;">private </span><span style="background:black;color:#2b91af;">PopulateProgressDelegateError </span><span style="background:black;color:white;">populateError = </span><span style="background:black;color:#ecc03e;">delegate </span><span style="background:black;color:white;">{ };
        </span><span style="background:black;color:#ecc03e;">private </span><span style="background:black;color:#2b91af;">PopulateProgressDelegate </span><span style="background:black;color:white;">populateEventOk = </span><span style="background:black;color:#ecc03e;">delegate </span><span style="background:black;color:white;">{ };</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="background:black;color:white;">
        </span><span style="background:black;color:#ecc03e;">static </span><span style="background:black;color:white;">RegistryServer() {
          </span></pre>
<pre class="code"><span style="background:black;color:white;">            _instance = </span><span style="background:black;color:#ecc03e;">new </span><span style="background:black;color:#2b91af;">RegistryServer
            </span><span style="background:black;color:white;">{eventArgStatus = </span><span style="background:black;color:#ecc03e;">new </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs</span><span style="background:black;color:white;">()};</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="background:black;color:white;"></span><span style="background:black;color:white;">        }

        </span><span style="background:black;color:#ecc03e;">private </span><span style="background:black;color:white;">RegistryServer() {}

        </span><span style="background:black;color:#ecc03e;">public static long </span><span style="background:black;color:white;">Count {
            </span><span style="background:black;color:#ecc03e;">get </span><span style="background:black;color:white;">{
                </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(!_instance.isInitialized)
                    </span><span style="background:black;color:#ecc03e;">throw new </span><span style="background:black;color:#2b91af;">InvalidOperationException</span><span style="background:black;color:white;">(
                            </span><span style="background:black;color:#ecc03e;">&quot;Please initialize the backing store first&quot;</span><span style="background:black;color:white;">);

                </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">_instance.allKeys.Count;
            }
        }

        </span><span style="background:black;color:#ecc03e;">public static </span><span style="background:black;color:#2b91af;">RegistryServer </span><span style="background:black;color:white;">Hklm {
            </span><span style="background:black;color:#ecc03e;">get </span><span style="background:black;color:white;">{
                </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(!_instance.isInitialized)
                    </span><span style="background:black;color:#ecc03e;">throw new </span><span style="background:black;color:#2b91af;">InvalidOperationException</span><span style="background:black;color:white;">(
                            </span><span style="background:black;color:#ecc03e;">&quot;Please initialize the backing store first&quot;</span><span style="background:black;color:white;">);

                </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">_instance;
            }
        }

        #region IEnumerable&lt;RegistryKey&gt; Members

        </span><span style="background:black;color:#ecc03e;">public </span><span style="background:black;color:#9185fa;">IEnumerator</span><span style="background:black;color:white;">&lt;</span><span style="background:black;color:#2b91af;">RegistryKey</span><span style="background:black;color:white;">&gt; GetEnumerator() {
            </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(!isInitialized)
                </span><span style="background:black;color:#ecc03e;">throw new </span><span style="background:black;color:#2b91af;">InvalidOperationException</span><span style="background:black;color:white;">(
                        </span><span style="background:black;color:#ecc03e;">&quot;Please initialize the backing store first&quot;</span><span style="background:black;color:white;">);

            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">allKeys.GetEnumerator();
        }

        </span><span style="background:black;color:#9185fa;">IEnumerator IEnumerable</span><span style="background:black;color:white;">.GetEnumerator() {
            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">GetEnumerator();
        }

        #endregion

        #region IEqualityComparer&lt;RegistryKey&gt; Members

        </span><span style="background:black;color:gray;">/// &lt;summary&gt;
        /// </span><span style="background:black;color:#9ff5fd;">If either contains a null, the result is false (actually it is
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">null be we do not have that option. It is 'unknown and indeterminant'.
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">An emptry string however is treated as 'known to be empty'
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">where null is 'could be anything we have no idea'.
        </span><span style="background:black;color:gray;">/// &lt;/summary&gt;
        /// &lt;param name=</span><span style="background:black;color:#9feca5;">&quot;x&quot;</span><span style="background:black;color:gray;">&gt;&lt;/param&gt;
        /// &lt;param name=</span><span style="background:black;color:#9feca5;">&quot;y&quot;</span><span style="background:black;color:gray;">&gt;&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        </span><span style="background:black;color:#ecc03e;">public bool </span><span style="background:black;color:white;">Equals(</span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">x, </span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">y) {
            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">x.Name != </span><span style="background:black;color:#ecc03e;">null </span><span style="background:black;color:white;">&amp;&amp; y.Name != </span><span style="background:black;color:#ecc03e;">null </span><span style="background:black;color:white;">&amp;&amp; x.Name == y.Name;
        }

        </span><span style="background:black;color:gray;">/// &lt;summary&gt;
        /// </span><span style="background:black;color:#9ff5fd;">For null names here we will calculate a funky random number
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">as null != null
        </span><span style="background:black;color:gray;">/// &lt;/summary&gt;
        /// &lt;param name=</span><span style="background:black;color:#9feca5;">&quot;obj&quot;</span><span style="background:black;color:gray;">&gt;&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        </span><span style="background:black;color:#ecc03e;">public int </span><span style="background:black;color:white;">GetHashCode(</span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">obj) {
            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">obj.Name != </span><span style="background:black;color:#ecc03e;">null
                           </span><span style="background:black;color:white;">? obj.Name.GetHashCode()
                           : </span><span style="background:black;color:#2b91af;">RuntimeHelpers</span><span style="background:black;color:white;">.GetHashCode(</span><span style="background:black;color:#ecc03e;">new object</span><span style="background:black;color:white;">());
        }

        #endregion

        #region IInitializable Members

        </span><span style="background:black;color:#ecc03e;">void </span><span style="background:black;color:#9185fa;">IInitializable</span><span style="background:black;color:white;">.Initialize() {
            Initialize();
        }

        #endregion

        </span><span style="background:black;color:#ecc03e;">public static event </span><span style="background:black;color:#2b91af;">PopulateProgressDelegate </span><span style="background:black;color:white;">PopulateProgress {
            </span><span style="background:black;color:#ecc03e;">add </span><span style="background:black;color:white;">{ _instance.populateEventOk += </span><span style="background:black;color:#ecc03e;">value</span><span style="background:black;color:white;">; }
            </span><span style="background:black;color:#ecc03e;">remove </span><span style="background:black;color:white;">{ _instance.populateEventOk -= </span><span style="background:black;color:#ecc03e;">value</span><span style="background:black;color:white;">; }
        }

        </span><span style="background:black;color:#ecc03e;">private void </span><span style="background:black;color:white;">InvokePopulateProgress() {
            </span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">PopulateProgressDelegate = _instance.populateEventOk;
</span><span style="background:black;color:white;">                eventArgStatus.ItemCount = </span><span style="background:black;color:#2b91af;">Interlocked</span><span style="background:black;color:white;">.Increment(</span><span style="background:black;color:#ecc03e;">ref </span><span style="background:black;color:white;">iCounter);
                PopulateProgressDelegate(</span><span style="background:black;color:#ecc03e;">this</span><span style="background:black;color:white;">, eventArgStatus);

        }

        </span><span style="background:black;color:#ecc03e;">public static event </span><span style="background:black;color:#2b91af;">PopulateProgressDelegateError </span><span style="background:black;color:white;">PopulateProgressItemError {
            </span><span style="background:black;color:#ecc03e;">add </span><span style="background:black;color:white;">{ _instance.populateError += </span><span style="background:black;color:#ecc03e;">value</span><span style="background:black;color:white;">; }
            </span><span style="background:black;color:#ecc03e;">remove </span><span style="background:black;color:white;">{ _instance.populateError -= </span><span style="background:black;color:#ecc03e;">value</span><span style="background:black;color:white;">; }
        }

        </span><span style="background:black;color:#ecc03e;">private static void </span><span style="background:black;color:white;">InvokePopulateProgressItemError(</span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">args) {
         </span><span style="background:black;color:white;">  _instance.populateError(_instance, args);
        }

        </span><span style="background:black;color:#ecc03e;">public static void </span><span style="background:black;color:white;">Initialize() {
            Initialize(</span><span style="background:black;color:#2b91af;">Registry</span><span style="background:black;color:white;">.LocalMachine);
        }

        </span><span style="background:black;color:#ecc03e;">private static void </span><span style="background:black;color:white;">Initialize(</span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">RegistryStartKey) {
            </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(_instance.isInitialized)
                </span><span style="background:black;color:#ecc03e;">throw new </span><span style="background:black;color:#2b91af;">InvalidOperationException</span><span style="background:black;color:white;">(
                        </span><span style="background:black;color:#ecc03e;">&quot;Already Initialized. Cannot perform twice&quot;</span><span style="background:black;color:white;">);

          </span><span style="background:black;color:white;">
            _instance.allKeys = GetAllSubkeys(RegistryStartKey, </span><span style="background:black;color:#ecc03e;">&quot;&quot;</span><span style="background:black;color:white;">).ToHashSet(_instance);

            _instance.isInitialized = </span><span style="background:black;color:#ecc03e;">true</span><span style="background:black;color:white;">;
        }

        </span><span style="background:black;color:#ecc03e;">private static </span><span style="background:black;color:#9185fa;">IEnumerable</span><span style="background:black;color:white;">&lt;</span><span style="background:black;color:#2b91af;">RegistryKey</span><span style="background:black;color:white;">&gt; GetAllSubkeys(</span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">StartkeyIn,
                                                              </span><span style="background:black;color:#2b91af;">String </span><span style="background:black;color:white;">NodeKey) {
            _instance.InvokePopulateProgress();

            </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(StartkeyIn != </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">) {
                </span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">SubItemRoot;

                </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(TryOpenSubKey(StartkeyIn, NodeKey, </span><span style="background:black;color:#ecc03e;">out </span><span style="background:black;color:white;">SubItemRoot)) {
                    </span><span style="background:black;color:#ecc03e;">yield return </span><span style="background:black;color:white;">SubItemRoot;

                    </span><span style="background:black;color:#ecc03e;">foreach </span><span style="background:black;color:white;">(</span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">sub </span><span style="background:black;color:#ecc03e;">in

                            </span><span style="background:black;color:white;">SubItemRoot.GetSubKeyNames().SelectMany( </span><span style="background:black;color:#f5f01f;">// Recursion back into this method
                                    </span><span style="background:black;color:white;">s =&gt; GetAllSubkeys(SubItemRoot, s)))

                        </span><span style="background:black;color:#ecc03e;">yield return </span><span style="background:black;color:white;">sub;
                }
            }
        }

        </span><span style="background:black;color:#ecc03e;">private static bool </span><span style="background:black;color:white;">TryOpenSubKey(</span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">StartFrom, </span><span style="background:black;color:#2b91af;">String </span><span style="background:black;color:white;">Name,
                                          </span><span style="background:black;color:#ecc03e;">out </span><span style="background:black;color:#2b91af;">RegistryKey </span><span style="background:black;color:white;">itemOut) {
            </span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">bIsOK = </span><span style="background:black;color:#ecc03e;">false</span><span style="background:black;color:white;">;
            itemOut = </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">;

            </span><span style="background:black;color:#ecc03e;">try </span><span style="background:black;color:white;">{
                itemOut = StartFrom.OpenSubKey(Name,
                        </span><span style="background:black;color:#b8a223;">RegistryKeyPermissionCheck</span><span style="background:black;color:white;">.ReadSubTree);
                </span><span style="background:black;color:#ecc03e;">if </span><span style="background:black;color:white;">(itemOut != </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">)
                    bIsOK = </span><span style="background:black;color:#ecc03e;">true</span><span style="background:black;color:white;">;
            }
            </span><span style="background:black;color:#ecc03e;">catch </span><span style="background:black;color:white;">(</span><span style="background:black;color:#2b91af;">Exception </span><span style="background:black;color:white;">ex) {
                InvokePopulateProgressItemError(</span><span style="background:black;color:#ecc03e;">new </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs</span><span style="background:black;color:white;">(-1,
                        ex.Message + </span><span style="background:black;color:#2b91af;">Environment</span><span style="background:black;color:white;">.NewLine + </span><span style="background:black;color:#ecc03e;">&quot;Key=&quot; </span><span style="background:black;color:white;">+ StartFrom.Name + </span><span style="background:black;color:#ecc03e;">&quot; failed trying &quot; </span><span style="background:black;color:white;">+ Name));
            }

            </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">bIsOK;
        }
                                  }

    </span><span style="background:black;color:#ecc03e;">public delegate void </span><span style="background:black;color:#2b91af;">PopulateProgressDelegateError</span><span style="background:black;color:white;">(
            </span><span style="background:black;color:#ecc03e;">object </span><span style="background:black;color:white;">sender, </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">args);

    </span><span style="background:black;color:#ecc03e;">public delegate void </span><span style="background:black;color:#2b91af;">PopulateProgressDelegate</span><span style="background:black;color:white;">(
            </span><span style="background:black;color:#ecc03e;">object </span><span style="background:black;color:white;">sender, </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">args);
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code">&#160;</pre>
<pre class="code"><span style="background:black;color:#ecc03e;">namespace </span><span style="background:black;color:white;">domaindotnet.LinqToRegistry {
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System;

    </span><span style="background:black;color:gray;">/// &lt;summary&gt;
    /// </span><span style="background:black;color:#9ff5fd;">Simple EventArg for the two progress events
    </span><span style="background:black;color:gray;">///
    /// </span><span style="background:black;color:#9ff5fd;">NOTE: There will typically be some errors
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">which is fine as some parts of the Registry are
    </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">not accessible with standard security
    </span><span style="background:black;color:gray;">/// &lt;/summary&gt;
    </span><span style="background:black;color:#ecc03e;">public class </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">: </span><span style="background:black;color:#2b91af;">EventArgs </span><span style="background:black;color:white;">{

        </span><span style="background:black;color:#ecc03e;">private readonly string </span><span style="background:black;color:white;">_keyName;

        </span><span style="background:black;color:#ecc03e;">public </span><span style="background:black;color:white;">PopulateProgressEventArgs(</span><span style="background:black;color:#ecc03e;">int </span><span style="background:black;color:white;">itemCount) : </span><span style="background:black;color:#ecc03e;">this</span><span style="background:black;color:white;">(itemCount, </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">) {}

        </span><span style="background:black;color:#ecc03e;">public </span><span style="background:black;color:white;">PopulateProgressEventArgs(</span><span style="background:black;color:#ecc03e;">int </span><span style="background:black;color:white;">itemCount, </span><span style="background:black;color:#2b91af;">String </span><span style="background:black;color:white;">KeyName) {

            ItemCount = itemCount;
            _keyName = KeyName;

        }

        </span><span style="background:black;color:#ecc03e;">public </span><span style="background:black;color:white;">PopulateProgressEventArgs() : </span><span style="background:black;color:#ecc03e;">this</span><span style="background:black;color:white;">(-1, </span><span style="background:black;color:#ecc03e;">null</span><span style="background:black;color:white;">) {}

        </span><span style="background:black;color:#ecc03e;">public string </span><span style="background:black;color:white;">KeyName {
            </span><span style="background:black;color:#ecc03e;">get </span><span style="background:black;color:white;">{ </span><span style="background:black;color:#ecc03e;">return </span><span style="background:black;color:white;">_keyName; }
        }

        </span><span style="background:black;color:#ecc03e;">public int </span><span style="background:black;color:white;">ItemCount { </span><span style="background:black;color:#ecc03e;">get</span><span style="background:black;color:white;">; </span><span style="background:black;color:#ecc03e;">internal set</span><span style="background:black;color:white;">; }
    }
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code">&#160;</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Although not required, if you want to use this Registry Server (it makes a fantastic ‘mock’ server – although not really a Mock at all) put all the code above in a separate assembly for ease of use.</p>
<p>It’s great for trying our many variants of Linq queries over objects (as we do here) as the Registry – although a bit dangerous to muck about with – is a nice hierarchical source with enough interesting turns to make it fun. </p>
<p>In practice we rarely need to change the registry but if we did, it would be though this (we would carefully evolve it so it could perform controlled updates).</p>
<p>&#160;</p>
<h2>The Regression Tests</h2>
<p>&#160;</p>
<p>So we are using xUnit because we like it. Use whatever you want. The code shown next is the abstract base class our real test cases will use:</p>
<p>&#160;</p>
<pre class="code"><span style="background:black;color:#ecc03e;">namespace </span><span style="background:black;color:white;">LinqToORMValidation {
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">domaindotnet.LinqToRegistry;

    </span><span style="background:black;color:#ecc03e;">public abstract class </span><span style="background:black;color:#2b91af;">BaseTestContext </span><span style="background:black;color:white;">{

        </span><span style="background:black;color:#ecc03e;">private static void </span><span style="background:black;color:white;">RegistryServer_OnPopulateProgress(</span><span style="background:black;color:#ecc03e;">object </span><span style="background:black;color:white;">sender, </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">args)
        {
            </span><span style="background:black;color:#f5f01f;">//Console.WriteLine(&quot;Processed &quot; + args.ItemCount + &quot; items&quot;);

        </span><span style="background:black;color:white;">}

        </span><span style="background:black;color:#ecc03e;">private static void </span><span style="background:black;color:white;">RegistryServer_OnPopulateProgressError(</span><span style="background:black;color:#ecc03e;">object </span><span style="background:black;color:white;">sender, </span><span style="background:black;color:#2b91af;">PopulateProgressEventArgs </span><span style="background:black;color:white;">args)
        {
            </span><span style="background:black;color:#2b91af;">Console</span><span style="background:black;color:white;">.WriteLine(</span><span style="background:black;color:#ecc03e;">&quot;Error : &quot; </span><span style="background:black;color:white;">+ args.KeyName);
        }
        </span><span style="background:black;color:#ecc03e;">protected </span><span style="background:black;color:white;">BaseTestContext() {

            </span><span style="background:black;color:#2b91af;">RegistryServer</span><span style="background:black;color:white;">.PopulateProgress += RegistryServer_OnPopulateProgress;
            </span><span style="background:black;color:#2b91af;">RegistryServer</span><span style="background:black;color:white;">.PopulateProgressItemError += RegistryServer_OnPopulateProgressError;
            </span><span style="background:black;color:#2b91af;">RegistryServer</span><span style="background:black;color:white;">.Initialize();

            </span><span style="background:black;color:#2b91af;">Console</span><span style="background:black;color:white;">.WriteLine(</span><span style="background:black;color:#ecc03e;">&quot;Initialization Complete. Total Records = &quot; </span><span style="background:black;color:white;">+ </span><span style="background:black;color:#2b91af;">RegistryServer</span><span style="background:black;color:white;">.Count);
        }

    }
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a><a href="http://11011.net/software/vspaste"></a></p>
<p>NOTE: Un-Comment the Console.WriteLine in the OnPopulateProgress to view the status as it runs.</p>
<blockquote>
<p>The main area to see is the protected constructor. It’s clear that the Singleton is exposing a separate Initialize() method (we did this on purpose as it can take a little while for all those keys to get inside the HashSet&lt;T&gt; and debugging things if they go wrong in say a static constructor is harder then making a long-running initialization explicit. In general a good design decision we believe.</p>
</blockquote>
<p>&#160;</p>
<p>So the final part of code for this post at least is the first test which indeed shows the exact query from the beginning working:&quot;</p>
<pre class="code"><span style="background:black;color:white;"></span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="background:black;color:#ecc03e;">namespace </span><span style="background:black;color:white;">LinqToORMValidation {
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Diagnostics;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">System.Linq;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">domaindotnet.LinqToRegistry;
    </span><span style="background:black;color:#ecc03e;">using </span><span style="background:black;color:white;">Xunit;

    </span><span style="background:black;color:#ecc03e;">public class </span><span style="background:black;color:#2b91af;">RegistryServerValidation </span><span style="background:black;color:white;">: </span><span style="background:black;color:#2b91af;">BaseTestContext </span><span style="background:black;color:white;">{

        </span><span style="background:black;color:gray;">/// &lt;summary&gt;
        /// </span><span style="background:black;color:#9ff5fd;">As a Linq IEnumerable</span><span style="background:black;color:gray;">&lt;T&gt; </span><span style="background:black;color:#9ff5fd;">result
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">if anything changed, the
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">underlying HashSet</span><span style="background:black;color:gray;">&lt;T&gt; </span><span style="background:black;color:#9ff5fd;">would not change. However if this
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">were a direct reference to the HashSet the values ARE
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">changeable. The idea is to project out immutable results
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">from the Registry server and indeed treat all the data
        </span><span style="background:black;color:gray;">/// </span><span style="background:black;color:#9ff5fd;">as read only
        </span><span style="background:black;color:gray;">/// &lt;/summary&gt;
        </span><span style="background:black;color:white;">[</span><span style="background:black;color:#2b91af;">Fact</span><span style="background:black;color:white;">]
        </span><span style="background:black;color:#ecc03e;">public void </span><span style="background:black;color:white;">should_prove_basic() {

            </span><span style="background:black;color:#f5f01f;">// Find the registry key(s) that have
            // VisualStudo in the name and end in
            // 'FontsAndColors' that also have at least
            // one value defined inside they key

            </span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">sw =</span><span style="background:black;color:#2b91af;">Stopwatch</span><span style="background:black;color:white;">.StartNew();

            </span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">FindFontsColors = </span><span style="background:black;color:#ecc03e;">from </span><span style="background:black;color:white;">rk </span><span style="background:black;color:#ecc03e;">in </span><span style="background:black;color:#2b91af;">RegistryServer</span><span style="background:black;color:white;">.Hklm
                                  </span><span style="background:black;color:#ecc03e;">where
                                          </span><span style="background:black;color:white;">rk.Name.Contains(</span><span style="background:black;color:#ecc03e;">&quot;VisualStudio&quot;</span><span style="background:black;color:white;">) &amp;&amp;
                                          rk.Name.EndsWith(</span><span style="background:black;color:#ecc03e;">&quot;FontsAndColors&quot;</span><span style="background:black;color:white;">) &amp;&amp;
                                          rk.ValueCount &gt; 0

                                  </span><span style="background:black;color:#ecc03e;">select </span><span style="background:black;color:white;">rk.Name;

            </span><span style="background:black;color:#ecc03e;">var </span><span style="background:black;color:white;">countMatched = FindFontsColors.Count();

            sw.Stop();

            </span><span style="background:black;color:#2b91af;">Console</span><span style="background:black;color:white;">.WriteLine(</span><span style="background:black;color:#ecc03e;">&quot;Total Records Matched = &quot; </span><span style="background:black;color:white;">+ countMatched);
            </span><span style="background:black;color:#2b91af;">Console</span><span style="background:black;color:white;">.WriteLine(</span><span style="background:black;color:#ecc03e;">&quot;Search Took : &quot; </span><span style="background:black;color:white;">+ sw.ElapsedMilliseconds + </span><span style="background:black;color:#ecc03e;">&quot; ms&quot;</span><span style="background:black;color:white;">);

            </span><span style="background:black;color:#f5f01f;">// Assert it took less then one second
            </span><span style="background:black;color:#2b91af;">Assert</span><span style="background:black;color:white;">.True(sw.ElapsedMilliseconds &lt; 1000);
            </span><span style="background:black;color:#2b91af;">ObjectDumper</span><span style="background:black;color:white;">.Write(FindFontsColors);
        }

    }
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>For this test cases we are very specifically finding any keys across any in HKLM matching the conditions: </p>
<ul>
<li>The key name ‘VisualStudio’ somewhere. </li>
<li>The key ends with &#8216;FontsAndColors’ </li>
<li>The key has at least one value inside (you’ll see why in the next post when things get harder) </li>
</ul>
<p>We also introduce a time to show off the speed of the HashSet&lt;T&gt;.</p>
<p>&#160;</p>
<p>Here I am making the assumption that the name of the key holds identity, and if null, we use standard null semantics (as defined in relational algebra).</p>
<p>The only few interesting points are the use of the static RuntimeHelpers class from .NET as the fact we are using the singleton static instance as the Equality instance.</p>
<p>&#160;</p>
<h2>Running the Code</h2>
<p>&#160;</p>
<p><a href="http://dcarr.files.wordpress.com/2008/09/image1.png"><img style="border-width:0;" title="image" border="0" alt="image" src="http://dcarr.files.wordpress.com/2008/09/image-thumb1.png?w=700&#038;h=526" width="700" height="526" /></a> </p>
<p>As expected we received a few errors, but they make sense as they are protected areas of the registry.</p>
<h3>So we matched across 233142 instances of RegistryKey with three conditions in 746ms. Try that in RegEdt32!!</h3>
<p>&#160;</p>
<div align="right">
<table border="1" cellspacing="4" cellpadding="4" width="400" align="right">
<tbody>
<tr>
<td valign="top" width="390">
<p align="center">MSDN Facts</p>
<p>The HashSet&lt;T&gt; class provides high performance set operations. A set is a collection that contains no duplicate elements, and whose elements are in no particular order. </p>
<p>The capacity of a HashSet&lt;T&gt; object is the number of elements that the object can hold. A HashSet&lt;T&gt; object&#8217;s capacity automatically increases as elements are added to the object. </p>
<p>The HashSet&lt;T&gt; class is a set collection that implements the <a href="http://msdn.microsoft.com/en-us/library/system.collections.icollection.aspx">ICollection</a> interface and the <a href="http://msdn.microsoft.com/en-us/library/92t2ye13.aspx">ICollection&lt;(Of &lt;(T&gt;)&gt;)</a> generic interface. </p>
<p><img src="http://i.msdn.microsoft.com/platform/Controls/CollapsibleArea/resources/minus.gif" /> Set Collections </p>
<p><a name="sectionToggle0"></a></p>
<p>In mathematics, a set is a collection of distinct objects that is usually defined by a rule that determines whether an element is a member of a particular set. For example, a set could be defined to contain &quot;all the odd numbers between 1 and 21&quot; or the numbers &quot;1, 3, 5 and 7&quot;. </p>
<p><img src="http://i.msdn.microsoft.com/platform/Controls/CollapsibleArea/resources/minus.gif" /> The HashSet Class </p>
<p><a name="sectionToggle1"></a></p>
<p>The <a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx">HashSet&lt;(Of &lt;(T&gt;)&gt;)</a> class is based on the model of mathematical sets and provides high-performance set operations similar to accessing the keys of the <a href="http://msdn.microsoft.com/en-us/library/xfhwa508.aspx">Dictionary&lt;(Of &lt;(TKey, TValue&gt;)&gt;)</a> or <a href="http://msdn.microsoft.com/en-us/library/system.collections.hashtable.aspx">Hashtable</a> collections. In simple terms, the <a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx">HashSet&lt;(Of &lt;(T&gt;)&gt;)</a> class can be thought of as a <a href="http://msdn.microsoft.com/en-us/library/xfhwa508.aspx">Dictionary&lt;TKey, TValue&gt;</a> collection without values. </p>
<p>A <a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx">HashSet&lt;(Of &lt;(T&gt;)&gt;)</a> collection is not sorted and cannot contain duplicate elements. If order or element duplication is more important than performance for your application, consider using the <a href="http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx">List&lt;(Of &lt;(T&gt;)&gt;)</a> class together with the <a href="http://msdn.microsoft.com/en-us/library/3da4abas.aspx">Sort</a> method. </p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx">HashSet&lt;(Of &lt;(T&gt;)&gt;)</a> provides many mathematical set operations, such as set addition (unions) and set subtraction. The following table lists the provided <a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx">HashSet&lt;(Of &lt;(T&gt;)&gt;)</a> operations and their mathematical equivalents. </p>
<p>HashSet(Of T) operation </p>
<p>Mathematical equivalent </p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb342097.aspx">UnionWith</a></p>
<p>Union or set addition </p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb293080.aspx">IntersectWith</a></p>
<p>Intersection </p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb299875.aspx">ExceptWith</a></p>
<p>Set subtraction </p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb336848.aspx">SymmetricExceptWith</a></p>
<p>Symmetric difference </p>
<p>In addition to the listed set operations, the <a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx">HashSet&lt;(T&gt;</a> class also provides methods for determining set equality, overlap of sets, and whether a set is a subset or superset of another set. </p>
<p>&#160;</p>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>So far this has only set a baseline for the next exploration into these new methods provided in the HashSet&lt;T&gt; you might not have been aware of which we can now easily use: </p>
<p>&#160;</p>
<div id="contents">
<div style="height:607px;" id="ctl00_rs1_ra1" class="resizableArea">
<div id="ctl00_rs1_raRight" class="rightSection">
<div class="RightPanel">
<div class="ContentArea">
<div class="topic">
<div id="mainSection">
<div id="mainBody">
<div id="ctl00_rs1_mainContentContainer_cpe804725" class="MTPS_CollapsibleRegion">
<div style="width:auto;display:block;height:auto;overflow:visible;" id="ctl00_rs1_mainContentContainer_cpe804725_c" class="MTPS_CollapsibleSection">
<div style="border-bottom:medium none;border-left:medium none;display:block;border-top:medium none;border-right:medium none;" class="MTPS_CollapsibleSection">
<div class="tableSection">
<table width="50%">
<tbody>
<tr>
<th width="172">
<p>HashSet(Of T) operation </p>
</th>
<th width="176">
<p>LINQ equivalent </p>
</th>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl84" href="http://msdn.microsoft.com/en-us/library/bb342097.aspx">UnionWith</a></span> </p>
</td>
<td width="176">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl85" href="http://msdn.microsoft.com/en-us/library/system.linq.enumerable.union.aspx">Union</a></span> </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl86" href="http://msdn.microsoft.com/en-us/library/bb293080.aspx">IntersectWith</a></span> </p>
</td>
<td width="176">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl87" href="http://msdn.microsoft.com/en-us/library/system.linq.enumerable.intersect.aspx">Intersect</a></span> </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl88" href="http://msdn.microsoft.com/en-us/library/bb299875.aspx">ExceptWith</a></span> </p>
</td>
<td width="176">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl89" href="http://msdn.microsoft.com/en-us/library/system.linq.enumerable.except.aspx">Except</a></span> </p>
</td>
</tr>
<tr>
<td width="172">
<p>Not Provided </p>
</td>
<td width="176">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl90" href="http://msdn.microsoft.com/en-us/library/system.linq.enumerable.distinct.aspx">Distinct</a></span> </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl91" href="http://msdn.microsoft.com/en-us/library/bb336848.aspx">SymmetricExceptWith</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl92" href="http://msdn.microsoft.com/en-us/library/bb355623.aspx">Overlaps</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl93" href="http://msdn.microsoft.com/en-us/library/bb358446.aspx">IsSubsetOf</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl94" href="http://msdn.microsoft.com/en-us/library/bb351418.aspx">IsProperSubsetOf</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl95" href="http://msdn.microsoft.com/en-us/library/bb346923.aspx">IsSupersetOf</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl96" href="http://msdn.microsoft.com/en-us/library/bb299734.aspx">IsProperSupersetOf</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
<tr>
<td width="172">
<p><span><a id="ctl00_rs1_mainContentContainer_ctl97" href="http://msdn.microsoft.com/en-us/library/bb346516.aspx">SetEquals</a></span> </p>
</td>
<td width="176">
<p>Not Provided. </p>
</td>
</tr>
</tbody>
</table></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
</p></div>
<p>&#160;</p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:57bcd4fd-45be-4e95-9e9b-7dba54a771c6" class="wlWriterSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Linq" rel="tag">Linq</a>,<a href="http://technorati.com/tags/HashSet" rel="tag">HashSet</a>,<a href="http://technorati.com/tags/ORM" rel="tag">ORM</a>,<a href="http://technorati.com/tags/NHibernate" rel="tag">NHibernate</a>,<a href="http://technorati.com/tags/Linq+to+NHibernate" rel="tag">Linq to NHibernate</a>,<a href="http://technorati.com/tags/Linq+Undocumented" rel="tag">Linq Undocumented</a>,<a href="http://technorati.com/tags/Functional+Programming" rel="tag">Functional Programming</a>,<a href="http://technorati.com/tags/.NET+3.5" rel="tag">.NET 3.5</a></div>
<div class="wlWriterHeaderFooter" style="text-align:left;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=http%3a%2f%2fdcarr.wordpress.com%2f2008%2f09%2f08%2fthe_fastest_dot_net_hash_set_collection_with_linq_extended_features%2f&amp;title=Expose+New+Linq+Operations+from+the+Screaming+HashSet%3cT%3e+Collection"><img src="http://digg.com/img/badges/100x20-digg-button.png" width="100" height="20" alt="Digg This" title="Digg This" border="0" style="border:0;" /></a></div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/874/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/874/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/874/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/874/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/874/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=874&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/09/08/the_fastest_dot_net_hash_set_collection_with_linq_extended_features/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/09/premature-6-thumb.jpg" medium="image">
			<media:title type="html">premature_optimization</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/09/image-thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://i.msdn.microsoft.com/platform/Controls/CollapsibleArea/resources/minus.gif" medium="image" />

		<media:content url="http://i.msdn.microsoft.com/platform/Controls/CollapsibleArea/resources/minus.gif" medium="image" />

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>NHibernate 2.0 gold Released &#8211; Must Wait for &#8216;Linq to NHibernate&#8217;</title>
		<link>http://team.pushbomb.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/</link>
		<comments>http://team.pushbomb.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 18:00:54 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[Industry News]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Advanced .NET]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linq to Entities]]></category>
		<category><![CDATA[Linq to NHibernate]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/</guid>
		<description><![CDATA[As expected, NHibernate 2.0 went gold yesterday and is available for download. This is official release 2.0.0 GA. Please ensure you review this list of breaking changes from the release notes. Linq to NHibernate is available for now only via the NHibernate Contrib project and is not included in this NHibernate release.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=762&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f08%2f24%2fnhibernate-20-gold-released-must-wait-for-linq-to-nhibernate%2f"><img class="alignright" style="border:0 none;" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f08%2f24%2fnhibernate-20-gold-released-must-wait-for-linq-to-nhibernate%2f" border="0" alt="kick it on DotNetKicks.com" width="82" height="18" /></a></p>
<p><a href="https://sourceforge.net/project/showfiles.php?group_id=73818&amp;package_id=73969" target="_blank">NHibernate 2.0</a> went gold yesterday and is available for download from <a href="https://sourceforge.net/project/showfiles.php?group_id=73818&amp;package_id=73969" target="_blank">here</a>.</p>
<p><a href="https://sourceforge.net/project/showfiles.php?group_id=73818&amp;package_id=73969" target="_blank"></a></p>
<p>This is official release 2.0.0 GA. Please ensure you review this list of breaking changes from the release notes (also main items briefly listed below).</p>
<h2><strong>NOTE: Correction/clarification made 8/26 on Linq to NHibernate location.</strong></h2>
<p style="text-align:center;">The much anticipated <a href="http://en.wikipedia.org/wiki/Language_Integrated_Query" target="_blank">Linq</a> to NHibernate is available for now only via the NHibernate Contrib project and is not included in this NHibernate release.<br />
<em><br />
Although likely to change, there does not appear to be an installer for Linq to NHibernate so it must be accessed from the source code. To gain access to this, you will need a <a href="http://tortoisesvn.tigris.org/" target="_blank">subversion client such as Tortoise</a>, and then download the code.</em></p>
<blockquote>
<h3>To download ‘Linq to NHibernate&#8217; from <a href="http://sourceforge.net/svn/?group_id=216446" target="_blank">the Trunk go here</a></h3>
</blockquote>
<p>The location of the bits can be found under the repository at this location:</p>
<p><a title="http://nhcontrib.svn.sourceforge.net/viewvc/nhcontrib/trunk/src/NHibernate.Linq/" href="http://nhcontrib.svn.sourceforge.net/viewvc/nhcontrib/trunk/src/NHibernate.Linq/" target="_blank">http://nhcontrib.svn.sourceforge.net/viewvc/nhcontrib/trunk/src/NHibernate.Linq/</a><br />
NOTE: Pictures Below Generated from <a href="http://www.ndepend.com/" target="_blank">NDepend</a>, a must-have tool for .NET Development</p>
<h1>gold release 2.0.0.GA</h1>
<h2>BREAKING CHANGES from NH1.2.1GA to NH2.0.0</h2>
<ul>
<li>
<h2>Infrastructure</h2>
<ul>
<li>.NET 1.1 is no longer supported</li>
<li>Nullables.NHibernate is no longer supported (use nullable types of .NET 2.0)</li>
<li>Contrib moved. New Location</li>
</ul>
</li>
</ul>
<div class="mceTemp mceIEcenter"><a title="NDepend Analysis" href="http://dcarr.files.wordpress.com/2008/08/componentdependenciesdiagram1.png" target="_blank"><img class="aligncenter" src="http://dcarr.files.wordpress.com/2008/08/techsmithwor48f.png?w=437&#038;h=625" alt="NDepend Analysis" width="437" height="625" /></a></div>
<div id="attachment_764" class="wp-caption aligncenter" style="width: 456px"><a href="http://dcarr.files.wordpress.com/2008/08/visualndependview1.png"><img class="size-medium wp-image-764" style="border:2px solid black;" src="http://dcarr.files.wordpress.com/2008/08/visualndependview1.png?w=446&#038;h=446" alt="" width="446" height="446" /></a><p class="wp-caption-text">NDepend Analysis</p></div>
<p><a href="http://dcarr.files.wordpress.com/2008/08/techsmithword00.png"><img class="alignright" style="border:2px solid black;margin:10px;" src="http://dcarr.files.wordpress.com/2008/08/techsmithword00.png?w=668&#038;h=368" alt="" width="668" height="368" align="left" /></a></p>
<ul>
<li>
<ul>
<li>
<ul>
<li><a href="http://sourceforge.net/projects/nhcontrib">http://sourceforge.net/projects/nhcontrib</a></li>
</ul>
</li>
</ul>
</li>
<li>
<h2>Compile time</h2>
<ul>
<li>NHibernate.Expression namespace was renamed to NHibernate.Criterion</li>
<li>IInterceptor have additional methods. (IsUnsaved was renamed IsTransient)</li>
<li>INamingStrategy</li>
<li>IType</li>
<li>IEntityPersister</li>
<li>IVersionType</li>
<li>IBatcher</li>
<li>IUserCollectionType</li>
<li>IEnhancedUserType</li>
<li>IPropertyAccessor</li>
<li>ValueTypeType renamed to PrimitiveType</li>
</ul>
</li>
<li>
<h2>Possible Breaking Changes for external frameworks</h2>
</li>
</ul>
<ul>
<li>Various classes were moved between namespaces</li>
<li>Various classes have been renamed (to match Hibernate 3.2 names)</li>
<li>ISession interface have additional methods</li>
<li>ICacheProvider</li>
<li>ICriterion</li>
<li>CriteriaQueryTranslator</li>
</ul>
<li>
<h2>Initialization time</h2>
</li>
<ul>
<li>&lt;nhibernate&gt; section, in App.config, is no longer supported and will be ignored. Configuration schema for configuration file and App.config is now identical, and the App.config section name is: &lt;hibernate-configuration&gt;</li>
<li>&lt;hibernate-configuration&gt; have a different schema and all properties names are cheked</li>
<li>configuration properties are no longer prefixed by &#8220;hibernate.&#8221;, if before you would specify &#8220;hibernate.dialect&#8221;, now you specify just &#8220;dialect&#8221;</li>
<li>All named queries will be validated at initialization time, an exception will be thrown if any is not valid (can be disabled if needed)</li>
<li>Stricter checks for proxying classes (all public methods must be virtual)</li>
</ul>
<li>
<h2>Run time</h2>
<ul>
<li>SaveOrUpdateCopy() returns a new instance of the entity without changing the original</li>
<li>AutoFlush will not occur outside a transaction &#8211; Database transactions are never optional, all communication with the database must occur inside a transaction, whatever you read or write data.</li>
<li>NHibernate will return long for count(*) queries on SQL Server</li>
<li>&lt;formula&gt; must contain parenthesis when needed</li>
<li>These HQL function names may cause conflict in your HQL reserved names are:
<ul>
<li>substring</li>
<li>locate</li>
<li>trim</li>
<li>length</li>
<li>bit_length</li>
<li>coalesce</li>
<li>nullif</li>
<li>abs</li>
<li>mod</li>
<li>sqrt</li>
<li>upper</li>
<li>lower</li>
<li>cast</li>
<li>extract</li>
<li>concat</li>
<li>current_timestamp</li>
<li>sysdate</li>
<li>second</li>
<li>minute</li>
<li>hour</li>
<li>day</li>
<li>month</li>
<li>year</li>
<li>str</li>
</ul>
</li>
<li>&lt;any&gt; when meta-type=&#8221;class&#8221; the persistent type is a string containing the Class.FullName
<ul>
<li>In order to set a parameter in a query you must use SetParameter(&#8220;paraName&#8221;, typeof(YourClass).FullName, NHibernateUtil.ClassMetaType)</li>
</ul>
</li>
</ul>
</li>
<li>
<h2>Mapping</h2>
</li>
<ul>
<li>&lt;any&gt; : default meta-type is &#8220;string&#8221; (was &#8220;class&#8221;)</li>
</ul>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a1ce0c86-dec5-47df-ba81-a24c347edbb9" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/NHibernate">NHibernate</a>,<a rel="tag" href="http://del.icio.us/popular/Linq+to+NHibernate">Linq to NHibernate</a>,<a rel="tag" href="http://del.icio.us/popular/Linq">Linq</a>,<a rel="tag" href="http://del.icio.us/popular/ORM">ORM</a>,<a rel="tag" href="http://del.icio.us/popular/C%23+3.0">C# 3.0</a>,<a rel="tag" href="http://del.icio.us/popular/.NET">.NET</a>,<a rel="tag" href="http://del.icio.us/popular/Advanced+.NET">Advanced .NET</a>,<a rel="tag" href="http://del.icio.us/popular/Linq+to+Entities">Linq to Entities</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:0941deb9-3263-47de-aa30-cc955dabfc9b" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/NHibernate">NHibernate</a>,<a rel="tag" href="http://technorati.com/tags/Linq+to+NHibernate">Linq to NHibernate</a>,<a rel="tag" href="http://technorati.com/tags/Linq">Linq</a>,<a rel="tag" href="http://technorati.com/tags/ORM">ORM</a>,<a rel="tag" href="http://technorati.com/tags/C%23+3.0">C# 3.0</a>,<a rel="tag" href="http://technorati.com/tags/.NET">.NET</a>,<a rel="tag" href="http://technorati.com/tags/Advanced+.NET">Advanced .NET</a>,<a rel="tag" href="http://technorati.com/tags/Linq+to+Entities">Linq to Entities</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e70e71ec-da6c-4189-8c18-67b3923acdf5" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">LiveJournal Tags: <a rel="tag" href="http://www.livejournal.com/interests.bml?int=NHibernate">NHibernate</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=Linq+to+NHibernate">Linq to NHibernate</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=Linq">Linq</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=ORM">ORM</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=C%23+3.0">C# 3.0</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=.NET">.NET</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=Advanced+.NET">Advanced .NET</a>,<a rel="tag" href="http://www.livejournal.com/interests.bml?int=Linq+to+Entities">Linq to Entities</a></div>
<div class="wlWriterHeaderFooter" style="text-align:right;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=http%3a%2f%2fdcarr.wordpress.com%2f2008%2f08%2f24%2fnhibernate-20-gold-released-must-wait-for-linq-to-nhibernate%2f&amp;title=NHibernate+2.0+gold+Released+%e2%80%93+Must+Wait+for+%e2%80%98Linq+to+NHibernate%e2%80%99"><img style="border:0;" src="http://digg.com/img/badges/100x20-digg-button.png" border="0" alt="Digg This" width="100" height="20" /></a></div>
<p><a href="http://www.stumbleupon.com/submit?url=http://blog.domaindotnet.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/%26title%3DNHibernate%2BGold%2BReleased"><img class="alignleft" style="border:0;" src="http://www.stumbleit.com/images/120x20_su_white.gif" border="0" alt="" width="120" height="20" /> Stumble It!</a></p>
<p><a href="https://sourceforge.net/project/showfiles.php?group_id=73818&amp;package_id=73969" target="_blank"><img class="alignleft" style="border:0;" src="http://dcarr.files.wordpress.com/2008/08/techsmithworcfb.png?w=483&#038;h=114" border="0" alt="nhibernate" width="483" height="114" align="right" /></a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/762/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/762/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/762/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/762/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/762/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/762/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/762/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/762/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/762/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/762/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/762/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/762/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=762&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f08%2f24%2fnhibernate-20-gold-released-must-wait-for-linq-to-nhibernate%2f" medium="image">
			<media:title type="html">kick it on DotNetKicks.com</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/08/techsmithwor48f.png" medium="image">
			<media:title type="html">NDepend Analysis</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/08/visualndependview1.png?w=400" medium="image" />

		<media:content url="http://dcarr.files.wordpress.com/2008/08/techsmithword00.png" medium="image" />

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>

		<media:content url="http://www.stumbleit.com/images/120x20_su_white.gif" medium="image" />

		<media:content url="http://dcarr.files.wordpress.com/2008/08/techsmithworcfb.png" medium="image">
			<media:title type="html">nhibernate</media:title>
		</media:content>
	</item>
		<item>
		<title>ReSharper 4.01 RC1 Released!</title>
		<link>http://team.pushbomb.com/2008/08/13/resharper-401-rc1-released/</link>
		<comments>http://team.pushbomb.com/2008/08/13/resharper-401-rc1-released/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 17:34:24 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[concepts implemented]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[ReSharper 4.01 RC1]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/08/13/resharper-401-rc1-released/</guid>
		<description><![CDATA[ReSharper 4.01 RC1 released...Here is how the recent builds have looked. Just click on one to download it:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=665&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">Here is how the recent builds have looked. Just click on one to download it:</p>
<p><a href="http://www.jetbrains.com/"><img class="alignright" style="border:0 none;margin:0;" src="http://dcarr.files.wordpress.com/2008/08/rs2banner1.jpg?w=243&#038;h=95" alt="" width="243" height="95" /></a></p>
<h1>JetBrains Team</h1>
<div id="sharper">
<ul>
<li> <img style="border:0 none;margin:0 5px;" src="http://www.jetbrains.com/company/people/photos/Sergey_Anchipolevsky_small.gif" alt="photo" width="57" height="69" />Sergey Anchipolevsky</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Alshannikov_Igor_small.gif" alt="photo" />Igor Alshannikov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Anisimov_Alexander_small.gif" alt="photo" />Alexander Anisimov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Avdeev_Dmitry_small.gif" alt="photo" />Dmitry Avdeev</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Sergey_Baranov_small.gif" alt="photo" />Sergey Baranov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Yury_Belyaev_small.gif" alt="photo" />Yury Belyaev</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Natalia_Belyaeva_small.gif" alt="photo" />Natalia Belyaeva</li>
<li><img src="http://www.jetbrains.com/company/people/photos/David_Booth_small.gif" alt="photo" />Dave Booth</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Bukreeva_Elena_small.gif" alt="photo" />Elena Bukreeva</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Jana_Charif_small.gif" alt="photo" />Jana Charif</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Nikolay_Chashnikov_small.gif" alt="photo" />Nikolay Chashnikov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/soon.gif" alt="photo" />Alexander Chernikov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Roman_Chernyatchik_small.gif" alt="photo" />Roman Chernyatchik</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Coox_Sergey_small.gif" alt="photo" />Sergey Coox</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Sergey_Dmitriev_small.gif" alt="photo" />Sergey Dmitriev</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Ilia_Dumov_small.gif" alt="photo" />Ilia Dumov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Michael_Gerasimov_small.gif" alt="photo" />Michael Gerasimov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Sergey_Golovachev_small.gif" alt="photo" />Sergey Golovachev</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Alexey_Gopachenko_small.gif" alt="photo" />Alexey Gopachenko</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Gromov_Peter_small.gif" alt="photo" />Peter Gromov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Dmitry_Jemerov_small.gif" alt="photo" />Dmitry Jemerov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Khalusova_Maria_small.gif" alt="photo" />Maria Khalusova</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Valentin_Kipiatkov_small.gif" alt="photo" />Valentin Kipiatkov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Konopko_Kirill_small.gif" alt="photo" />Cyril Konopko</li>
<li><img src="http://www.jetbrains.com/company/people/photos/soon.gif" alt="photo" />Anna Kozlova</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Mikhail_Kropotov_small.gif" alt="photo" />Mikhail Kropotov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Alexey_Kudravtsev_small.gif" alt="photo" />Alexey Kudravtsev</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Lobacheva_Olga_small.gif" alt="photo" />Olga Lobacheva</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Dmitry_Lomov_small.gif" alt="photo" />Dmitry Lomov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Vyacheslav_Lukianov_small.gif" alt="photo" />Vyacheslav Lukianov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Anton_Makeev_small.gif" alt="photo" />Anton Makeev</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Malishev_Egor_small.gif" alt="photo" />Egor Malyshev</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Maria_Marakulina_small.gif" alt="photo" />Maria Marakulina</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Kirill_Maximov_small.gif" alt="photo" />Kirill Maximov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Sasha_Maximova_small.gif" alt="photo" />Sasha Maximova</li>
<li><img src="http://www.jetbrains.com/company/people/photos/soon.gif" alt="photo" />Irina Megorskaya</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Morawiecova_Lucie_small.gif" alt="photo" />Lucie Morawiecova</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Morozov_Alexander_small.gif" alt="photo" />Alexander Morozov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Mossienko_Maxim_small.gif" alt="photo" />Maxim Mossienko</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Musienko_Ekaterina_small.gif" alt="photo" />Ekaterina Musienko</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Ann_Oreshnikova_small.gif" alt="photo" />Ann Oreshnikova</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Eugene_Pasynkov_small.gif" alt="photo" />Eugene Pasynkov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Vaclav_Pech_small.gif" alt="photo" />Vaclav Pech</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Alexey_Pegov_small.gif" alt="photo" />Alexey Pegov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Marie_Pejcharova_small.gif" alt="photo" />Marie Pejcharova</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Petrenko_Eugene_small.gif" alt="photo" />Eugene Petrenko</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Irina_Petrovskaya_small.gif" alt="photo" />Irina Petrovskaya</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Mikhail_Pilin_small.gif" alt="photo" />Mikhail Pilin</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Polonsky_Konstantin_small.gif" alt="photo" />Konstantin Polonsky</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Julia_Repina_small.gif" alt="photo" />Julia Repina</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Elizaveta_Revyakina_small.gif" alt="photo" />Elizaveta Revyakina</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Ryzhenkov_Ilya_small.gif" alt="photo" />Ilya Ryzhenkov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Serebryansky_Andrew_small.gif" alt="photo" />Andrew Serebryansky</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Sergey_Ilya_small.gif" alt="photo" />Ilya Sergey</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Maxim_Shafirov_small.gif" alt="photo" />Maxim Shafirov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Tatiana_Slavina_small.gif" alt="photo" />Tatiana Slavina</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Olesya_Smirnova_small.gif" alt="photo" />Olesya Smirnova</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Konstantin_Solomatov_small.gif" alt="photo" />Konstantin Solomatov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Oleg_Stepanov_small.gif" alt="photo" />Oleg Stepanov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Sher_Pavel_small.gif" alt="photo" />Pavel Sher</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Shliakhovetskaja_Ekaterina_small.gif" alt="photo" />Ekaterina Shliakhovetskaja</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Shpynov_Oleg_small.gif" alt="photo" />Oleg Shpynov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Shrago_Gregory_small.gif" alt="photo" />Gregory Shrago</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Udov_George_small.gif" alt="photo" />George Udov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Sergey_Vasiliev_small.gif" alt="photo" />Sergey Vasiliev</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Natalie_Yaremych_small.gif" alt="photo" />Natalie Yaremych</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Yarko_Yegor_small.gif" alt="photo" />Yegor Yarko</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Zambalayev_Timur_small.gif" alt="photo" />Timur Zambalayev</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Sergey_Zhukov_small.gif" alt="photo" />Sergey Zhukov</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Eugene_Zhuravlev_small.gif" alt="photo" />Eugene Zhuravlev</li>
<li><img src="http://www.jetbrains.com/company/people/photos/Alexander_Zverev_small.gif" alt="photo" />Alexander Zverev</li>
</ul>
</div>
<table style="text-align:left;" border="1" cellspacing="5" cellpadding="5" width="495">
<tbody>
<tr>
<th class="confluenceTh" width="82" align="center">Date</th>
<th class="confluenceTh" width="81" align="center">Build #</th>
<th class="confluenceTh" width="110" align="center">Links</th>
<th class="confluenceTh" width="88" align="center">Status</th>
<th class="confluenceTh" width="102" align="center">Comment</th>
</tr>
<tr>
<td class="confluenceTd" width="82" align="center">
<h2>13 Aug</h2>
</td>
<td class="confluenceTd" width="80">
<h2>922</h2>
</td>
<td class="confluenceTd" width="113">
<h2><a rel="nofollow" href="http://download.jetbrains.com/resharper/ReSharperSetup.4.1.922.25.msi">Download</a></h2>
</td>
<td class="confluenceTd" width="88">
<h2>4.0.1 RC1</h2>
</td>
<td class="confluenceTd" width="102">
<h2>Works here</h2>
</td>
</tr>
<tr>
<td class="confluenceTd" width="80" align="center">12 Aug</td>
<td class="confluenceTd" width="80">921</td>
<td class="confluenceTd" width="115"><a rel="nofollow" href="http://download.jetbrains.com/resharper/ReSharperSetup.4.1.921.22.msi">Download</a></td>
<td class="confluenceTd" width="88">Nightly</td>
<td class="confluenceTd" width="102">Not tested</td>
</tr>
<tr>
<td class="confluenceTd" width="79" align="center">07 Aug</td>
<td class="confluenceTd" width="80">919</td>
<td class="confluenceTd" width="116"><a rel="nofollow" href="http://download.jetbrains.com/resharper/ReSharperSetup.4.0.919.10.msi">Download</a></td>
<td class="confluenceTd" width="87">Nightly</td>
<td class="confluenceTd" width="101">Works here</td>
</tr>
<tr>
<td class="confluenceTd" width="81" align="center">06 Aug</td>
<td class="confluenceTd" width="80">918</td>
<td class="confluenceTd" width="116"><a rel="nofollow" href="http://download.jetbrains.com/resharper/ReSharperSetup.4.0.918.45.msi">Download</a></td>
<td class="confluenceTd" width="87">Nightly</td>
<td class="confluenceTd" width="101">Works here</td>
</tr>
<tr>
<td class="confluenceTd" width="81" align="center">31 Jul</td>
<td class="confluenceTd" width="80">914</td>
<td class="confluenceTd" width="116"><a rel="nofollow" href="http://download.jetbrains.com/resharper/ReSharperSetup.4.0.914.9.msi">Download</a></td>
<td class="confluenceTd" width="87">Nightly</td>
<td class="confluenceTd" width="101">Not tested</td>
</tr>
<tr>
<td class="confluenceTd" width="81" align="center">30 Jul</td>
<td class="confluenceTd" width="80">913</td>
<td class="confluenceTd" width="116"><a rel="nofollow" href="http://download.jetbrains.com/resharper/ReSharperSetup.4.0.913.42.msi">Download</a></td>
<td class="confluenceTd" width="101">Not tested</td>
</tr>
<tr>
<td class="confluenceTd" width="81" align="center">26 Jul</td>
<td class="confluenceTd" width="80">912</td>
<td class="confluenceTd" width="117"><a rel="nofollow" href="http://download.jetbrains.com/resharper/ReSharperSetup.4.0.912.6.msi">Download</a></td>
<td class="confluenceTd" width="88">Nightly</td>
<td class="confluenceTd" width="102">Not tested</td>
</tr>
</tbody>
</table>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:51ff8bfe-7c53-4db3-9051-c35bee2444fe" class="wlWriterSmartContent" style="display:inline;float:none;padding-top:0;padding-right:0;padding-bottom:0;text-align:left;margin:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/ReSharper">ReSharper</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1ec6546d-7af8-4db4-8607-308563f36ef9" class="wlWriterSmartContent" style="display:inline;float:none;padding-top:0;padding-right:0;padding-bottom:0;text-align:left;margin:0;">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/ReSharper">ReSharper</a></div>
<div class="wlWriterHeaderFooter" style="padding-top:4px;padding-right:0;padding-bottom:4px;text-align:left;margin:0;"><a href="http://digg.com/submit?url=http%3a%2f%2fdcarr.wordpress.com%2f2008%2f08%2f13%2fresharper-401-rc1-released%2f&amp;title=ReSharper+4.01+RC1+Released!"><img style="border:0;" src="http://digg.com/img/badges/100x20-digg-button.png" border="0" alt="Digg This" width="100" height="20" /></a></div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/665/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/665/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/665/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/665/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/665/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/665/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/665/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/665/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/665/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/665/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/665/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/665/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=665&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/08/13/resharper-401-rc1-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/08/rs2banner1.jpg" medium="image" />

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Anchipolevsky_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Alshannikov_Igor_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Anisimov_Alexander_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Avdeev_Dmitry_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Baranov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Yury_Belyaev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Natalia_Belyaeva_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/David_Booth_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Bukreeva_Elena_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Jana_Charif_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Nikolay_Chashnikov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/soon.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Roman_Chernyatchik_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Coox_Sergey_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Dmitriev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Ilia_Dumov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Michael_Gerasimov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Golovachev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Alexey_Gopachenko_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Gromov_Peter_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Dmitry_Jemerov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Khalusova_Maria_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Valentin_Kipiatkov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Konopko_Kirill_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/soon.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Mikhail_Kropotov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Alexey_Kudravtsev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Lobacheva_Olga_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Dmitry_Lomov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Vyacheslav_Lukianov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Anton_Makeev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Malishev_Egor_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Maria_Marakulina_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Kirill_Maximov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sasha_Maximova_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/soon.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Morawiecova_Lucie_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Morozov_Alexander_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Mossienko_Maxim_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Musienko_Ekaterina_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Ann_Oreshnikova_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Eugene_Pasynkov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Vaclav_Pech_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Alexey_Pegov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Marie_Pejcharova_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Petrenko_Eugene_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Irina_Petrovskaya_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Mikhail_Pilin_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Polonsky_Konstantin_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Julia_Repina_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Elizaveta_Revyakina_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Ryzhenkov_Ilya_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Serebryansky_Andrew_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Ilya_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Maxim_Shafirov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Tatiana_Slavina_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Olesya_Smirnova_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Konstantin_Solomatov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Oleg_Stepanov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sher_Pavel_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Shliakhovetskaja_Ekaterina_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Shpynov_Oleg_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Shrago_Gregory_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Udov_George_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Vasiliev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Natalie_Yaremych_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Yarko_Yegor_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Zambalayev_Timur_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Sergey_Zhukov_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Eugene_Zhuravlev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.com/company/people/photos/Alexander_Zverev_small.gif" medium="image">
			<media:title type="html">photo</media:title>
		</media:content>

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>Undocumented Linq! .NET 3.5 SP1 Gold Forgot to Mention these Critical Changes that might Break your Code</title>
		<link>http://team.pushbomb.com/2008/08/11/undocumented-linq-net-35-sp1-gold-forgot-to-mention-these-critical-changes-that-might-break-your-code/</link>
		<comments>http://team.pushbomb.com/2008/08/11/undocumented-linq-net-35-sp1-gold-forgot-to-mention-these-critical-changes-that-might-break-your-code/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 01:54:03 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[concepts implemented]]></category>
		<category><![CDATA[c# 3.5]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[sp1]]></category>
		<category><![CDATA[Undocumented]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/08/11/undocumented-linq-net-35-sp1-gold-forgot-to-mention-these-critical-changes-that-might-break-your-code/</guid>
		<description><![CDATA[There are a few changes (one you absolutely need to know about yet I’ve never seen officially from MSFT) in the just released SP1 for .NET 3.5 . Again, these are completely undocumented. Cast breaking change: Cast was not correctly behaving in all scenarios do it was silently fixed for SP1. This does break you code in some situations! If you’ve been using Cast for example to perform generic collection type conversions well that was not so good. Here are the two assumptions that we used to get away with not following:

The elements in the object based collections need some additional step (specifically an un-box or a reference conversion)

The starting point is only non-generic types (think ICollection, IEnumerable, etc) you call Cast on.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=647&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://dcarr.files.wordpress.com/2008/08/linq.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;margin:0 0 0 10px;" src="http://dcarr.files.wordpress.com/2008/08/linq-thumb.png?w=351&#038;h=123" border="0" alt="Linq" width="351" height="123" align="right" /></a></p>
<p>These are <a href="http://download.microsoft.com/download/A/2/8/A2807F78-C861-4B66-9B31-9205C3F22252/VS2008SP1Readme.htm#LINQ" target="_blank">completely undocumented. </a></p>
<h2>LINQ to Objects:</h2>
<p><strong></strong></p>
<h6><strong>Specialized enumerable:</strong></h6>
<p><strong></strong>The new implementation recognizes queries that apply Where and/or Select to arrays or List&lt;T&gt; and fold pipelines of multiple enumerable objects into single specialized enumerables.</p>
<p>According to <a href="http://blogs.msdn.com/dinesh.kulkarni/about.aspx" target="_blank">Dinesh Kulkari</a> at Microsoft this enhancement:</p>
<blockquote><p><strong>….produces substantial improvement in base overhead of common LINQ to Objects queries (at times 30+%).</strong></p></blockquote>
<h2>Cast&lt;T&gt; breaking change</h2>
<h5>This is a bug fix and a breaking change.  Note: <a href="http://blogs.msdn.com/ed_maurer/archive/2008/02/16/breaking-change-in-linq-queries-using-explicitly-typed-range-variables.aspx">this</a> post</h5>
<p>Cast&lt;T&gt; was not correctly behaving in all scenarios do it was silently fixed for SP1. This does break you code in some situations!</p>
<p>If you’ve been using Cast&lt;T&gt; for example to perform generic collection type conversions well that was not so good. Here are the two assumptions that we used to get away with not following:</p>
<ul>
<li>The elements in the object based collections need some additional step (specifically an un-box or a reference conversion)</li>
<li>The starting point is only non-generic types (think ICollection, IEnumerable, etc) you call Cast&lt;T&gt; on.</li>
</ul>
<p>So although the fix is a breaking one, it does move Cast&lt;T&gt; to expected and specified behavior (as it worked in beta 2).</p>
<p>Indeed if this breaks your code your code was already silently broken (another possible reason for the silence).</p>
<p><strong>Expect more InvalidCastExceptions (if you start to wonder why).</strong></p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f08%2f11%2fundocumented-linq-net-35-sp1-gold-forgot-to-mention-these-critical-changes-that-might-break-your-code%2f"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f08%2f11%2fundocumented-linq-net-35-sp1-gold-forgot-to-mention-these-critical-changes-that-might-break-your-code%2f" border="0" alt="kick it on DotNetKicks.com" /></a></p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b68e263b-963b-4c0a-bf6e-8d4e0388d117" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/.NET+3.5+SP1">.NET 3.5 SP1</a>,<a rel="tag" href="http://technorati.com/tags/LINQ.+performance">LINQ. performance</a>,<a rel="tag" href="http://technorati.com/tags/LINQ+to+Objects">LINQ to Objects</a>,<a rel="tag" href="http://technorati.com/tags/undocumented">undocumented</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a6283564-d9f7-4299-a4fe-90f94a34b78b" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/.NET+3.5+SP1">.NET 3.5 SP1</a>,<a rel="tag" href="http://del.icio.us/popular/LINQ.+performance">LINQ. performance</a>,<a rel="tag" href="http://del.icio.us/popular/LINQ+to+Objects">LINQ to Objects</a>,<a rel="tag" href="http://del.icio.us/popular/undocumented">undocumented</a></div>
<p><em>Adapted from </em><a href="http://blogs.msdn.com/user/Profile.aspx?UserID=3562"><em>Dinesh.Kulkarni</em></a></p>
<div class="wlWriterHeaderFooter" style="text-align:right;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=http%3a%2f%2fdcarr.wordpress.com%2f2008%2f08%2f11%2fundocumented-linq-net-35-sp1-gold-forgot-to-mention-these-critical-changes-that-might-break-your-code%2f&amp;title=Undocumented+Linq!+.NET+3.5+SP1+Gold+Forgot+to+Mention+these+Critical+Changes+that+might+Break+your+Code"><img style="border:0;" src="http://digg.com/img/badges/100x20-digg-button.png" border="0" alt="Digg This" width="100" height="20" /></a></div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/647/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/647/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/647/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/647/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/647/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/647/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/647/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/647/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/647/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/647/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/647/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/647/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=647&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/08/11/undocumented-linq-net-35-sp1-gold-forgot-to-mention-these-critical-changes-that-might-break-your-code/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/08/linq-thumb.png" medium="image">
			<media:title type="html">Linq</media:title>
		</media:content>

		<media:content url="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f08%2f11%2fundocumented-linq-net-35-sp1-gold-forgot-to-mention-these-critical-changes-that-might-break-your-code%2f" medium="image">
			<media:title type="html">kick it on DotNetKicks.com</media:title>
		</media:content>

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>JetBrains Releases ReSharper 4.01 Beta 1 as EAP Build 917 &#8211; Download Here</title>
		<link>http://team.pushbomb.com/2008/08/05/resharper-releases-401-beta-1-as-eap-build-917-download-here/</link>
		<comments>http://team.pushbomb.com/2008/08/05/resharper-releases-401-beta-1-as-eap-build-917-download-here/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 01:08:20 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[C# 3.0 for Internal DSL]]></category>
		<category><![CDATA[Industry News]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[concepts implemented]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[JetBrains]]></category>
		<category><![CDATA[Must-Have]]></category>
		<category><![CDATA[Refactoring]]></category>
		<category><![CDATA[Resharper]]></category>
		<category><![CDATA[VS 2008 Add-In]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/08/05/resharper-releases-401-beta-1-as-eap-build-917-download-here/</guid>
		<description><![CDATA[Click here to download the new EAP post 4.0 beta 1 release of 4.01 (a maintenance focused release).  On the heels of their 4.0 release which further cemented their utter dominance as the must have Visual Studio 2008 augmentation for true enterprise development, their not resting in the least.Click here to download the new EAP post 4.0 beta 1 release of 4.01 (a maintenance focused release). 

Please participate by providing your experiences to JetBrains so they can evolve this work into another solid must have upgrade. Click here to join their issue tracker as well as newsgroups.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=622&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<blockquote><p>On the heels of their 4.0 release which is arguably their most strategic in the .NET world to date, JetBrains continues to innovate with this beta.</p></blockquote>
<p><a title="ReSharper New 4.01 Beta" href="http://download.jetbrains.com/resharper/ReSharperSetup.4.0.917.2.msi" target="_blank">Click here to download</a> the new EAP post 4.0  release of 4.01 (a maintenance focused release).<a href="http://www.jetbrains.com/"><img class="alignright size-full wp-image-624" style="border:2px solid black;margin:2px;" src="http://dcarr.files.wordpress.com/2008/08/pic_buy_rs.gif?w=138&#038;h=119" alt="" width="138" height="119" /></a></p>
<p>Please participate by providing your experiences to JetBrains so they can evolve this work into another solid must have upgrade.</p>
<p>We’re using this release with great success (however we do not use the VB.NET aspects so no comment there).</p>
<p>Also make sure to check out the add-ins for 4.0 <a href="http://www.jetbrains.com/resharper/plugins/" target="_blank">here</a>.</p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:07bcd8e2-0fcb-4f85-93bc-fec30e221398" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/ReSharper">ReSharper</a>,<a rel="tag" href="http://del.icio.us/popular/C%23+3.0">C# 3.0</a>,<a rel="tag" href="http://del.icio.us/popular/VS+2008+Add-In">VS 2008 Add-In</a>,<a rel="tag" href="http://del.icio.us/popular/Must-Have">Must-Have</a>,<a rel="tag" href="http://del.icio.us/popular/ReFactoring">ReFactoring</a>,<a rel="tag" href="http://del.icio.us/popular/Agile">Agile</a>,<a rel="tag" href="http://del.icio.us/popular/JetBrains">JetBrains</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c8dd9da0-eab0-4c6e-8a24-fce6661020e5" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/ReSharper">ReSharper</a>,<a rel="tag" href="http://technorati.com/tags/C%23+3.0">C# 3.0</a>,<a rel="tag" href="http://technorati.com/tags/VS+2008+Add-In">VS 2008 Add-In</a>,<a rel="tag" href="http://technorati.com/tags/Must-Have">Must-Have</a>,<a rel="tag" href="http://technorati.com/tags/ReFactoring">ReFactoring</a>,<a rel="tag" href="http://technorati.com/tags/Agile">Agile</a>,<a rel="tag" href="http://technorati.com/tags/JetBrains">JetBrains</a></div>
<div class="wlWriterHeaderFooter" style="text-align:right;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=http%3a%2f%2fdcarr.wordpress.com%2f2008%2f08%2f05%2fresharper-releases-401-beta-1-as-eap-build-917-download-here%2f&amp;title=ReSharper+Releases+4.01+Beta+1+as+EAP+Build+917+%e2%80%93+Download+Here"><img style="border:0;" src="http://digg.com/img/badges/100x20-digg-button.png" border="0" alt="Digg This" width="100" height="20" /></a></div>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f08%2f05%2fresharper-releases-401-beta-1-as-eap-build-917-download-here%2f"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f08%2f05%2fresharper-releases-401-beta-1-as-eap-build-917-download-here%2f" border="0" alt="kick it on DotNetKicks.com" /></a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/622/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/622/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/622/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/622/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/622/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/622/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/622/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/622/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/622/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/622/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/622/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/622/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=622&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/08/05/resharper-releases-401-beta-1-as-eap-build-917-download-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/08/pic_buy_rs.gif" medium="image" />

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>

		<media:content url="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fblog.domaindotnet.com%2f2008%2f08%2f05%2fresharper-releases-401-beta-1-as-eap-build-917-download-here%2f" medium="image">
			<media:title type="html">kick it on DotNetKicks.com</media:title>
		</media:content>
	</item>
		<item>
		<title>NHIbernate 2.0 Goes Beta 1 after Microsoft &#8216;Linq to Entities&#8217; receives &#8216;vote of no confidence&#8217;</title>
		<link>http://team.pushbomb.com/2008/06/29/nhibernate-20-goes-beta-1-while-microsoft-linq-to-entities-receives-vote-of-no-confidence-from-many-leading-net-experts-as-unacceptable/</link>
		<comments>http://team.pushbomb.com/2008/06/29/nhibernate-20-goes-beta-1-while-microsoft-linq-to-entities-receives-vote-of-no-confidence-from-many-leading-net-experts-as-unacceptable/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 04:48:00 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[ORM]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[Castle]]></category>
		<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[Expert ORM Opinion]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[NHibernate Beta 1]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/06/29/nhibernate-20-goes-beta-1-while-microsoft-linq-to-entities-receives-vote-of-no-confidence-from-many-leading-net-experts-as-unacceptable/</guid>
		<description><![CDATA[The first official beta for NHibernate 2.0 was released today.  After the recent initiative against  Microsoft ‘Linq to Entities’ in the form of a web-driven petition for a 'vote of no confidence’, the highly anticipated successor to the well-established NHibernate 1.2. We have been working with 2.0.X since the first alpha, and following the progress of the trunk. In our opinion this beta has the high quality of prior betas and we recommend it for non-critical systems immediately as your risk policy allows. We’re working on a more detailed analysis coming soon on some of the key improvements.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=376&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>NOTE: NHibernate 2.0 GOLD is released. This post is outdated. <a title="NHibernate 2.0 Released" href="http://blog.domaindotnet.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/" target="_self">Click here for the info.</a></strong></p></blockquote>
<p><a href="http://sourceforge.net/project/platformdownload.php?group_id=73818"><img class="alignright" style="border-width:0;margin:5px;" src="http://dcarr.files.wordpress.com/2008/06/nhibernate.png?w=201&#038;h=52" border="0" alt="nhibernate" width="201" height="52" align="right" /></a></p>
<p><span style="font-size:medium;color:#ffffff;">The first official beta for NHibernate 2.0 was recently released<br />
</span></p>
<p><strong><a href="http://sourceforge.net/project/showfiles.php?group_id=73818&amp;package_id=73969&amp;release_id=610227">Click here to download the package</a>.</strong></p>
<p>This comes on the heels of the damaging <a href="http://efvote.wufoo.com/forms/ado-net-entity-framework-vote-of-no-confidence/">‘boycott’</a> of the <a rel="tag" href="http://code.msdn.microsoft.com" target="_blank">Microsoft</a> ‘Linq to Entities’ upcoming release, which was anticipated to be a serious competitor to NHibernate.</p>
<p><a href="http://efvote.wufoo.com/forms/ado-net-entity-framework-vote-of-no-confidence/">Click here to view the on-line petition</a></p>
<p><a href="http://efvote.wufoo.com/reports/entity-framework-vote-of-no-confidence-signatories/#public">Click here to view the signers of the petition</a></p>
<p><a href="http://sourceforge.net/projects/nhcontrib"></a></p>
<table border="1" cellspacing="5" cellpadding="5" width="497">
<tbody>
<tr>
<td width="485" valign="top">
<h2>LAST MINUTE UPDATE FROM THE NHIBERNATE TEAM</h2>
<p>There has been a change in how NHibernate is packaged as the core and contrib aspects now have dedicated locations.</p>
<p>Since NHibernate 2.0 Alpha 1, <strong>ONLY THE CORE</strong> of the project is included at the link above. The <a href="http://sourceforge.net/projects/nhcontrib">Contrib Projects</a> are now in a dedicated location:</p>
<p><a href="http://sourceforge.net/projects/nhcontrib">http://sourceforge.net/projects/nhcontrib</a></p>
<p align="left">There are a few new projects that are essential to investigate for your needs (for example the <a href="http://nhcontrib.wiki.sourceforge.net/BurrowHome">Burrow project</a>). Also be sure to visit the wiki for these significant projects:</p>
<p><a href="http://nhcontrib.wiki.sourceforge.net">http://nhcontrib.wiki.sourceforge.net</a></p>
<p><strong>See the end of this post for a partial list of these contrib efforts.</strong></td>
</tr>
</tbody>
</table>
<p>The team at <a href="http://damon.agilefactor.com/">domain.dot.net</a> has been working with 2.0.X since the first alpha, and following the progress of the trunk. In our opinion this beta has the high quality of prior betas and we recommend it for non-critical systems immediately as your risk policy allows. We’re working on a more detailed analysis coming soon on some of the key improvements.</p>
<p>To download the code direct from the trunk use this SVN URL:</p>
<p><tt><a href="http://nhibernate.svn.sourceforge.net/viewvc/nhibernate/">https://nhibernate.svn.sourceforge.net/svnroot/nhibernate</a></tt></p>
<p>This is no minor update, as with this release they will align with the widely used and praised <a href="http://www.hibernate.org/344.html">‘Hibernate 3.2’ for Java</a>. Here is a listing of the planned new features which are represented to varying degrees of complexness in this beta:</p>
<h2>NHibernate 2.0.0</h2>
<h3>The upcoming NHibernate 2.0 release will add support for many more exciting features; some are ported from Hibernate 3.x, others are features unique to NHibernate.</h3>
<p><a name="A15"></a></p>
<h4>Core</h4>
<ol>
<li>Updated Interceptor functionalities to match those in Hibernate 3.2</li>
<li>Support for SessionFactory events and listeners</li>
<li>CriteriaTransformer allows one to clone and transform ICriteria</li>
<li>Support for MultiCriteria; similar to MultiQuery implemented in NH1.2</li>
<li>Support for the &lt;join&gt; element. It enables table-per-subclass mapping using a discriminator, or mapping a single entity from more than one tables</li>
<li>StatelessSession provides an easier way to work with bulk operations</li>
<li>Support for CacheMode allows one to have better control on how the session interacts with the second-level cache</li>
<li>Implementation of query plan; NHibernate will parse named queries once at start-up time, thus improving performance</li>
<li>Support of native ID generator for &lt;idbag&gt;</li>
<li>Improved and more consistent syntax for configuration</li>
<li>Other internal improvements</li>
</ol>
<p><a name="A16"></a></p>
<h4>Sub-projects</h4>
<ul>
<li>NHibernate.Linq (a LINQ provider for NHibernate)</li>
<li>NHibernate.Statistics</li>
</ul>
<h2>NHibernate key features:</h2>
<ul>
<li><strong>Natural programming model</strong> &#8211; NHibernate supports natural OO idiom; inheritance, polymorphism, composition and the .NET collections framework, including generic collections.</li>
</ul>
<ul>
<li><strong>Native .NET</strong> &#8211; NHibernate API uses .NET conventions and idioms</li>
</ul>
<ul>
<li><strong>Support for fine-grained object models</strong> &#8211; a rich variety of mappings for collections and dependent objects</li>
</ul>
<ul>
<li><strong>No build-time bytecode enhancement</strong> &#8211; there&#8217;s no extra code generation or bytecode processing steps in your build procedure</li>
</ul>
<ul>
<li><strong>The query options</strong> &#8211; NHibernate addresses both sides of the problem; not only how to get objects into the database, but also how to get them out again</li>
</ul>
<ul>
<li><strong>Custom SQL</strong> &#8211; specify the exact SQL that NHibernate should use to persist your objects. Stored procedures are supported on Microsoft SQL Server.</li>
</ul>
<ul>
<li><strong>Support for &#8220;conversations&#8221;</strong> &#8211; NHibernate supports long-lived persistence contexts, detach/reattach of objects, and takes care of optimistic locking automatically</li>
</ul>
<ul>
<li><strong>Free/open source</strong> &#8211; NHibernate is licensed under the LGPL (Lesser GNU Public License)</li>
</ul>
<h2>Partial Listing of Key Contrib Work for NHibernate</h2>
<h3>NHibernate.Burrow</h3>
<blockquote><p>Burrow is a light weight middleware developed to support .Net applications using NHibernate (maybe also referred as NH in this article) as ORM framework.<br />
Using Asp.net with NHibernate could be a challenge because of the fact that NHibernate is a stateful environment while Asp.net is a stateless framework. Burrow can help solve this conflict by providing advanced and smart session/transaction management and other facilitates.</p></blockquote>
<p><strong>Road Map of Burrow Wiki:</strong></p>
<ul>
<li><strong><a href="http://nhcontrib.wiki.sourceforge.net/BurrowIntroduction">Introduction</a> -</strong> a brief introduction of Burrow</li>
<li><strong><a href="http://nhcontrib.wiki.sourceforge.net/BurrowGetStarted">Get Started</a></strong> &#8211; tells how to setup the Burrow framework.</li>
<li><strong><a href="http://nhcontrib.wiki.sourceforge.net/BurrowConversationExplained">Burrow Conversation Explained</a> -</strong> gives more detail about long conversation.</li>
<li><strong><a href="http://nhcontrib.wiki.sourceforge.net/BurrowStatefulFields">StatefulField Attributes</a> -</strong> about very useful Burrow.WebUtil attributes that can simplify states persistence for ASP.NET controls and pages</li>
<li><strong><a href="http://nhcontrib.wiki.sourceforge.net/BurrowFAQ">FAQ</a></strong> &#8211; you know what it is.</li>
</ul>
<p>Other Projects:</p>
<ul>
<li><a href="http://nhcontrib.wiki.sourceforge.net/">Core Wiki – Click Here</a><br />
|</p>
<ul>
<li>NHibernate.Search</li>
<li>NHibernate.Mapping.Attributes</li>
<li>NHibernate.Validator</li>
<li>NHibernate.Shards</li>
<li><a class="wiki_link" href="http://nhcontrib.wiki.sourceforge.net/BurrowHome">NHibernate.Burrow</a></li>
<li>NHibernate.Caches.MemCache</li>
<li>NHibernate.Caches.Prevalence</li>
<li>NHibernate.Caches.SysCache</li>
<li>NHibernate.Caches.SysCache2</li>
<li>NHibernate.JetDriver</li>
<li>NHibernate.Tasks</li>
<li>NHibernate.Tool.hbm2net</li>
<li>NHibernate.UserTypes.Oracle</li>
<li>NHibernate.UserTypes.SqlTypes</li>
<li>&#8230; and others</li>
</ul>
</li>
<li>SBN Trunk is:
<ul>
<li><a title="http://nhcontrib.svn.sourceforge.net/viewvc/nhcontrib/" href="https://nhcontrib.svn.sourceforge.net/svnroot/nhcontrib">http://nhcontrib.svn.sourceforge.net/viewvc/nhcontrib/</a></li>
</ul>
</li>
</ul>
<p align="right"><em>NHIbernate is a project under sponsorship of Red Hat Middleware, LLC.<br />
JBoss and Hibernate are registered trademarks<br />
</em><em>and servicemarks of Red Hat, Inc. All rights reserved. </em></p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:df988018-7ec8-49d4-b07f-0a92ff05730d" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/NHibernate">NHibernate</a>,<a rel="tag" href="http://del.icio.us/popular/NHibernate+Beta+1">NHibernate Beta 1</a>,<a rel="tag" href="http://del.icio.us/popular/Castle">Castle</a>,<a rel="tag" href="http://del.icio.us/popular/ORM">ORM</a>,<a rel="tag" href="http://del.icio.us/popular/Microsoft">Microsoft</a>,<a rel="tag" href="http://del.icio.us/popular/Entity+Framework">Entity Framework</a>,<a rel="tag" href="http://del.icio.us/popular/Linq">Linq</a>,<a rel="tag" href="http://del.icio.us/popular/Expert+ORM+Opinion">Expert ORM Opinion</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d066c765-fc0d-4819-a527-281c315663b7" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/NHibernate">NHibernate</a>,<a rel="tag" href="http://technorati.com/tags/NHibernate+Beta+1">NHibernate Beta 1</a>,<a rel="tag" href="http://technorati.com/tags/Castle">Castle</a>,<a rel="tag" href="http://technorati.com/tags/ORM">ORM</a>,<a rel="tag" href="http://technorati.com/tags/Microsoft">Microsoft</a>,<a rel="tag" href="http://technorati.com/tags/Entity+Framework">Entity Framework</a>,<a rel="tag" href="http://technorati.com/tags/Linq">Linq</a>,<a rel="tag" href="http://technorati.com/tags/Expert+ORM+Opinion">Expert ORM Opinion</a></div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/376/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/376/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/376/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=376&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/06/29/nhibernate-20-goes-beta-1-while-microsoft-linq-to-entities-receives-vote-of-no-confidence-from-many-leading-net-experts-as-unacceptable/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/06/nhibernate.png" medium="image">
			<media:title type="html">nhibernate</media:title>
		</media:content>
	</item>
		<item>
		<title>Master Generic Type Constrains : A critical success factor in Linq Development</title>
		<link>http://team.pushbomb.com/2008/06/27/master-generic-type-constrains-a-critical-success-factor-in-linq-development/</link>
		<comments>http://team.pushbomb.com/2008/06/27/master-generic-type-constrains-a-critical-success-factor-in-linq-development/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 17:07:06 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[Generics]]></category>
		<category><![CDATA[.NET 2.0]]></category>
		<category><![CDATA[Assumed Knowledge]]></category>
		<category><![CDATA[Basics]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[Core Knowledge]]></category>
		<category><![CDATA[Linq to Objects]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/06/27/master-generic-type-constrains-a-critical-success-factor-in-linq-development/</guid>
		<description><![CDATA[An item we often see teams ‘leaving money on the table’ with is a failure to leverage (or leverage fully) generic type constraints. Now with Linq you cannot get away with it anymore as for now, although far more powerful, there are still long lines of complex generic delegate types to navigate.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=365&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p> </p>
<p>More accurately called ..<a href="http://research.microsoft.com/~akenn/generics/ECOOP06.pdf">&#8216;Variance and Generalized Constraints for C# Generics&#8217;)</a> (1)</p>
<p><strong>An item we often see teams ‘leaving money on the table’ with is a failure to leverage (or leverage fully) generic type constraints. Now with Linq you cannot get away with it anymore as for now, although far more powerful, there are still long lines of complex generic delegate types to navigate.</strong></p>
<p>This post based on the docs from MSDN, however we’ve added some significant teeth we believe (with more to come) We at least made this potentially more ‘real world’ in complexity.</p>
<div id="ctl00_LibFrame_ra1" class="resizableArea">
<div id="ctl00_LibFrame_raRight" class="rightSection">
<div id="mainSection">
<div id="mainBody">
<div class="topic">
<div id="mainSection">
<div id="mainBody">
<p class="introduction">When you define a generic class, you can apply restrictions to the kinds of types that client code can use for type arguments when it instantiates your class. If client code tries to instantiate your class by using a type that is not allowed by a constraint, the result is a compile-time error. These restrictions are called constraints. Constraints are specified by using the <span class="keyword">where</span> contextual keyword. (NOTE: the constraint is LITERAL unless specified otherwise)</p>
<h1>where T: struct    (literal)</h1>
<blockquote><p>The type argument must be a value type. Any value type except <a href="http://msdn.microsoft.com/en-us/library/system.nullable.aspx">Nullable</a> can be specified.</p>
<p>See <a href="http://msdn.microsoft.com/en-us/library/2cf62fcy.aspx">Using Nullable Types (C# Programming Guide)</a> for more information.</p></blockquote>
<h1>where T : class   (literal)</h1>
<blockquote><p>The type argument must be a reference type; this applies also to any class, interface, delegate, or array type.</p></blockquote>
<h1>where T : new()   (literal)</h1>
<blockquote><p>The type argument must have a public parameterless constructor. When used together with other constraints, the new() constraint must be specified last.</p></blockquote>
<h1>where T : SomeClassName   (non-literal)</h1>
<blockquote><p>Example:</p>
<p><span style="background:#100d0c;color:#8ac5ff;">public class Stream</span><span style="background:#100d0c;color:#64b1ff;">List</span><span style="background:#100d0c;color:#c0c0c0;">&lt;</span><span style="background:#100d0c;color:#ffffff;">T</span><span style="background:#100d0c;color:#c0c0c0;">&gt; </span><span style="background:#100d0c;color:#ffffff;">: </span><span style="background:#100d0c;color:#64b1ff;">List</span><span style="background:#100d0c;color:#c0c0c0;">&lt;</span><span style="background:#100d0c;color:#ffffff;">T</span><span style="background:#100d0c;color:#c0c0c0;">&gt; </span><span style="background:#100d0c;color:#8ac5ff;">where </span><span style="background:#100d0c;color:#ffffff;">T : </span><span style="background:#100d0c;color:#8ac5ff;">Stream</span><a href="http://11011.net/software/vspaste"></a></p>
<p>Here we are creating a custom collection from List&lt;T&gt; and also ensuring (see above) that values are reference types.</p></blockquote>
<h1>where T : someinterface    (non-literal)</h1>
<blockquote><p>The type argument must be or implement the specified interface. Multiple interface constraints can be specified. The constraining interface can also be generic.</p></blockquote>
<h1>where T : U       (non-literal)</h1>
<blockquote><p>The type argument supplied for T must be or derive from the argument supplied for U. This is called a naked type constraint.</p></blockquote>
<h2>domain.dot.net addition</h2>
<p><span style="font-size:small;color:#ffffff;">Here is an example of a pattern we use that combines the concept of generic constraints to make Extension methods far more effective.</span></p>
<p><span style="font-size:small;color:#ffffff;">Assume you want to allow any Enum to support seamless conversion to a Linq sequence an IEnumerable&lt;TType&gt; where TType : Enum</span></p>
<p><span style="font-size:small;color:#ffffff;">Wait! You cannot do that! Ugh…Enum is one of the invalid constraint types (as is delegate, Array, etc.)</span></p>
<p><span style="font-size:small;color:#ffffff;">Here is how we ‘solve’ this:</span></p>
<p><span style="font-size:small;color:#ffffff;">1) Assert as much as you can about a type</span></p>
<p><span style="font-size:small;color:#ffffff;">2) Do run-time checks if needed</span></p>
<p><span style="font-size:small;color:#ffffff;">Here is the header:</span></p>
<p align="left"><span style="background:#16140f;color:#22bdff;">public static </span><span style="background:#16140f;color:#dde074;">IEnumerable</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#eddfc0;">TEnumType</span><span style="background:#16140f;color:#c0c0c0;">&gt; </span><span style="background:#16140f;color:#eddfc0;">EnumToLinq</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#eddfc0;">TEnumType</span><span style="background:#16140f;color:#c0c0c0;">&gt;</span><span style="background:#16140f;color:#e7696c;">( <br />
</span><span style="background:#16140f;color:#22bdff;">                this </span><span style="background:#16140f;color:#eddfc0;">TEnumType target</span><span style="background:#16140f;color:#e7696c;">)</p>
<p>                     </span><span style="background:#16140f;color:#22bdff;">where </span><span style="background:#16140f;color:#eddfc0;">TEnumType </span><span style="background:#16140f;color:#e7696c;">: </span><span style="background:#16140f;color:#22bdff;">struct</span><span style="background:#16140f;color:#e7696c;">, </span><span style="background:#16140f;color:#dde074;">IComparable</span><span style="background:#16140f;color:#e7696c;">, </span><span style="background:#16140f;color:#dde074;">IFormattable</span><span style="background:#16140f;color:#e7696c;">, </span><span style="background:#16140f;color:#dde074;">IConvertible</span><a href="http://11011.net/software/vspaste"></a></p>
<p><span style="font-size:small;color:#ffffff;">If that immediately makes you feel sick, well this is what refactored code looks like where you try to not force an entire team to work daily here, but it’s unavoidable. After having our heads in this for a while you absolutely need to master this to be a senior Linq developer (and looking at others code is always fantastic for us as we find things we learn we were doing wrong).</span></p>
<p><span style="font-size:small;color:#ffffff;">And here is the full extension method (go ahead and use it for whatever you want if you find value):</span></p>
<p><span style="background:#16140f;color:#22bdff;">public static </span><span style="background:#16140f;color:#dde074;">IEnumerable</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#eddfc0;">TEnumType</span><span style="background:#16140f;color:#c0c0c0;">&gt; </span><span style="background:#16140f;color:#eddfc0;">EnumToLinq</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#eddfc0;">TEnumType</span><span style="background:#16140f;color:#c0c0c0;">&gt;</span><span style="background:#16140f;color:#e7696c;">(</p>
<p>                 </span><span style="background:#16140f;color:#22bdff;">this </span><span style="background:#16140f;color:#eddfc0;">TEnumType target</span><span style="background:#16140f;color:#e7696c;">)</p>
<p>                            </span><span style="background:#16140f;color:#22bdff;">where </span><span style="background:#16140f;color:#eddfc0;">TEnumType </span><span style="background:#16140f;color:#e7696c;">: </span><span style="background:#16140f;color:#22bdff;">struct</span><span style="background:#16140f;color:#e7696c;">, </span><span style="background:#16140f;color:#dde074;">IComparable</span><span style="background:#16140f;color:#e7696c;">,</p>
<p>                                  </span><span style="background:#16140f;color:#dde074;">IFormattable</span><span style="background:#16140f;color:#e7696c;">, </span><span style="background:#16140f;color:#dde074;">IConvertible </span><span style="background:#16140f;color:#e7696c;">{</p>
<p>                                  </span><span style="background:#16140f;color:#22bdff;">var </span><span style="background:#16140f;color:#eddfc0;">_type </span><span style="background:#16140f;color:#c0c0c0;">= </span><span style="background:#16140f;color:#eddfc0;">target</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#eddfc0;">GetType</span><span style="background:#16140f;color:#e7696c;">();</p>
<p>                                   i</span><span style="background:#16140f;color:#22bdff;">if </span><span style="background:#16140f;color:#e7696c;">(</span><span style="background:#16140f;color:#c0c0c0;">!</span><span style="background:#16140f;color:#eddfc0;">_type</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#eddfc0;">BaseType</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#eddfc0;">Equals</span><span style="background:#16140f;color:#e7696c;">(</span><span style="background:#16140f;color:#22bdff;">typeof </span><span style="background:#16140f;color:#e7696c;">(</span><span style="background:#16140f;color:#e7d97a;">Enum</span><span style="background:#16140f;color:#e7696c;">)))</p>
<p>                                        </span><span style="background:#16140f;color:#22bdff;">throw new </span><span style="background:#16140f;color:#e7d97a;">TypeInitializationException</span><span style="background:#16140f;color:#e7696c;">(</p>
<p>                                        </span><span style="background:#16140f;color:#eddfc0;">_type</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#eddfc0;">FullName</span><span style="background:#16140f;color:#e7696c;">, </span><span style="background:#16140f;color:#22bdff;">new </span><span style="background:#16140f;color:#e7d97a;">InvalidOperationException</span><span style="background:#16140f;color:#e7696c;">(</p>
<p>                                           </span><span style="background:#16140f;color:#eddfc0;">_type</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#eddfc0;">Name </span><span style="background:#16140f;color:#c0c0c0;">+ </span><span style="background:#16140f;color:#a6f0e6;">&#8221; is not an Enum&#8221;</span></p>
<div><span style="background:#16140f;color:#e7696c;">))</p>
<p>                                                                              ; </span></div>
<p><span style="background:#16140f;color:#e7696c;">                  <span style="background:#16140f;color:#22bdff;">return </span><span style="background:#16140f;color:#e7d97a;">Enum</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#eddfc0;">GetValues</span><span style="background:#16140f;color:#e7696c;">(</span><span style="background:#16140f;color:#eddfc0;">_type</span><span style="background:#16140f;color:#e7696c;">)</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#eddfc0;">Cast</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#eddfc0;">TEnumType</span><span style="background:#16140f;color:#c0c0c0;">&gt;</span><span style="background:#16140f;color:#e7696c;">(); } </span><a href="http://11011.net/software/vspaste"></a></p>
<p></span>Bottom line is we get a nice sequence we can use any Linq to Object expression on.</p>
<p>Here is an example of the above in use:</p>
<p><span style="background:#16140f;color:#adadad;">/// &lt;summary&gt;</p>
<p>/// </span><span style="background:#16140f;color:#7cfc00;">Using a simple bitwise this for now returns</p>
<p></span><span style="background:#16140f;color:#adadad;">/// </span><span style="background:#16140f;color:#7cfc00;">a predicate for later execution and resolution</p>
<p></span><span style="background:#16140f;color:#adadad;">/// </span><span style="background:#16140f;color:#7cfc00;">of a FilleystemInfo. This is used now in Linq</p>
<p></span><span style="background:#16140f;color:#adadad;">/// </span><span style="background:#16140f;color:#7cfc00;">queries to get back various types of things</p>
<p></span><span style="background:#16140f;color:#adadad;">/// </span><span style="background:#16140f;color:#7cfc00;">on the hard disk.</p>
<p></span><span style="background:#16140f;color:#adadad;">/// &lt;/summary&gt;</p>
<p>/// &lt;value&gt;</span><span style="background:#16140f;color:#7cfc00;">To predicate.</span><span style="background:#16140f;color:#adadad;">&lt;/value&gt;</p>
<p>/// </span></p>
<div><span style="background:#16140f;color:#7cfc00;">Documentation Created 6/27/2008 </span></div>
<p><span style="background:#16140f;color:#7cfc00;"><span style="background:#16140f;color:#22bdff;">private static </span><span style="background:black;color:#e1e100;">Predicate</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#e7d97a;">FileSystemInfo</span><span style="background:#16140f;color:#c0c0c0;">&gt; </span><span style="background:#16140f;color:#eddfc0;">ToPredicate </span><span style="background:#16140f;color:#e7696c;">{</p>
<p></span><span style="background:#16140f;color:#22bdff;">get </span><span style="background:#16140f;color:#e7696c;">{</p>
<p></span></p>
<p></span><span style="background:#16140f;color:#7cfc00;">                          // NOTE: This sets the <br />
                      </span></p>
<div><span style="background:#16140f;color:#7cfc00;">    // class value (we only need 1 static)</p>
<p>                          // as well as uses a simple bitwise <br />
                          // &amp; to check if the Directory </span></div>
<p><span style="background:#16140f;color:#7cfc00;">                          // attribute is set</p>
<p>                          <span style="background:#16140f;color:#22bdff;">return </span><span style="background:#16140f;color:#eddfc0;">_persistendPred </span><span style="background:#16140f;color:#c0c0c0;">=</p>
<p></span><span style="background:#16140f;color:#eddfc0;">                                  fileInfo </span><span style="background:#16140f;color:#c0c0c0;">=&gt; </span><span style="background:#16140f;color:#e7696c;">((</span><span style="background:#16140f;color:#eddfc0;">fileInfo</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#eddfc0;">Attributes </span><span style="background:#16140f;color:#c0c0c0;">&amp; <br />
                                    </span><span style="background:#16140f;color:#c0c0c0;">   </span><span style="background:#16140f;color:#7cedea;">FileAttributes</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#eddfc0;">Directory</span><span style="background:#16140f;color:#e7696c;">) </span><span style="background:#16140f;color:#c0c0c0;">==</p>
<p>                                               </span><span style="background:#16140f;color:#7cedea;">FileAttributes</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#eddfc0;">Directory</span><span style="background:#16140f;color:#e7696c;">); }</p>
<p>                               </span><span style="background:#16140f;color:#e7696c;">}</p>
<p></span>Back to MSDN…..</p>
<p></span></p>
<h2><strong></strong></h2>
<h2><strong></strong></h2>
<h2><strong></strong></h2>
<h2><strong></strong></h2>
<h2><strong>Why Use Constraints</strong></h2>
<div id="ctl00_LibFrame_MainContent_cpe468231_c" class="MTPS_CollapsibleSection" style="display:block;overflow:visible;width:auto;height:auto;">
<div class="MTPS_CollapsibleSection" style="border-right:medium none;border-top:medium none;display:block;border-left:medium none;border-bottom:medium none;"><a name="sectionToggle0"></a></div>
<p>If you want to examine an item in a generic list to determine whether it is valid or to compare it to some other item, the compiler must have some guarantee that the operator or method it has to call will be supported by any type argument that might be specified by client code. This guarantee is obtained by applying one or more constraints to your generic class definition. For example, the base class constraint tells the compiler that only objects of this type or derived from this type will be used as type arguments. Once the compiler has this guarantee, it can allow methods of that type to be called in the generic class. Constraints are applied by using the contextual keyword <span class="keyword">where</span>. The following code example demonstrates the functionality we can add to the <span class="code">GenericList&lt;T&gt;</span> class (in <a id="ctl00_LibFrame_MainContent_ctl10" href="http://msdn.microsoft.com/en-us/library/0x6a29h6.aspx">Introduction to Generics (C# Programming Guide)</a>) by applying a base class constraint.</p>
<div>
<div id="ctl00_LibFrame_MainContent_ctl11_CSharp" class="libCScode">
<div class="CodeSnippetTitleBar">
<div class="CodeDisplayLanguage"> </div>
</div>
</div>
</div>
</div>
<p><span style="background:#100d0c;color:#8ac5ff;">public class </span><span style="background:#100d0c;color:#64b1ff;">Employee </span><span style="background:#100d0c;color:#ffffff;">{ </span><span style="background:#100d0c;color:#8ac5ff;">public </span><span style="background:#100d0c;color:#ffffff;">Employee(</span><span style="background:#100d0c;color:#8ac5ff;">string </span><span style="background:#100d0c;color:#ffffff;">s, </span><span style="background:#100d0c;color:#8ac5ff;">int </span><span style="background:#100d0c;color:#ffffff;">i) { Name </span><span style="background:#100d0c;color:#c0c0c0;">= </span><span style="background:#100d0c;color:#ffffff;">s; ID </span><span style="background:#100d0c;color:#c0c0c0;">= </span><span style="background:#100d0c;color:#ffffff;">i; } </span><span style="background:#100d0c;color:#8ac5ff;">public string </span><span style="background:#100d0c;color:#ffffff;">Name { </span><span style="background:#100d0c;color:#8ac5ff;">get</span><span style="background:#100d0c;color:#ffffff;">; </span><span style="background:#100d0c;color:#8ac5ff;">set</span><span style="background:#100d0c;color:#ffffff;">; } </span><span style="background:#100d0c;color:#8ac5ff;">public int </span><span style="background:#100d0c;color:#ffffff;">ID { </span><span style="background:#100d0c;color:#8ac5ff;">get</span><span style="background:#100d0c;color:#ffffff;">; </span><span style="background:#100d0c;color:#8ac5ff;">set</span><span style="background:#100d0c;color:#ffffff;">; } }</span><a href="http://11011.net/software/vspaste"></a></p>
<div></div>
<p><span style="background:#16140f;color:#e7696c;"><span style="background:#16140f;color:#22bdff;">     </span></p>
<div></div>
<p></span><span style="background:#16140f;color:#e7696c;"> </p>
<p></span><span style="background:#100d0c;color:#8ac5ff;">public class </span><span style="background:#100d0c;color:#64b1ff;">GenericList</span><span style="background:#100d0c;color:#c0c0c0;">&lt;</span><span style="background:#100d0c;color:#ffffff;">T</span><span style="background:#100d0c;color:#c0c0c0;">&gt; </span><span style="background:#100d0c;color:#8ac5ff;">where </span><span style="background:#100d0c;color:#ffffff;">T : </span><span style="background:#100d0c;color:#64b1ff;">Employee </span><span style="background:#100d0c;color:#ffffff;">{ </span><span style="background:#100d0c;color:#8ac5ff;">private </span><span style="background:#100d0c;color:#64b1ff;">Node </span><span style="background:#100d0c;color:#ffffff;">head; </span><span style="background:#100d0c;color:#8ac5ff;">public </span><span style="background:#100d0c;color:#ffffff;">GenericList() { head </span><span style="background:#100d0c;color:#c0c0c0;">= </span><span style="background:#100d0c;color:#8ac5ff;">null</span><span style="background:#100d0c;color:#ffffff;">; } </span><span style="background:#100d0c;color:#8ac5ff;">public void </span><span style="background:#100d0c;color:#ffffff;">AddHead(T t) { </span><span style="background:#100d0c;color:#8ac5ff;">var </span><span style="background:#100d0c;color:#ffffff;">n </span><span style="background:#100d0c;color:#c0c0c0;">= </span><span style="background:#100d0c;color:#8ac5ff;">new </span><span style="background:#100d0c;color:#64b1ff;">Node</span><span style="background:#100d0c;color:#ffffff;">(t) { Next </span><span style="background:#100d0c;color:#c0c0c0;">= </span><span style="background:#100d0c;color:#ffffff;">head }; head </span><span style="background:#100d0c;color:#c0c0c0;">= </span><span style="background:#100d0c;color:#ffffff;">n; } </span><span style="background:#100d0c;color:#8ac5ff;">private class </span><span style="background:#100d0c;color:#64b1ff;">Node </span><span style="background:#100d0c;color:#ffffff;">{ </span><span style="background:#100d0c;color:#8ac5ff;">public </span><span style="background:#100d0c;color:#ffffff;">Node(T t) { Next </span><span style="background:#100d0c;color:#c0c0c0;">= </span><span style="background:#100d0c;color:#8ac5ff;">null</span><span style="background:#100d0c;color:#ffffff;">; Data </span><span style="background:#100d0c;color:#c0c0c0;">= </span><span style="background:#100d0c;color:#ffffff;">t; } </span><span style="background:#100d0c;color:#8ac5ff;">public </span><span style="background:#100d0c;color:#64b1ff;">Node </span><span style="background:#100d0c;color:#ffffff;">Next { </span><span style="background:#100d0c;color:#8ac5ff;">get</span><span style="background:#100d0c;color:#ffffff;">; </span><span style="background:#100d0c;color:#8ac5ff;">set</span><span style="background:#100d0c;color:#ffffff;">; } </span><span style="background:#100d0c;color:#8ac5ff;">public </span><span style="background:#100d0c;color:#ffffff;">T Data { </span><span style="background:#100d0c;color:#8ac5ff;">get</span><span style="background:#100d0c;color:#ffffff;">; </span><span style="background:#100d0c;color:#8ac5ff;">set</span><span style="background:#100d0c;color:#ffffff;">; } } </span><a href="http://11011.net/software/vspaste"></a></p>
<p><span style="background:#100d0c;color:#8ac5ff;">blic </span><span style="background:#100d0c;color:#ff6fb7;">IEnumerator</span><span style="background:#100d0c;color:#c0c0c0;">&lt;</span><span style="background:#100d0c;color:#ffffff;">T</span><span style="background:#100d0c;color:#c0c0c0;">&gt; </span><span style="background:#100d0c;color:#ffffff;">GetEnumerator() </span><span style="background:#100d0c;color:#8ac5ff;">public </span><span style="background:#100d0c;color:#ffffff;">T FindFirstOccurrence(</span><span style="background:#100d0c;color:#8ac5ff;">string </span><span style="background:#100d0c;color:#ffffff;">s) { </span><span style="background:#100d0c;color:#8ac5ff;">var </span><span style="background:#100d0c;color:#ffffff;">current </span><span style="background:#100d0c;color:#c0c0c0;">= </span><span style="background:#100d0c;color:#ffffff;">head; T t </span><span style="background:#100d0c;color:#c0c0c0;">= </span><span style="background:#100d0c;color:#8ac5ff;">null</span><span style="background:#100d0c;color:#ffffff;">; </span><span style="background:#100d0c;color:#8ac5ff;">while </span><span style="background:#100d0c;color:#ffffff;">(current </span><span style="background:#100d0c;color:#c0c0c0;">!= </span><span style="background:#100d0c;color:#8ac5ff;">null</span><span style="background:#100d0c;color:#ffffff;">) </span><span style="background:#100d0c;color:#8ac5ff;">if </span><span style="background:#100d0c;color:#ffffff;">(current</span><span style="background:#100d0c;color:#c0c0c0;">.</span><span style="background:#100d0c;color:#ffffff;">Data</span><span style="background:#100d0c;color:#c0c0c0;">.</span><span style="background:#100d0c;color:#ffffff;">Name </span><span style="background:#100d0c;color:#c0c0c0;">== </span><span style="background:#100d0c;color:#ffffff;">s) { t </span><span style="background:#100d0c;color:#c0c0c0;">= </span><span style="background:#100d0c;color:#ffffff;">current</span><span style="background:#100d0c;color:#c0c0c0;">.</span><span style="background:#100d0c;color:#ffffff;">Data; </span><span style="background:#100d0c;color:#8ac5ff;">break</span><span style="background:#100d0c;color:#ffffff;">; } </span><span style="background:#100d0c;color:#8ac5ff;">else </span><span style="background:#100d0c;color:#ffffff;">current </span><span style="background:#100d0c;color:#c0c0c0;">= </span><span style="background:#100d0c;color:#ffffff;">current</span><span style="background:#100d0c;color:#c0c0c0;">.</span><span style="background:#100d0c;color:#ffffff;">Next; </span><span style="background:#100d0c;color:#8ac5ff;">return </span><span style="background:#100d0c;color:#ffffff;">t; } }</span><a href="http://11011.net/software/vspaste"></a></p>
</div>
</div>
<p>The constraint enables the generic class to use the <span class="code">Employee.Name</span> property</p>
<p>because all items of type T are guaranteed to be either an <span class="code">Employee</span> object or an object that inherits from <span class="code">Employee</span>.</p>
<p>Multiple constraints can be applied to the same type parameter, and the constraints themselves can be generic types, as follows:</p>
<div>
<div id="ctl00_LibFrame_MainContent_ctl12_CSharp" class="libCScode">
<div class="CodeSnippetTitleBar">
<div class="CodeDisplayLanguage"> </div>
</div>
</div>
</div>
</div>
<p><span style="background:#16140f;color:#22bdff;">class </span><span style="background:#16140f;color:#e7d97a;">EmployeeList</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#eddfc0;">T</span><span style="background:#16140f;color:#c0c0c0;">&gt; </span><span style="background:#16140f;color:#22bdff;">where </span><span style="background:#16140f;color:#eddfc0;">T </span><span style="background:#16140f;color:#e7696c;">: </span><span style="background:#16140f;color:#eddfc0;">Employee</span><span style="background:#16140f;color:#e7696c;">, </span><span style="background:#16140f;color:#eddfc0;">IEmployee</span><span style="background:#16140f;color:#e7696c;">, </span><span style="background:#16140f;color:#eddfc0;">System</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#dde074;">IComparable</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#eddfc0;">T</span><span style="background:#16140f;color:#c0c0c0;">&gt;</span><span style="background:#16140f;color:#e7696c;">, </span><span style="background:#16140f;color:#22bdff;">new</span><span style="background:#16140f;color:#e7696c;">() { </span><span style="background:#16140f;color:#7cfc00;">// &#8230; </span><span style="background:#16140f;color:#e7696c;">} </span><a href="http://11011.net/software/vspaste"></a></div>
</div>
</div>
</div>
<p>By constraining the type parameter, you increase the number of allowable operations and</p>
<p>method calls to those supported by the constraining type and all types in its inheritance hierarchy. Therefore, when you design generic classes or methods, if you will be performing any operation on the generic members beyond simple assignment or calling any methods not supported by <strong>System.Object</strong>, you will have to apply constraints to the type parameter.</p>
<p>When applying the <span class="code">where T : class</span> constraint, avoid the <span class="keyword">==</span> and <span class="keyword">!=</span> operators on the type parameter because these operators will test for reference identity only, not for value equality. This is the case even if these operators are overloaded in a type that is used as an argument. The following code illustrates this point; the output is false even though the <a id="ctl00_LibFrame_MainContent_ctl13" href="http://msdn.microsoft.com/en-us/library/system.string.aspx">String</a> class overloads the <span class="keyword">==</span> operator.</p>
<div>
<div id="ctl00_LibFrame_MainContent_ctl14_CSharp" class="libCScode">
<div class="CodeSnippetTitleBar">
<div class="CodeDisplayLanguage">
<div class="CopyCodeButton"><a class="copyCode" href="http://msdn.microsoft.com/"></a></div>
</div>
</div>
</div>
</div>
<p><span style="background:#16140f;color:#22bdff;">public static void </span><span style="background:#16140f;color:#eddfc0;">OpTest</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#eddfc0;">T</span><span style="background:#16140f;color:#c0c0c0;">&gt;</span><span style="background:#16140f;color:#e7696c;">(</span><span style="background:#16140f;color:#eddfc0;">T s</span><span style="background:#16140f;color:#e7696c;">, </span><span style="background:#16140f;color:#eddfc0;">T t</span><span style="background:#16140f;color:#e7696c;">) </span><span style="background:#16140f;color:#22bdff;">where </span><span style="background:#16140f;color:#eddfc0;">T </span><span style="background:#16140f;color:#e7696c;">: </span><span style="background:#16140f;color:#22bdff;">class </span><span style="background:#16140f;color:#e7696c;">{ </span></p>
<p><span style="background:#16140f;color:#eddfc0;">       System</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#e7d97a;">Console</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#eddfc0;">WriteLine</span><span style="background:#16140f;color:#e7696c;">(</span><span style="background:#16140f;color:#eddfc0;">s </span><span style="background:#16140f;color:#c0c0c0;">== </span><span style="background:#16140f;color:#eddfc0;">t</span><span style="background:#16140f;color:#e7696c;">); </span></p>
<p><span style="background:#16140f;color:#e7696c;">}</span></p>
<p><span style="background:#16140f;color:#e7696c;"> </span><span style="background:#16140f;color:#22bdff;">static void </span><span style="background:#16140f;color:#eddfc0;">Main</span><span style="background:#16140f;color:#e7696c;">() {</span></p>
<p><span style="background:#16140f;color:#e7696c;">           </span><span style="background:#16140f;color:#22bdff;">string </span><span style="background:#16140f;color:#eddfc0;">s1 </span><span style="background:#16140f;color:#c0c0c0;">= </span><span style="background:#16140f;color:#a6f0e6;">&#8220;foo&#8221;</span><span style="background:#16140f;color:#e7696c;">;</span></p>
<p><span style="background:#16140f;color:#e7696c;">            var</span><span style="background:#16140f;color:#e7d97a;"> </span><span style="background:#16140f;color:#eddfc0;">sb </span><span style="background:#16140f;color:#c0c0c0;">= </span><span style="background:#16140f;color:#22bdff;">new </span><span style="background:#16140f;color:#eddfc0;">System</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#eddfc0;">Text</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#e7d97a;">StringBuilder</span><span style="background:#16140f;color:#e7696c;">(</span><span style="background:#16140f;color:#a6f0e6;">&#8220;foo&#8221;</span><span style="background:#16140f;color:#e7696c;">); </span></p>
<p><span style="background:#16140f;color:#22bdff;">            string </span><span style="background:#16140f;color:#eddfc0;">s2 </span><span style="background:#16140f;color:#c0c0c0;">= </span><span style="background:#16140f;color:#eddfc0;">sb</span><span style="background:#16140f;color:#c0c0c0;">.</span><span style="background:#16140f;color:#eddfc0;">ToString</span><span style="background:#16140f;color:#e7696c;">(); </span></p>
<p><span style="background:#16140f;color:#eddfc0;">            OpTest</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#22bdff;">string</span><span style="background:#16140f;color:#c0c0c0;">&gt;</span><span style="background:#16140f;color:#e7696c;">(</span><span style="background:#16140f;color:#eddfc0;">s1</span><span style="background:#16140f;color:#e7696c;">, </span><span style="background:#16140f;color:#eddfc0;">s2</span><span style="background:#16140f;color:#e7696c;">); </span></p>
<p><span style="background:#16140f;color:#e7696c;">}</span><a href="http://11011.net/software/vspaste"></a></p>
<p>The reason for this behavior is that, at compile time, the compiler only knows that T is a reference type, and therefore must use the default operators that are valid for all reference types. If you must test for value equality, the recommended way is to also apply the <span class="code">where <strong><em>T : IComparable&lt;T&gt;</em></strong></span> constraint and implement that interface in any class that will be used to construct the generic class.</p>
<div id="ctl00_LibFrame_MainContent_cpe468232" class="MTPS_CollapsibleRegion">
<h2>Unbounded Type Parameters</h2>
<div id="ctl00_LibFrame_MainContent_cpe468232_c" class="MTPS_CollapsibleSection" style="display:block;overflow:visible;width:auto;height:auto;">
<div class="MTPS_CollapsibleSection" style="border-right:medium none;border-top:medium none;display:block;border-left:medium none;border-bottom:medium none;"><a name="sectionToggle1"></a></div>
<p>Type parameters that have no constraints, such as T in public class <span class="code">SampleClass&lt;T&gt;{}</span>, are called unbounded type parameters. Unbounded type parameters have the following rules:</p>
<ul>
<li>The <span class="keyword">!=</span> and <span class="keyword">==</span> operators cannot be used because there is no guarantee that the concrete type argument will support these operators.</li>
<li>They can be converted to and from <strong>System.Object</strong> or explicitly converted to any interface type.</li>
<li>You can compare to <a id="ctl00_LibFrame_MainContent_ctl18" href="http://msdn.microsoft.com/en-us/library/edakx9da.aspx">null</a>. If an unbounded parameter is compared to <span class="keyword">null</span>, the comparison will always return false if the type argument is a value type.</li>
</ul>
</div>
</div>
<div id="ctl00_LibFrame_MainContent_cpe468233" class="MTPS_CollapsibleRegion">
<h2>Naked Type Constraints</h2>
<div id="ctl00_LibFrame_MainContent_cpe468233_c" class="MTPS_CollapsibleSection" style="display:block;overflow:visible;width:auto;height:auto;">
<div class="MTPS_CollapsibleSection" style="border-right:medium none;border-top:medium none;display:block;border-left:medium none;border-bottom:medium none;"><a name="sectionToggle2"></a></div>
<p>When a generic type parameter is used as a constraint, it is called a naked type constraint. Naked type constraints are useful when a member function with its own type parameter has to constrain that parameter to the type parameter of the containing type, as shown in the following example:</p>
<div>
<div id="ctl00_LibFrame_MainContent_ctl23_CSharp" class="libCScode">
<div class="CodeSnippetTitleBar">
<div class="CodeDisplayLanguage">
<div class="CopyCodeButton"><a class="copyCode" href="http://msdn.microsoft.com/"></a></div>
</div>
</div>
</div>
</div>
<p><span style="background:#16140f;color:#22bdff;">class </span><span style="background:#16140f;color:#e7d97a;">List</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#eddfc0;">T</span><span style="background:#16140f;color:#c0c0c0;">&gt; </span><span style="background:#16140f;color:#e7696c;">{ </span><span style="background:#16140f;color:#22bdff;">void </span><span style="background:#16140f;color:#eddfc0;">Add</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#eddfc0;">U</span><span style="background:#16140f;color:#c0c0c0;">&gt;</span><span style="background:#16140f;color:#e7696c;">(</span><span style="background:#16140f;color:#e7d97a;">List</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#eddfc0;">U</span><span style="background:#16140f;color:#c0c0c0;">&gt; </span><span style="background:#16140f;color:#eddfc0;">items</span><span style="background:#16140f;color:#e7696c;">) </span><span style="background:#16140f;color:#22bdff;">where </span><span style="background:#16140f;color:#eddfc0;">U </span><span style="background:#16140f;color:#e7696c;">: </span><span style="background:#16140f;color:#eddfc0;">T </span><span style="background:#16140f;color:#e7696c;">{</span><span style="background:#16140f;color:#7cfc00;">/*&#8230;*/</span><span style="background:#16140f;color:#e7696c;">} }</span><a href="http://11011.net/software/vspaste"></a></div>
</div>
<p>In the previous example, <span class="code">T</span> is a naked type constraint in the context of the <strong>Add</strong> method, and an unbounded type parameter in the context of the <strong>List</strong> class.</p>
<p>Naked type constraints can also be used in generic class definitions. Note that the naked type constraint must also have been declared within the angle brackets together with any other type parameters:</p>
<div>
<div id="ctl00_LibFrame_MainContent_ctl24_CSharp" class="libCScode">
<div class="CodeSnippetTitleBar">
<div class="CodeDisplayLanguage"> </div>
</div>
</div>
</div>
<p><span style="background:#16140f;color:#7cfc00;">//naked type constraint </span></p>
<p><span style="background:#16140f;color:#22bdff;">public class </span><span style="background:#16140f;color:#e7d97a;">SampleClass</span><span style="background:#16140f;color:#c0c0c0;">&lt;</span><span style="background:#16140f;color:#eddfc0;">T</span><span style="background:#16140f;color:#e7696c;">, </span><span style="background:#16140f;color:#eddfc0;">U</span><span style="background:#16140f;color:#e7696c;">, </span><span style="background:#16140f;color:#eddfc0;">V</span><span style="background:#16140f;color:#c0c0c0;">&gt; </span><span style="background:#16140f;color:#22bdff;">where </span><span style="background:#16140f;color:#eddfc0;">T </span><span style="background:#16140f;color:#e7696c;">: </span><span style="background:#16140f;color:#eddfc0;">V </span><span style="background:#16140f;color:#e7696c;">{ } </span><a href="http://11011.net/software/vspaste"></a></p>
<p>The usefulness of naked type constraints with generic classes is very limited because the</p>
<p>compiler can assume nothing about a naked type constraint except that it derives from <strong>System.Object</strong>. Use naked type constraints on generic classes in scenarios in which you want to enforce an inheritance relationship between two type parameters.</p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:34b43783-74be-487f-823e-ab9d0ff9b750" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/C%23">C#</a>,<a rel="tag" href="http://technorati.com/tags/Generics">Generics</a>,<a rel="tag" href="http://technorati.com/tags/Linq">Linq</a>,<a rel="tag" href="http://technorati.com/tags/Core+Knowledge">Core Knowledge</a>,<a rel="tag" href="http://technorati.com/tags/Assumed+Knowledge">Assumed Knowledge</a>,<a rel="tag" href="http://technorati.com/tags/Basics">Basics</a>,<a rel="tag" href="http://technorati.com/tags/.NET+2.0">.NET 2.0</a>,<a rel="tag" href="http://technorati.com/tags/Linq+to+Objects">Linq to Objects</a></div>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:037c91cd-c331-49b2-8a03-22b501814b3b" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/C%23">C#</a>,<a rel="tag" href="http://del.icio.us/popular/Generics">Generics</a>,<a rel="tag" href="http://del.icio.us/popular/Linq">Linq</a>,<a rel="tag" href="http://del.icio.us/popular/Core+Knowledge">Core Knowledge</a>,<a rel="tag" href="http://del.icio.us/popular/Assumed+Knowledge">Assumed Knowledge</a>,<a rel="tag" href="http://del.icio.us/popular/Basics">Basics</a>,<a rel="tag" href="http://del.icio.us/popular/.NET+2.0">.NET 2.0</a>,<a rel="tag" href="http://del.icio.us/popular/Linq+to+Objects">Linq to Objects</a></div>
<p>Burak Emir1, Andrew Kennedy2, Claudio Russo2, and Dachuan Yu3</p>
<p>1 EPFL, Lausanne, Switzerland</p>
<p>2 Microsoft Research, Cambridge, U.K.</p>
<p>3 DoCoMo Communications Laboratories USA, San Jose, California</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/365/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/365/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/365/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/365/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/365/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=365&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/06/27/master-generic-type-constrains-a-critical-success-factor-in-linq-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>
	</item>
		<item>
		<title>Advanced C# 3.0: Part 3 &#8211; New Language Features as &#8216;Domain Specific&#8217; as well as General Purpose Extensions</title>
		<link>http://team.pushbomb.com/2008/05/27/advanced-c-30-part-3-new-language-features-as-domain-specific-as-well-as-general-purpose-extensions/</link>
		<comments>http://team.pushbomb.com/2008/05/27/advanced-c-30-part-3-new-language-features-as-domain-specific-as-well-as-general-purpose-extensions/#comments</comments>
		<pubDate>Tue, 27 May 2008 22:42:46 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[C# 3.0 for Internal DSL]]></category>
		<category><![CDATA[Framework Design]]></category>
		<category><![CDATA[Proof Driven Development]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[agile practices]]></category>
		<category><![CDATA[reflection]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[GAT]]></category>
		<category><![CDATA[Resharper]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/05/27/advanced-c-30-part-3-new-language-features-as-domain-specific-as-well-as-general-purpose-extensions/</guid>
		<description><![CDATA[One of the compelling directions beyond 'the basics' of domain-driven development is the advent and increasing use of 'DSL' (Domain Specific Language) technology in .NET. We have had a rich set of features since the 2005 release of Visual Studio in the Guidance Automation Toolkit and the DSL Toolkit and these have become even more compelling. However for some needs, the language now may provide enough for many smaller cases.

Now that new .NET 3.5 C# 3.0 features are allowing us to make the Framework API of .NET work in ways not present 'out of the box' the scope of what is possible can be deep and broad.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=238&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>One of the compelling directions beyond &#8216;the basics&#8217; of domain-driven development is the advent and increasing use of &#8216;DSL&#8217; (Domain Specific Language) technology in .NET. We have had a rich set of features since the 2005 release of Visual Studio in the <a href="http://msdn.microsoft.com/en-us/vsx/default.aspx">Guidance Automation Toolkit</a> and the <a href="http://msdn.microsoft.com/en-us/library/bb126235.aspx">DSL Toolkit</a> and these have become even more compelling. I wrote about this back in January, 2006 <a href="http://www.developerland.com/DotNet/Design/444.aspx">as published here</a>. However for some needs, the language now may provide enough for many smaller cases.</p>
<blockquote><p align="center">Keep in mind, this post is not focused on DSL topics (one any developer cannot really afford to miss now), so one could debate the merits of the link I make. My argument is this:</p>
<p align="center">My definition of a DSL is very simply :</p>
</blockquote>
<p>A Domain Specific Language is a way, typically using a combination of visual and textual methods, or just textual, to solve a limited but typically non-trivial set of problems. It is typically a smaller stand-alone &#8216;language&#8217; or language-extension to a larger more horizontal language such as C# (the point I make here is C# has evolved to allow you to expand C# with DSLs you write in C#. This is very different the the DSL Toolkit and I have never had this opinion until I finally got to be immersed deeply in functional style programming enhancements to C# and the ease of extending just about any API with extensions..</p>
<p><a href="http://damon.agilefactor.com/domain-specific-languages-central-to-staying-relevant/">I continue the discussion of what a DSL is here.</a> I will be adding to this section of the site over time but if you just want the listed info, no need to go on a tangent now.</p>
<blockquote><p><strong>Now that new .NET 3.5 C# 3.0 features are allowing us to make the Framework API of .NET work in ways not present &#8216;out of the box&#8217; the scope of what is possible can be deep and broad.</strong></p>
</blockquote>
<h2>Part 1 : The DSL Perspective &#8211; A Real Example</h2>
<p>I&#8217;ll use a project we are working on now, which is quite specifically aimed to</p>
<ul>
<li>Minimize the configuration overhead of using an Inversion of Control container </li>
<li>Provide the benefit of &#8216;provider/container&#8217; independence </li>
<li>Allow the consumer to change &#8216;container provider&#8217; vendors with a simple change in &#8216;meta configuration&#8217; </li>
</ul>
<p>In other words, we are trying to create an abstraction on top of an abstraction, as we believe this particular area is now mature enough (and indeed this is how software engineering historically more then not progresses over time) to do so.</p>
<p>This project has no intention of BEING an inversion of control container nor a dependency injector, rather its aim is to allow people to make use of these critical concepts in much easier ways while eliminating hesitation related to provider lock-in.</p>
<p>It&#8217;s no secret we are massive fans of the work of the <a href="http://www.castleproject.org/">Castle Project</a> and they are indeed the first &#8216;plug-in&#8217; adapter we are on schedule to deliver. However the architecture (something this post is NOT trying to explain) of our solution models the DOMAIN of this area, and is not specific to any particular offering (although to be blunt I would say if any bias existed it would be from the conceptual framework that exists now in the <a href="http://www.castleproject.org/container/index.html">Windsor Container/MicroKernal trunk</a>).</p>
<h4>A domain specific example</h4>
<p>In the area of ASP.NET one technique for loading our solution into memory is via the IHttpModule implementation we provide. Here is what the custom global.asax.cs code looks like:</p>
<p><span style="background:black 0 50%;color:#9bdd22;">public abstract class </span><span style="background:black 0 50%;color:#8bcfe2;">IntegrationPoint </span><span style="background:black 0 50%;color:#feba1b;">: </span><span style="background:black 0 50%;color:#8bcfe2;">HttpApplication</span><span style="background:black 0 50%;color:#feba1b;">, </span><span style="background:black 0 50%;color:#2b91af;">IDomainApplication </span><span style="background:black 0 50%;color:#feba1b;">{ </span></p>
<p><span style="background:black 0 50%;color:#9bdd22;">private static </span><span style="background:black 0 50%;color:#2b91af;">IZeroConfigDI </span><span style="background:black 0 50%;color:#feba1b;">_container; </span></p>
<p><span style="background:black 0 50%;color:#808080;">/// &lt;summary&gt;      <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">Executes custom initialization code after      <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">all event handler      <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">modules have been added.      <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">Also acquire a reference to the HttpModule      <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">for IoC / DI if present as a module      <br /></span><span style="background:black 0 50%;color:#808080;">/// &lt;/summary&gt;      <br />&#160;</span><span style="background:black 0 50%;color:#9bdd22;">public override void </span><span style="background:black 0 50%;color:#feba1b;">Init() {<span style="background:black 0 50%;color:#feba1b;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></p>
<div><span style="background:black 0 50%;color:#feba1b;"><span style="background:black 0 50%;color:#feba1b;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; _container = Modules.GetIoCModule(); </span></span></div>
<div><span style="background:black 0 50%;color:#feba1b;"><span style="background:black 0 50%;color:#feba1b;">&#160;&#160;&#160;&#160;&#160; </span></span><span style="background:black 0 50%;color:#9bdd22;">&#160;&#160;&#160; base</span><span style="background:black 0 50%;color:#feba1b;">.Init();</span></div>
<div><span style="background:black 0 50%;color:#feba1b;"></span></div>
<div><span style="background:black 0 50%;color:#feba1b;"><span style="background:black 0 50%;color:#feba1b;">} </span></span>
</p></div>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>The interesting areas which are not provided by Microsoft include:</p>
<ol>
<li>IDomainApplication interface </li>
<li>IZeriConfigDI Interface static reference </li>
<li>Modules.GetIoCModule() </li>
</ol>
<p>The first two have more to do with our solution then the topic of this post, so I&#8217;ll focus on #3.</p>
<p>As this code is inside the HttpApplication, we have access to the Modules property which is read-only. Here is the documentation:</p>
<p>&#160;</p>
<table cellspacing="10" cellpadding="10" width="648" border="1">
<tbody>
<tr>
<td valign="top" width="626">
<h2>System.Web.HttpModuleCollection Modules { get; }</h2>
<p> 
<p align="center"><font color="#ffffff"><span style="color:#6682ee;"><font color="#ffffff"><strong></strong>                  <br /></font></span></font></p>
<p align="left"><span style="color:#6682ee;"><font color="#ffffff"><font color="#ffffff"><span style="color:#6682ee;"><font color="#ffffff"><em>Member of System.Web.HttpApplication</em></font></span></font><span style="color:#6682ee;"><font color="#ffffff"> </font></span></font></span></p>
<p align="left"><span style="color:#6682ee;"><font color="#ffffff"><span style="color:#6682ee;"><font color="#ffffff">                   <br />Gets the collection of modules for the current application.</font></span><span style="color:#6682ee;"><font color="#ffffff">Returns:                    <br />An System.Web.HttpModuleCollection that contains the names of the modules for the application.                     <br /></font></span></font></span></p>
</td>
</tr>
</tbody>
</table>
<p><span style="color:#000000;"><a href="http://11011.net/software/vspaste"></a></span></p>
<p>Your first reaction if your familiar with this collection is that it does not have anything even close to the GetIoCModule() method we are calling above.</p>
<p>Indeed this is our &#8216;domain specific&#8217; extension to the .NET Framework API (one of many for this solution).</p>
<p>Here is the implementation of this &#8216;DSL&#8217; extension:</p>
<p><font color="#484848"><span style="background:black 0 50%;color:#808080;">/// &lt;summary&gt;        <br /></span><span style="background:black 0 50%;color:#808080;">/// </span></font><font color="#484848"><span style="background:black 0 50%;color:#008000;">Provides ‘DSL specific’ extensions to the ASP.NET environment for        <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">the IoC Zero Config environment which is not new (after all this becomes a static)</span></font><span style="background:black 0 50%;color:#008000;"><font color="#484848">        <br /></font></span><font color="#484848"><span style="background:black 0 50%;color:#808080;">/// &lt;/summary&gt;        <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">The entire point for extension methods is ‘Fluency in API’ as it allows ‘shorthand’ code</span></font></p>
<p><font color="#484848"><span style="background:black 0 50%;color:#9bdd22;">public static class </span><span style="background:black 0 50%;color:#8bcfe2;">ZeroConfigInstanceResolver </span><span style="background:black 0 50%;color:#feba1b;">{ </span></font></p>
<p><font color="#484848"><span style="background:black 0 50%;color:#9bdd22;">private const string </span><span style="background:black 0 50%;color:#feba1b;">ZeroConfigTypeString = </span><span style="background:black 0 50%;color:#a31515;">&quot;IoCConfigModule.IHttpModel&quot;</span><span style="background:black 0 50%;color:#feba1b;">;</span></font></p>
<p><span style="background:black 0 50%;color:#feba1b;"></span><span style="background:black 0 50%;color:#feba1b;"><font color="#484848">&#160;</font></span><font color="#484848"><span style="background:black 0 50%;color:#808080;">/// &lt;summary&gt;        <br /></span><span style="background:black 0 50%;color:#808080;">/// </span></font><font color="#484848"><span style="background:black 0 50%;color:#008000;">Gets the IZeroConfigDI reference        <br /></span><span style="background:black 0 50%;color:#808080;">/// </span></font><font color="#484848"><span style="background:black 0 50%;color:#008000;">(using domain specific logic and the&#160; <br /></span><span style="background:black 0 50%;color:#808080;">/// </span></font><span style="background:black 0 50%;color:#008000;"><font color="#484848">generic logic extending the container)        <br /></font></span><font color="#484848"><span style="background:black 0 50%;color:#808080;">/// &lt;/summary&gt;        <br /></span><span style="background:black 0 50%;color:#808080;">/// &lt;param name=&quot;container&quot;&gt;</span><span style="background:black 0 50%;color:#008000;">The container.</span></font><font color="#484848"><span style="background:black 0 50%;color:#808080;">&lt;/param&gt;        <br /></span><span style="background:black 0 50%;color:#808080;">/// &lt;returns&gt;&lt;/returns&gt; </span></font></p>
<p><font color="#484848"><span style="background:black 0 50%;color:#9bdd22;">public static </span><span style="background:black 0 50%;color:#2b91af;">IZeroConfigDI </span><span style="background:black 0 50%;color:#feba1b;">GetIoCModule(</span><span style="background:black 0 50%;color:#9bdd22;">this </span><span style="background:black 0 50%;color:#8bcfe2;">HttpModuleCollection </span><span style="background:black 0 50%;color:#feba1b;">container) {</span></font></p>
<p><span style="background:black 0 50%;color:#feba1b;"><font color="#484848">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></span><span style="background:black 0 50%;color:#9bdd22;"><font color="#484848">return        <br /></font></span><font color="#484848"><span style="background:black 0 50%;color:#feba1b;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; container.FindInstance(        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; () =&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; container.Get(ZeroConfigTypeString)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="background:black 0 50%;color:#feba1b;">&#160;</span><span style="background:black 0 50%;color:#9bdd22;">as </span><span style="background:black 0 50%;color:#2b91af;">IZeroConfigDI</span><span style="background:black 0 50%;color:#feba1b;">); </span></font></p>
<p><span style="background:black 0 50%;color:#feba1b;"><font color="#484848">}</font></span></p>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>As you can see above we are very specific in our intent to add this to the HttpModuleCollection. There is nothing that interesting above except for the method call FindInstance(Func&lt;TResult&gt;) off the target &#8216;container&#8217;. This is a peek into the non-DSL related extension that represents. You might be aware that there is no such FindInstance available off the HttpModuleCollection.</p>
<p>One of our many goals in creating a fluent, easily used API is reducing complexity and providing very maintainable code. Here you can see the Lambada expression required to locate our service is hidden from the developer completely, yet this code is not a &#8216;one-off&#8217; as we have provided both a DSL level extension in concert with a far more generic extension.</p>
<h2>Part 2: Extending the Horizontal to Empower the Domain Specific</h2>
<p>In looking at the HttpModuleCollection, and in our desire to facilitate other sources of resolving our module, it inherits from the abstract parent NameObjectCollectionBase.</p>
<p>Here is the definition of what inherits from this abstract parent:</p>
<table cellspacing="0" cellpadding="2" width="400" border="1">
<tbody>
<tr>
<td valign="top" width="400"> <br />
<h2>public abstract class NameObjectCollectionBase </h2>
<p>Member of System.Collections.SpecializedSummary:           </p>
<p><em>Provides the abstract base class for a collection of associated System.String keys and System.Object values that can be accessed either with the key or with the index.</em></td>
</tr>
</tbody>
</table>
<p><a href="http://dcarr.files.wordpress.com/2008/05/found.jpg"></a></p>
<p>The issue arises as this abstract base leaves it up to its concrete implementer to provide the indexer (or say Get() method) to access the object desired. Therefore a nice way to enhance this abstract type to work across all of the children is to literally pass in the method to resolve the object desired.</p>
<h2>Part 3 : The Generic Extension</h2>
<p>Here is the trivial extension method used to &#8216;open up&#8217; the NameObjectCollectionBase and which is used above:</p>
<p><span style="background:black 0 50%;color:#808080;">/// &lt;summary&gt;      <br />/// </span><span style="background:black 0 50%;color:#008000;">Finds the instance in the NameObjectCollectionBase      <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">using the Functor      <br /></span><span style="background:black 0 50%;color:#808080;">/// &lt;/summary&gt;      <br />/// &lt;typeparam name=&quot;TContainer&quot;&gt;</span><span style="background:black 0 50%;color:#008000;">The type of the container.</span><span style="background:black 0 50%;color:#808080;">&lt;/typeparam&gt;      <br />/// &lt;typeparam name=&quot;TResult&quot;&gt;</span><span style="background:black 0 50%;color:#008000;">The type of the result.</span><span style="background:black 0 50%;color:#808080;">&lt;/typeparam&gt;      <br />/// &lt;param name=&quot;container&quot;&gt;</span><span style="background:black 0 50%;color:#008000;">The container.</span><span style="background:black 0 50%;color:#808080;">&lt;/param&gt;      <br />/// &lt;param name=&quot;finder&quot;&gt;</span><span style="background:black 0 50%;color:#008000;">The finder.</span><span style="background:black 0 50%;color:#808080;">&lt;/param&gt;      <br />/// &lt;returns&gt;&lt;/returns&gt;       <br /></span><span style="background:black 0 50%;color:#9bdd22;">public static </span><span style="background:black 0 50%;color:#feba1b;">TResult FindInstance&lt;TContainer, TResult&gt;      <br />&#160;&#160;&#160;&#160;&#160;&#160; (</span><span style="background:black 0 50%;color:#9bdd22;">this </span><span style="background:black 0 50%;color:#feba1b;">TContainer container, </span><span style="background:black 0 50%;color:#2b91af;">Func</span><span style="background:black 0 50%;color:#feba1b;">&lt;TResult&gt; finder)      <br /></span><span style="background:black 0 50%;color:#9bdd22;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; where </span><span style="background:black 0 50%;color:#feba1b;">TContainer : </span><span style="background:black 0 50%;color:#8bcfe2;">NameObjectCollectionBase </span><span style="background:black 0 50%;color:#9bdd22;">where </span><span style="background:black 0 50%;color:#feba1b;">TResult : </span><span style="background:black 0 50%;color:#9bdd22;">class </span><span style="background:black 0 50%;color:#feba1b;">{ </span></p>
<p><span style="background:black 0 50%;color:#feba1b;">     <br /></span><span style="background:black 0 50%;color:#9bdd22;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return </span><span style="background:black 0 50%;color:#feba1b;">finder();      </p>
<p>} </span></p>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Since we cannot abstract up the get method, we take a page from Functional Programming and literally pass in the code to execute (which we do above).</p>
<p>A common pattern is to expose methods like the above, but add additional versions that allow more parameters into the Func&lt;TResult&gt;. This is well covered well by many of the Linq references and books available.</p>
<h2>Part 4: How this allows us to embrace deep/wide change</h2>
<p>A simplistic example is supporting the acquisitions of our target reference (IZeroConfigDI) if it is set as ApplicationState or as an IHttpModule. We could make the design decision to allow our find method to reside literally as an extension method of our HttpApplication (and indeed this turns out to be a reasonable choice as the valid inheritors from NameObjectCollectionBase are sealed and therefore invalid as generic constraints). Here is one approach (not ideal and not our final code but this illustrates the point.) Why not offer your optimized solution?</p>
<p>CODE:</p>
<p><span style="background:black 0 50%;color:#9bdd22;">public abstract class </span><span style="background:black 0 50%;color:#8bcfe2;">IntegrationPoint </span><span style="background:black 0 50%;color:#feba1b;">: </span><span style="background:black 0 50%;color:#8bcfe2;">HttpApplication</span><span style="background:black 0 50%;color:#feba1b;">, </span><span style="background:black 0 50%;color:#2b91af;">IDomainApplication </span><span style="background:black 0 50%;color:#feba1b;">{</span> </p>
</p>
<p> <span style="background:black 0 50%;color:#9bdd22;">private static </span><span style="background:black 0 50%;color:#2b91af;">IZeroConfigDI </span><span style="background:black 0 50%;color:#feba1b;">_container;</span>
</p>
<p> <span style="background:black 0 50%;color:#808080;">/// &lt;summary&gt;    <br />/// </span><span style="background:black 0 50%;color:#008000;">Executes custom initialization code after    <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">all event handler    <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">modules have been added.    <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">Also acquire a reference to the HttpModule    <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">or Application State    <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">for IoC / DI if present    <br /></span><span style="background:black 0 50%;color:#808080;">/// &lt;/summary&gt;    <br /></span><span style="background:black 0 50%;color:#9bdd22;">public override void </span><span style="background:black 0 50%;color:#feba1b;">Init() { </span>
</p>
<p><span style="background:black 0 50%;color:#feba1b;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; _container = </span><span style="background:black 0 50%;color:#9bdd22;">this</span><span style="background:black 0 50%;color:#feba1b;">.GetIoCModule(); </span><span style="background:black 0 50%;color:#9bdd22;">base</span><span style="background:black 0 50%;color:#feba1b;">.Init(); </span></p>
<p><span style="background:black 0 50%;color:#feba1b;">}</span></p>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>And the extension on HttpApplication:</p>
<p><span style="background:black 0 50%;color:#9bdd22;">public static class </span><span style="background:black 0 50%;color:#8bcfe2;">ZeroConfigInstanceResolver </span><span style="background:black 0 50%;color:#feba1b;">{</span> </p>
</p>
<p> <span style="background:black 0 50%;color:#9bdd22;">private const string </span><span style="background:black 0 50%;color:#feba1b;">ZeroConfigTypeString = </span><span style="background:black 0 50%;color:#a31515;">&quot;IoCConfigModule.IHttpModel&quot;</span><span style="background:black 0 50%;color:#feba1b;">;</span>
</p>
<p> <span style="background:black 0 50%;color:#808080;">/// &lt;summary&gt;    <br />/// </span><span style="background:black 0 50%;color:#008000;">Gets the IZeroConfigDI reference if possible (null if not found)    <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">using domain specific logic and the    <br /></span><span style="background:black 0 50%;color:#808080;">/// </span><span style="background:black 0 50%;color:#008000;">generic logic extending the container.    <br /></span><span style="background:black 0 50%;color:#808080;">/// &lt;/summary&gt;    <br />/// &lt;param name=&quot;container&quot;&gt;</span><span style="background:black 0 50%;color:#008000;">The container.</span><span style="background:black 0 50%;color:#808080;">&lt;/param&gt;    <br />/// &lt;returns&gt;&lt;/returns&gt;     <br /></span><span style="background:black 0 50%;color:#9bdd22;">public static </span><span style="background:black 0 50%;color:#2b91af;">IZeroConfigDI </span><span style="background:black 0 50%;color:#feba1b;">GetIoCModule(</span><span style="background:black 0 50%;color:#9bdd22;">this </span><span style="background:black 0 50%;color:#8bcfe2;">HttpApplication </span><span style="background:black 0 50%;color:#feba1b;">container) {</span>
</p>
<p><span style="background:black 0 50%;color:#9bdd22;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var </span><span style="background:black 0 50%;color:#feba1b;">modules = container.Modules;      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="background:black 0 50%;color:#9bdd22;">var </span><span style="background:black 0 50%;color:#feba1b;">applicationState = container.Application;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></p>
<p><span style="background:black 0 50%;color:#feba1b;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="background:black 0 50%;color:#9bdd22;">var </span><span style="background:black 0 50%;color:#feba1b;">resultVar = modules.ToInstance(      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; () =&gt; modules.Get(ZeroConfigTypeString)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; )       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="background:black 0 50%;color:#feba1b;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ??&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; applicationState.ToInstance(       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; () =&gt; </span><span style="background:black 0 50%;color:#feba1b;">applicationState.Get(ZeroConfigTypeString)      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; );</span> </p>
</p>
<p> <span style="background:black 0 50%;color:#9bdd22;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return </span><span style="background:black 0 50%;color:#feba1b;">resultVar </span><span style="background:black 0 50%;color:#9bdd22;">as </span><span style="background:black 0 50%;color:#2b91af;">IZeroConfigDI</span><span style="background:black 0 50%;color:#feba1b;">;    </p>
<p>}</span>
</p>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>No change is required on the extension to the FindInstance extension.</p>
<p>Can you see how the above can be improved?</p>
<p>We expand this to make the ‘rule for finding the <span style="background:black 0 50%;color:#2b91af;">IZeroConfigDI</span> external. To be specific, above we have a business rule implemented that we typically would not want ‘hard coded’. In fact more then not all things considered we want this. So we do the4 following:</p>
<ul>
<li>Determine the Delegate signature for the business rule.      </li>
<li>For the above, we need as input (at a minimum) an <span style="background:black 0 50%;color:#8bcfe2;">HttpApplication </span>instance as that is the container for the models and state, and those two items lack a shared interface or base (or we could use that).       </li>
<li>The signature returns (in all cases) an instance cast where it implement <span style="background:black 0 50%;color:#2b91af;">IZeroConfigDI </span>to resolve this business rule.       </li>
<li>Therefore the business rule signature is <strong>Func&lt;<span style="background:black 0 50%;color:#8bcfe2;">HttpApplication </span>,<span style="background:black 0 50%;color:#2b91af;">IZeroConfigDI</span>&gt;</strong>       </li>
</ul>
<p><strong></strong></p>
<table cellspacing="0" cellpadding="2" width="355" border="1">
<tbody>
<tr>
<td valign="top" width="353">
<p><strong></strong></p>
<p>         <strong>
<p>&#160;</p>
<p>         </strong>
<ul>
<li>
<h3>It’s an essential skill to not only master generics at the deepest level, but to master all the intrinsic delegate types (Predicate, Func, Action, etc.) to be proficient in the state of the technology of Linq today </h3>
<p></li>
<li>
<h3>We wish it was easier to ‘extend’ Delegates by inheritance or to not be tasked with coding to each variant of a delegates possible type parameters, but this is different the Object Oriented in it’s domain. </h3>
<p></li>
<li>
<h3>We also wish the generic constraint language would be fundamentally focused on, extended and evolved to allow the full richness in constraint semantics as we have with Linq Expressions. </h3>
<p></li>
</ul>
</td>
</tr>
</tbody>
</table>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/238/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/238/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/238/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=238&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/05/27/advanced-c-30-part-3-new-language-features-as-domain-specific-as-well-as-general-purpose-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>
	</item>
		<item>
		<title>Advanced C# 3.0 : Part 2 &#8211; Everyday Tasks with New Solutions</title>
		<link>http://team.pushbomb.com/2008/05/22/advanced-c-30-part-2-everyday-tasks-with-new-solutions/</link>
		<comments>http://team.pushbomb.com/2008/05/22/advanced-c-30-part-2-everyday-tasks-with-new-solutions/#comments</comments>
		<pubDate>Thu, 22 May 2008 19:31:10 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[C# 3.0 for Internal DSL]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[agile practices]]></category>
		<category><![CDATA[reflection]]></category>
		<category><![CDATA[Advanced C#]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Delegates]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[Lambada]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/05/22/advanced-c-30-part-2-everyday-tasks-with-new-solutions/</guid>
		<description><![CDATA[In this post I'll be digging deeper into doing things I've always wanted to have in .NET yet didn't. For example, I know I am not alone in wanting an IList (be it an IList or a simple non-generic IList) to provide me a .foreach method as you get in a List). This is just one of many things we address here (and more).<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=232&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<h3>Part 2 : Digging Deeper into Lambadas, Extension Methods, and Linq</h3>
<p>The world’s most common extension method and an attempt at a definitive version.</p>
<p>In this post I&#8217;ll be digging deeper into doing things I&#8217;ve always wanted to have in .NET yet didn&#8217;t. For example, I know I am not alone in wanting an IList (be it an IList&lt;T&gt; or a simple non-generic IList) to provide me a .foreach method as you get in a List&lt;T&gt;). This is just one of many things we address here (and more).</p>
<h1>From the concrete to the abstract</h1>
<p>I was having problems with entries in my path environmental variable, and I wanted an easy way to flag bad entries and also allow me to move the entries in the list up or down easily. This was made apparent by my use of a tool called &#8216;Dependency Walker&#8217;. It&#8217;s hard to live without but that&#8217;s another post. See the screen shot below:</p>
<p><a href="http://dcarr.files.wordpress.com/2008/05/image-0001.png"><img style="border-width:0;" alt="Image-0001" src="http://dcarr.files.wordpress.com/2008/05/image-0001-thumb.png?w=458&#038;h=316" width="458" height="316" /></a></p>
<p><a href="http://www.dependencywalker.com/">Click here to go to &#8216;Dependency Walker&#8217;</a></p>
<h1>Test to Code</h1>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>&#160;</p>
<pre class="code"><span style="background:#100d0c;color:#e1b04a;"><font size="1">    </font></span><span style="background:#100d0c;color:#a0a0a0;"><font size="1">/// &lt;summary&gt;
    /// </font></span><span style="background:#100d0c;color:#80ff00;"><font size="1">Unit Test to Validate that the logic related to     /// 'show combined extensions using paths' is functioning
    </font></span><span style="background:#100d0c;color:#a0a0a0;"><font size="1">/// &lt;/summary&gt;
    /// </font></span><font size="1"><span style="background:#100d0c;color:#80ff00;">Documentation Created 5/22/2008
    </span><span style="background:#100d0c;color:#e1b04a;">[</span><span style="background:#100d0c;color:#64b1ff;">Test</span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">]
    </span><span style="background:#100d0c;color:#8ac5ff;">public void </span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">shouldShowCombinedExtensionsUsingPaths()
    {
        </span><span style="background:#100d0c;color:#8ac5ff;">var </span><span style="background:#100d0c;color:#e1b04a;">_directoriesInPath </span><span style="background:#100d0c;color:silver;">= </span><span style="background:#100d0c;color:#d6adad;">EnvironmentVariableTarget</span></font><font size="1"><span style="background:#100d0c;color:silver;">.             </span><span style="background:#100d0c;color:#e1b04a;">Process</span><span style="background:#100d0c;color:silver;">.</span><span style="background:#100d0c;color:#e1b04a;">GetParsedValues(</span><span style="background:#100d0c;color:#ff8040;">&quot;PATH&quot;</span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">);

        </span><span style="background:#100d0c;color:#64b1ff;">Assert</span><span style="background:#100d0c;color:silver;">.</span><span style="background:#100d0c;color:#e1b04a;">That(_directoriesInPath, </span><span style="background:#100d0c;color:#64b1ff;">Is</span></font><font size="1"><span style="background:#100d0c;color:silver;">.                </span><span style="background:#100d0c;color:#e1b04a;">TypeOf(</span><span style="background:#100d0c;color:#8ac5ff;">typeof</span><span style="background:#100d0c;color:#e1b04a;">(</span><span style="background:#100d0c;color:#64b1ff;">String</span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">[])));
        </span><span style="background:#100d0c;color:#64b1ff;">Assert</span><span style="background:#100d0c;color:silver;">.</span><span style="background:#100d0c;color:#e1b04a;">IsTrue(</span><span style="background:#100d0c;color:silver;">!</span><span style="background:#100d0c;color:#e1b04a;">_directoriesInPath</span><span style="background:#100d0c;color:silver;">.</span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">IsNullOrEmpty());

        _directoriesInPath</span><span style="background:#100d0c;color:silver;">.</span></font><span style="background:#100d0c;color:#e1b04a;"><font size="1">ForEach(
            x </font></span><span style="background:#100d0c;color:silver;"><font size="1">=&gt;
            </font></span><font size="1"><span style="background:#100d0c;color:#e1b04a;">{
                </span><span style="background:#100d0c;color:#8ac5ff;">if </span><span style="background:#100d0c;color:#e1b04a;">(</span><span style="background:#100d0c;color:silver;">!</span><span style="background:#100d0c;color:#64b1ff;">Directory</span><span style="background:#100d0c;color:silver;">.</span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">Exists(x))
                    </span><span style="background:#100d0c;color:#64b1ff;">Console</span><span style="background:#100d0c;color:silver;">.</span><span style="background:#100d0c;color:#e1b04a;">WriteLine(</span><span style="background:#100d0c;color:#ff8040;">&quot;MIssing Directory! &quot; </span><span style="background:#100d0c;color:silver;">+ </span></font><span style="background:#100d0c;color:#e1b04a;"><font size="1">x);
            });
    }</font></span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Above is the test (that also works). Before I launch into why this is interesting, what looks different?</p>
<p>1) EnvironmentVariableTarget : This is Microsoft&#8217;s type not mine. It&#8217;s the enum used to specify the target search on the environmentals.</p>
<p>2) _directoriesInPath : This is a string[] as you can see from the Assertion. But how does it support ForEach?</p>
<p>3) GetParsedValues() : What is that exactly?</p>
<blockquote>
<p>*** As this is so common I decided to try to craft a definitive version of ForEach that would work across non-generic collections, generic collection, and specific type specification on the targeted items in the collection for generics .&#160; ***</p>
</blockquote>
<p>In order to enable ForEach behavior I needed to this code which is by far the most common extension method in all the C# 3.0 code alive today.</p>
<p>&#160;</p>
<pre class="code">
<span style="background:#100d0c;color:#e1b04a;"><font size="1">    </font></span><span style="background:#100d0c;color:#a0a0a0;"><font size="1">/// &lt;summary&gt;
    /// </font></span><span style="background:#100d0c;color:#80ff00;"><font size="1">Requires generic IEnumerable and is most common now
    </font></span><font size="1"><span style="background:#100d0c;color:#a0a0a0;">/// &lt;/summary&gt;
    /// &lt;typeparam name=</span><span style="background:#100d0c;color:#919191;">&quot;TContainedType&quot;</span><span style="background:#100d0c;color:#a0a0a0;">&gt;</span><span style="background:#100d0c;color:#80ff00;">The type of the contained type.</span></font><font size="1"><span style="background:#100d0c;color:#a0a0a0;">&lt;/typeparam&gt;
    /// &lt;param name=</span><span style="background:#100d0c;color:#919191;">&quot;baseEnum&quot;</span><span style="background:#100d0c;color:#a0a0a0;">&gt;</span><span style="background:#100d0c;color:#80ff00;">The base enum.</span></font><font size="1"><span style="background:#100d0c;color:#a0a0a0;">&lt;/param&gt;
    /// &lt;param name=</span><span style="background:#100d0c;color:#919191;">&quot;actionPerform&quot;</span><span style="background:#100d0c;color:#a0a0a0;">&gt;</span><span style="background:#100d0c;color:#80ff00;">The action perform.</span></font><span style="background:#100d0c;color:#a0a0a0;"><font size="1">&lt;/param&gt;
    /// &lt;returns&gt;&lt;/returns&gt;
    /// </font></span><font size="1"><span style="background:#100d0c;color:#80ff00;">Documentation Created 7/20/2008
    </span><span style="background:#100d0c;color:#8ac5ff;">public static </span><span style="background:#100d0c;color:#ff6fb7;">IEnumerable</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#e1b04a;">TContainedType</span><span style="background:#100d0c;color:silver;">&gt; </span><span style="background:#100d0c;color:#e1b04a;">ForEach</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#e1b04a;">TContainedType</span><span style="background:#100d0c;color:silver;">&gt;</span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">(
           </span><span style="background:#100d0c;color:#8ac5ff;">this </span><span style="background:#100d0c;color:#ff6fb7;">IEnumerable</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#e1b04a;">TContainedType</span><span style="background:#100d0c;color:silver;">&gt; </span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">baseEnum,
               </span><span style="background:#100d0c;color:#ffaeff;">Action</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#e1b04a;">TContainedType</span><span style="background:#100d0c;color:silver;">&gt; </span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">actionPerform) {

        </span><span style="background:#100d0c;color:#8ac5ff;">return </span></font><span style="background:#100d0c;color:#e1b04a;"><font size="1">ForEachInner(baseEnum, actionPerform);
    }

    </font></span><span style="background:#100d0c;color:#a0a0a0;"><font size="1">/// &lt;summary&gt;
    /// </font></span><span style="background:#100d0c;color:#80ff00;"><font size="1">The most explicit case
    </font></span><font size="1"><span style="background:#100d0c;color:#a0a0a0;">/// &lt;/summary&gt;
    /// &lt;typeparam name=</span><span style="background:#100d0c;color:#919191;">&quot;TBase&quot;</span><span style="background:#100d0c;color:#a0a0a0;">&gt;</span><span style="background:#100d0c;color:#80ff00;">The type of the base.</span></font><font size="1"><span style="background:#100d0c;color:#a0a0a0;">&lt;/typeparam&gt;
    /// &lt;typeparam name=</span><span style="background:#100d0c;color:#919191;">&quot;TContainedType&quot;</span><span style="background:#100d0c;color:#a0a0a0;">&gt;</span><span style="background:#100d0c;color:#80ff00;">The type of the contained type.</span></font><font size="1"><span style="background:#100d0c;color:#a0a0a0;">&lt;/typeparam&gt;
    /// &lt;param name=</span><span style="background:#100d0c;color:#919191;">&quot;baselineEnumerable&quot;</span><span style="background:#100d0c;color:#a0a0a0;">&gt;</span><span style="background:#100d0c;color:#80ff00;">The baseline enumerable.</span></font><font size="1"><span style="background:#100d0c;color:#a0a0a0;">&lt;/param&gt;
    /// &lt;param name=</span><span style="background:#100d0c;color:#919191;">&quot;actionPerform&quot;</span><span style="background:#100d0c;color:#a0a0a0;">&gt;</span><span style="background:#100d0c;color:#80ff00;">The action perform.</span></font><span style="background:#100d0c;color:#a0a0a0;"><font size="1">&lt;/param&gt;
    /// &lt;returns&gt;&lt;/returns&gt;
    /// </font></span><font size="1"><span style="background:#100d0c;color:#80ff00;">Documentation Created 7/20/2008
    </span><span style="background:#100d0c;color:#8ac5ff;">public static </span><span style="background:#100d0c;color:#ff6fb7;">IEnumerable</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#e1b04a;">TContainedType</span><span style="background:#100d0c;color:silver;">&gt; </span><span style="background:#100d0c;color:#e1b04a;">ForEach</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#e1b04a;">TBase, TContainedType</span><span style="background:#100d0c;color:silver;">&gt;</span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">(
              </span><span style="background:#100d0c;color:#8ac5ff;">this </span><span style="background:#100d0c;color:#e1b04a;">TBase baselineEnumerable, </span><span style="background:#100d0c;color:#ffaeff;">Action</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#e1b04a;">TContainedType</span><span style="background:#100d0c;color:silver;">&gt; </span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">actionPerform)
                   </span><span style="background:#100d0c;color:#8ac5ff;">where </span><span style="background:#100d0c;color:#e1b04a;">TBase : </span><span style="background:#100d0c;color:#ff6fb7;">IEnumerable </span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">{

        </span><span style="background:#100d0c;color:#8ac5ff;">return </span><span style="background:#100d0c;color:#e1b04a;">ForEachInner(baselineEnumerable</span><span style="background:#100d0c;color:silver;">.</span><span style="background:#100d0c;color:#e1b04a;">OfType</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#e1b04a;">TContainedType</span><span style="background:#100d0c;color:silver;">&gt;</span></font><span style="background:#100d0c;color:#e1b04a;"><font size="1">(), actionPerform);
    }

    </font></span><span style="background:#100d0c;color:#a0a0a0;"><font size="1">/// &lt;summary&gt;
    /// </font></span><span style="background:#100d0c;color:#80ff00;"><font size="1">The least restrictive case
    </font></span><font size="1"><span style="background:#100d0c;color:#a0a0a0;">/// &lt;/summary&gt;
    /// &lt;param name=</span><span style="background:#100d0c;color:#919191;">&quot;baseEnum&quot;</span><span style="background:#100d0c;color:#a0a0a0;">&gt;</span><span style="background:#100d0c;color:#80ff00;">The base enum.</span></font><font size="1"><span style="background:#100d0c;color:#a0a0a0;">&lt;/param&gt;
    /// &lt;param name=</span><span style="background:#100d0c;color:#919191;">&quot;actionPerform&quot;</span><span style="background:#100d0c;color:#a0a0a0;">&gt;</span><span style="background:#100d0c;color:#80ff00;">The action perform.</span></font><span style="background:#100d0c;color:#a0a0a0;"><font size="1">&lt;/param&gt;
    /// &lt;returns&gt;&lt;/returns&gt;
    /// </font></span><font size="1"><span style="background:#100d0c;color:#80ff00;">Documentation Created 7/20/2008
    </span><span style="background:#100d0c;color:#8ac5ff;">public static </span><span style="background:#100d0c;color:#ff6fb7;">IEnumerable</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#64b1ff;">Object</span><span style="background:#100d0c;color:silver;">&gt; </span><span style="background:#100d0c;color:#e1b04a;">ForEach(</span><span style="background:#100d0c;color:#8ac5ff;">this </span><span style="background:#100d0c;color:#ff6fb7;">IEnumerable </span><span style="background:#100d0c;color:#e1b04a;">baseEnum,                </span><span style="background:#100d0c;color:#ffaeff;">Action</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#64b1ff;">Object</span></font><span style="background:#100d0c;color:silver;"><font size="1">&gt;  </font></span><font size="1"><span style="background:#100d0c;color:#e1b04a;">actionPerform) {

        </span><span style="background:#100d0c;color:#8ac5ff;">return </span><span style="background:#100d0c;color:#e1b04a;">ForEachInner(baseEnum</span><span style="background:#100d0c;color:silver;">.</span><span style="background:#100d0c;color:#e1b04a;">OfType</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#64b1ff;">Object</span><span style="background:#100d0c;color:silver;">&gt;</span></font><span style="background:#100d0c;color:#e1b04a;"><font size="1">(), actionPerform);
    }

    </font></span><span style="background:#100d0c;color:#a0a0a0;"><font size="1">/// &lt;summary&gt;
    /// </font></span><span style="background:#100d0c;color:#80ff00;"><font size="1">Do the actual work
    </font></span><font size="1"><span style="background:#100d0c;color:#a0a0a0;">/// &lt;/summary&gt;
    /// &lt;typeparam name=</span><span style="background:#100d0c;color:#919191;">&quot;TContainedType&quot;</span><span style="background:#100d0c;color:#a0a0a0;">&gt;</span><span style="background:#100d0c;color:#80ff00;">The type of the contained type.</span></font><font size="1"><span style="background:#100d0c;color:#a0a0a0;">&lt;/typeparam&gt;
    /// &lt;param name=</span><span style="background:#100d0c;color:#919191;">&quot;baseEnum&quot;</span><span style="background:#100d0c;color:#a0a0a0;">&gt;</span><span style="background:#100d0c;color:#80ff00;">The base enum.</span></font><font size="1"><span style="background:#100d0c;color:#a0a0a0;">&lt;/param&gt;
    /// &lt;param name=</span><span style="background:#100d0c;color:#919191;">&quot;actionPerform&quot;</span><span style="background:#100d0c;color:#a0a0a0;">&gt;</span><span style="background:#100d0c;color:#80ff00;">The action perform.</span></font><span style="background:#100d0c;color:#a0a0a0;"><font size="1">&lt;/param&gt;
    /// &lt;returns&gt;&lt;/returns&gt;
    /// </font></span><font size="1"><span style="background:#100d0c;color:#80ff00;">Documentation Created 7/20/2008
    </span><span style="background:#100d0c;color:#8ac5ff;">private static </span><span style="background:#100d0c;color:#ff6fb7;">IEnumerable</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#e1b04a;">TContainedType</span><span style="background:#100d0c;color:silver;">&gt; </span><span style="background:#100d0c;color:#e1b04a;">ForEachInner</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#e1b04a;">TContainedType</span><span style="background:#100d0c;color:silver;">&gt;</span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">(
        </span><span style="background:#100d0c;color:#ff6fb7;">IEnumerable</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#e1b04a;">TContainedType</span><span style="background:#100d0c;color:silver;">&gt; </span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">baseEnum,
                       </span><span style="background:#100d0c;color:#ffaeff;">Action</span><span style="background:#100d0c;color:silver;">&lt;</span><span style="background:#100d0c;color:#e1b04a;">TContainedType</span><span style="background:#100d0c;color:silver;">&gt; </span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">actionPerform) {

        </span><span style="background:#100d0c;color:#8ac5ff;">var </span><span style="background:#100d0c;color:#e1b04a;">getEnumerate </span><span style="background:#100d0c;color:silver;">= </span><span style="background:#100d0c;color:#e1b04a;">baseEnum</span><span style="background:#100d0c;color:silver;">.</span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">ToList();
        getEnumerate</span><span style="background:#100d0c;color:silver;">.</span></font><font size="1"><span style="background:#100d0c;color:#e1b04a;">ForEach(actionPerform);

        </span><span style="background:#100d0c;color:#8ac5ff;">return </span></font><span style="background:#100d0c;color:#e1b04a;"><font size="1">getEnumerate;
    }</font></span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>&#160;</p>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>&#160;</p>
<p>Notice that anything which implements IEnumerable is caught above, regardless of what the collection.</p>
<p>&#160;</p>
<div style="float:none;display:inline;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:eb68bac9-98d9-4f88-a664-8c985a219755" class="wlWriterSmartContent">del.icio.us Tags: <a href="http://del.icio.us/popular/Advanced+C%23" rel="tag">Advanced C#</a>,<a href="http://del.icio.us/popular/C%23" rel="tag">C#</a>,<a href="http://del.icio.us/popular/C%23+3.0+for+Internal+DSL" rel="tag">C# 3.0 for Internal DSL</a>,<a href="http://del.icio.us/popular/Delegates" rel="tag">Delegates</a>,<a href="http://del.icio.us/popular/Functional+Programming" rel="tag">Functional Programming</a>,<a href="http://del.icio.us/popular/Lambada" rel="tag">Lambada</a>,<a href="http://del.icio.us/popular/linq" rel="tag">linq</a>,<a href="http://del.icio.us/popular/Visual+Studio+2008" rel="tag">Visual Studio 2008</a></div>
</p>
</p>
</p>
<p><div style="float:none;display:inline;margin:0;padding:0;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1e50a19d-51fa-4053-b31f-4ed321648963" class="wlWriterSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Advanced+C%23" rel="tag">Advanced C#</a>,<a href="http://technorati.com/tags/C%23" rel="tag">C#</a>,<a href="http://technorati.com/tags/C%23+3.0+for+Internal+DSL" rel="tag">C# 3.0 for Internal DSL</a>,<a href="http://technorati.com/tags/Delegates" rel="tag">Delegates</a>,<a href="http://technorati.com/tags/Functional+Programming" rel="tag">Functional Programming</a>,<a href="http://technorati.com/tags/Lambada" rel="tag">Lambada</a>,<a href="http://technorati.com/tags/linq" rel="tag">linq</a>,<a href="http://technorati.com/tags/Visual+Studio+2008" rel="tag">Visual Studio 2008</a></div>
</p>
<div class="wlWriterHeaderFooter" style="text-align:right;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=http%3a%2f%2fdcarr.wordpress.com%2f2008%2f05%2f22%2fadvanced-c-30-part-2-everyday-tasks-with-new-solutions%2f&amp;title=Advanced+C%23+3.0+%3a+Part+2+-+Everyday+Tasks+with+New+Solutions"><img src="http://digg.com/img/badges/100x20-digg-button.png" width="100" height="20" alt="Digg This" border="0" style="border:0;" /></a></div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/232/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/232/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/232/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=232&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/05/22/advanced-c-30-part-2-everyday-tasks-with-new-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/05/image-0001-thumb.png" medium="image">
			<media:title type="html">Image-0001</media:title>
		</media:content>

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>Framework API Development Best Practices using C# 3.0</title>
		<link>http://team.pushbomb.com/2008/05/15/domain-driven-framework-development-c-net-35-extension-methods-lambada-empowerment/</link>
		<comments>http://team.pushbomb.com/2008/05/15/domain-driven-framework-development-c-net-35-extension-methods-lambada-empowerment/#comments</comments>
		<pubDate>Thu, 15 May 2008 21:24:52 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[C# 3.0 for Internal DSL]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Software Factories]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[agile practices]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[API Design]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Extension Methods]]></category>
		<category><![CDATA[Framework Design]]></category>
		<category><![CDATA[Generics]]></category>
		<category><![CDATA[Lambada]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/05/15/domain-driven-framework-development-c-net-35-extension-methods-lambada-empowerment/</guid>
		<description><![CDATA[This content assumes you understand the basics of the new C# 3.0 language features in .NET 3.5. I use a 'pretend pair programming' approach with continued refactoring as this is how I would discuss it if you were coding with me.

I'll start with a fairly trivial, yet important example (I use it every day). Many times when comparing Strings I want to ignore case and culture (the InvariantCulture). This is provided by an overload as such as you likely know:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=188&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<h2 style="text-align:left;">PART 1</h2>
<p style="text-align:left;"><a href="http://dcarr.files.wordpress.com/2008/05/image31.png"><img class="alignright" style="border-width:0;margin:5px;" src="http://dcarr.files.wordpress.com/2008/05/image3-thumb.png?w=1024&#038;h=220" alt="image" height="220" /></a></p>
<p style="text-align:left;">This content assumes you have an introductory knowledge of C# 3.0 language features in .NET 3.5 and mastery of legacy C# 2.0 Generics, Generic Type Constraints, Anonymous Delegates and related material.</p>
<p>I use a &#8216;pair programming&#8217; approach with continued refactoring as this is how I would discuss it if you were coding with me, with an unfortunate one-way delivery.</p>
<h3 style="text-align:left;">The Brief Strategic View</h3>
<p style="text-align:left;">Microsoft has slowly been moving C# in a very productive direction (this is not new, as these features existed in 2.0 although not nearly as well integrated) to provide &#8216;Functional Language&#8217; features. If you don&#8217;t know or care about language semantics, just know that Linq and especially Lambada Expressions are about empowering you to use executable code like a variable, aka to leverage the power of functional programming. For more on this, read this <a href="http://msdn.microsoft.com/en-us/magazine/cc507636.aspx">MSDN article</a> by <a href="http://msdn.microsoft.com/en-us/magazine/cc301175.aspx">Joel Pobar (former CLR Team)</a> or read the next set of posts (part 2 onward) as I will go into the depths of this.</p>
<table style="text-align:left;height:153px;" border="1" cellspacing="0" cellpadding="2" width="399">
<tbody>
<tr>
<td width="543" valign="top">
<p align="center">I think of Lambadas as an incredibly focused and powerful domain specific language for delegates.</p>
<p>In this sense they are quite similar to Regular Expressions in that they are really good at their focus area.</p>
<p align="center">What do I mean by good?</p>
<ul>
<li>
<div>Terse yet Understandable / Maintainable</div>
</li>
<li>
<div>Syntax tailored to the need, not the other way around.</div>
</li>
<li>
<div>Highly effective for problems that are orders of magnitude more difficult without them (a simple 10% improvement would not cut it)</div>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<h2 style="text-align:left;">Painless Intro</h2>
<p style="text-align:left;">I&#8217;ll start with a fairly trivial, yet important example (I use it every day). Many times when comparing Strings I want to ignore case and culture (the InvariantCulture). This is provided by an overload as such as you likely know:</p>
<p>[Test,Category("BaselineCore")]<br />
public void shouldAsserStringCloneInvokeEqual() {</p>
<p>var baselineString = &#8220;This is a TEST CASE to IgnOrE Casing&#8221;;</p>
<p>var stringUpper = baselineString.ToUpperInvariant();</p>
<p>Assert.IsTrue(baselineString.Equals(stringUpper,<br />
StringComparison.InvariantCultureIgnoreCase));</p>
<p style="text-align:left;">The test results are shown above. Pass. Ok so I really like short, concise code that is understandable at a glance. Also it&#8217;s a pain to always (even with ReSharper) use this (and I have seen people use RegEx for this! RegEx is awesome but overkill for this issue).</p>
<p style="text-align:left;">Refactoring</p>
<ul style="text-align:left;">
<li>Create an extension method on String</li>
<li>Decide on a good name for the method (this is SO important and for most an afterthought!)</li>
</ul>
<p style="text-align:left;">I&#8217;ve settled on calling this new method on String &#8216;EqualsCore&#8217; as that is what we are doing, making the conditions for a match &#8217;simpler&#8217; and seeing &#8216;just the core values&#8217; are the same (anyway it makes sense to me)., I suppose this could be &#8216;EqualsRelaxed&#8217; or whatever..</p>
<p style="text-align:left;">Here is the test case (no code yet):</p>
<p>[Test, Category("BaselineCore")]<br />
public void shouldAsserStringsEqualUsingExtension() {<br />
var baselineString = &#8220;This is a TEST CASE to IgnOrE Casing&#8221;;<br />
Assert.IsTrue(baselineString. EqualsSimple(baselineString.ToUpperInvariant())); }</p>
<p style="text-align:left;">Now we write the code. Here is the container for the extension method:</p>
<p>public static class StringExtensions {</p>
<p>public static bool EqualsSimple(this string sTarget, string compare) {</p>
<p>return sTarget.Equals(compare, StringComparison.InvariantCultureIgnoreCase); }</p>
<p>}</p>
<p style="text-align:left;">Indeed they both pass:</p>
<p style="text-align:left;"><a href="http://dcarr.files.wordpress.com/2008/05/image25.png"><img class="alignright" style="float:right;border-width:0;" src="http://dcarr.files.wordpress.com/2008/05/image25-thumb.png?w=455&#038;h=255" alt="image25" width="455" height="255" align="left" /></a></p>
<p style="text-align:left;">
<p style="text-align:left;">
<p style="text-align:left;">
<p style="text-align:left;">
<p style="text-align:left;">
<p style="text-align:left;">Since every type inherits from Object, and Equals is defined on Object, all instances should support this approach, and I could be early bound by using Generics&#8230;. Hmm&#8230;</p>
<p style="text-align:left;">I tried this (note: I gave it a new new &#8216;EqualsThis&#8217; to separate them.</p>
<p>public static bool EqualsThis&lt;TTarget&gt;(this TTarget sTarget, TTarget compare){</p>
<p>return sTarget.Equals(compare);</p>
<p>}</p>
<p style="text-align:left;">Functionally not that interesting at all, but a test. So I typed in the following and wow&#8230; It works from Intellisense&#8217;s view&#8230; Ok it compiled! Wait&#8230;..FAIL! But why:?</p>
<p style="text-align:left;">OK here is the new test:</p>
<p>[Test, Category("BaselineCore")]</p>
<p>public void shouldAsserANYTHINGEqualUsingExtension() {</p>
<p>const String baselineString =&#8221;This is a TEST CASE to IgnOrE Casing&#8221;;</p>
<p>var sb = new StringBuilder(baselineString);</p>
<p>Assert.IsTrue(sb.EqualsThis(new StringBuilder(sb.ToString())));</p>
<p>}</p>
<p style="text-align:left;">
<p style="text-align:left;">Interesting&#8230;</p>
<p style="text-align:left;">Here is the documentation for what Equals means by default from Microsoft:</p>
<table style="text-align:left;" border="1" cellspacing="0" cellpadding="2" width="396">
<tbody>
<tr>
<td width="394" valign="top">
<p align="center">Returns: true if objA is the same instance as objB or if both are null references or if objA.Equals(objB) returns true; otherwise, false.</p>
</td>
</tr>
</tbody>
</table>
<p style="text-align:left;">So our code fails using the extension yet this returns true:</p>
<p>[Test] public void shouldAssertStringBuilderExplicit() {</p>
<p>const String baselineString = &#8220;This is a TEST CASE to IgnOrE Casing&#8221;;</p>
<p>var sb = new StringBuilder(baselineString);</p>
<p>var sb2 = new StringBuilder(baselineString); Assert.IsTrue(sb.Equals(sb2));</p>
<p>}</p>
<p style="text-align:left;">So Reflector to the rescue once again. I could see in Reflector what I believed the issue was. Indeed the StringBuilder class has an overloaded Equals, and even making the extension method cast to the generic type directly was a no go.</p>
<table style="text-align:left;" border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td width="400" valign="top">
<p align="center">So what do you think? Why would this compile fine with absolutely no problems (and that is correct it turns out), but FAIL at runtime on the assertion when the same line above passes? Skip ahead and reply with the answer if you know it&#8230;.</p>
</td>
</tr>
</tbody>
</table>
<p style="text-align:left;">This exposes one of the dangers that we must be incredibly careful with. It has always been poor design in my opinion to encourage developers to override common methods such as ToString() and Equals(object X) with their own behaviors as you force consumers of the API to understand IMPLEMENTATION. You cannot ensure your OK simply from a contract. This is known to be evil&#8230;.</p>
<p style="text-align:left;">Of course this is a legacy style and will be slowly phased out.</p>
<p style="text-align:left;">Spin up reflector and look at the code for the OVERLOAD that StringBuilder has:</p>
<div style="text-align:left;">public bool Equals(StringBuilder sb){if (sb == null) return false;</p>
<p>return (((this.Capacity == sb.Capacity) &amp;&amp; (this.MaxCapacity == sb.MaxCapacity))<br />
&amp;&amp;<br />
this.m_StringValue.Equals((string) sb.m_StringValue));</p>
<p>}</p></div>
<div style="text-align:left;">
<p style="text-align:left;">Of course! How else could a StringBuilder claim to be &#8216;Equal&#8217; to another&#8230; In fact it is perfectly reasonable but again shows the danger of late binding, making assumptions about how any &#8216;object&#8217; type will perform.</p>
</div>
<div style="text-align:left;">
<p style="text-align:left;">So there was no real way for our extension to call the &#8216;correct&#8217; equals. It called the base definition given above which is obvious now why it failed.</p>
<p style="text-align:left;">
<p style="text-align:left;">So how do we fix this for the general case?</p>
<div style="text-align:left;">
<p style="text-align:left;">Here is the test case which I got working.. If your not familiar with this style of code,</p>
</div>
<div style="text-align:left;">This is the foundation we build layer after layer on and illustrates the core of this post.</div>
<p>[Test] public void shouldAsserANYTHINGEqualUsingExtension() {</p>
<p>const String baselineString = &#8220;This is a TEST CASE to IgnOrE Casing&#8221;;</p>
<p>var sb = new StringBuilder(baselineString);</p>
<p>var sb2 = new StringBuilder(baselineString);</p>
<p>Assert.IsTrue(sb.EqualsThis(x =&gt; x.Equals(sb2)));</p>
<p>}</p>
<table style="text-align:left;" border="1" cellspacing="0" cellpadding="2" width="438">
<tbody>
<tr>
<td width="436" valign="top">
<p align="center">Lambadas are like an incredibly focused and powerful domain specific language for delegates. In this sense they are quite similar to Regular Expressions in that they are really good (and to quantify good, I mean clear yet precise, not overly verbose yet highly effective for problems that are more difficult without them).</p>
</td>
</tr>
</tbody>
</table>
<div style="text-align:left;">So what about the implementation? Here it is:</div>
<p>public static bool EqualsThis&lt;TTarget&gt;(this TTarget sTarget,</p>
<p>Predicate&lt;TTarget&gt; EqualsDelegate) {</p>
<p>return EqualsDelegate.Invoke(sTarget);</p>
<p>}</p>
<div style="text-align:left;">It&#8217;s all about Expressions! Think of them as varied ways to receive executable code that you can &#8216;invoke&#8217; literally, that must meet the contract you define.</div>
<div style="text-align:left;">This is so basic after we cover what the really useful applications are. However remember this has nothing to do with the examples, only the concepts they represent.</div>
<h1 style="text-align:left;"></h1>
<table style="text-align:left;" border="1" cellspacing="0" cellpadding="2" width="632">
<tbody>
<tr>
<td width="400" valign="top">
<div></div>
<ol>
<li>Combine Generics and Generic Constraints to your Extension Methods but BE CAREFUL and ensure you are covered by unit tests</li>
<li>Try to always think a level of abstraction above where your immediate need is to see if your solution indeed has wider and perhaps far more valuable contribution.</li>
<li>Hide complexity behind your Framework API, and focus on crafting work that others will easily consume.</li>
</ol>
</td>
</tr>
</tbody>
</table>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/188/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/188/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=188&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/05/15/domain-driven-framework-development-c-net-35-extension-methods-lambada-empowerment/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/05/image3-thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/05/image25-thumb.png" medium="image">
			<media:title type="html">image25</media:title>
		</media:content>
	</item>
		<item>
		<title>ReSharper 4 &#8212; Latest Status Update from Ilya Ryzhenkov</title>
		<link>http://team.pushbomb.com/2008/05/14/resharper-4-latest-status-update-from-ilya-ryzhenkov/</link>
		<comments>http://team.pushbomb.com/2008/05/14/resharper-4-latest-status-update-from-ilya-ryzhenkov/#comments</comments>
		<pubDate>Wed, 14 May 2008 07:34:14 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[reflection]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[JetBrains]]></category>
		<category><![CDATA[Resharper]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/05/14/resharper-4-latest-status-update-from-ilya-ryzhenkov/</guid>
		<description><![CDATA[Well, overall time scope for ReSharper 4 release is about a month. Thank you for your patience, we really appreciate your participation in our early access program! We are doing our best to deliver smart and quality product. And while we are here, what is *single* most important thing you want to be fixed/changed before release?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=187&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Hello, I must admit, we were not very responsive in the forums for the last month or so. We were<a href="http://dcarr.files.wordpress.com/2008/05/200805140336160109.jpg"><img class="alignright alignnone size-medium wp-image-186" style="float:right;" src="http://dcarr.files.wordpress.com/2008/05/200805140336160109.jpg?w=379&#038;h=284" alt="Home Page" width="379" height="284" /></a></p>
<p>busy developing ReSharper 4 :) Here is quick update. We are currently working on preparing ReSharper for Beta &#8211; performance, memory, overall stability and reliability. Beta should be out very soon. Then we will have</p>
<p>post-Beta cleanup, more stabilization for Release, fill in missing bricks found during Beta, and then &#8230; Well, overall time scope for ReSharper 4 release is about a month. Thank you for your patience, we really appreciate your participation in our early access program! We are doing our best to deliver smart and quality product. And while we are here, what is *single* most important thing you want to be fixed/changed before release?</p>
<blockquote><p>Sincerely,</p>
<p>Ilya Ryzhenkov</p>
<p>JetBrains, Inc</p>
<p>http://www.jetbrains.com &#8220;Develop with pleasure!&#8221;</p></blockquote>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/187/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/187/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/187/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=187&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/05/14/resharper-4-latest-status-update-from-ilya-ryzhenkov/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://dcarr.files.wordpress.com/2008/05/200805140336160109.jpg?w=300" medium="image">
			<media:title type="html">Home Page</media:title>
		</media:content>
	</item>
		<item>
		<title>Daniel Cazzulino&#8217;s Blog : Statically-typed reflection with LINQ</title>
		<link>http://team.pushbomb.com/2008/05/08/daniel-cazzulinos-blog-statically-typed-reflection-with-linq/</link>
		<comments>http://team.pushbomb.com/2008/05/08/daniel-cazzulinos-blog-statically-typed-reflection-with-linq/#comments</comments>
		<pubDate>Thu, 08 May 2008 06:11:24 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[C# 3.0 Enhancements]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[reflection]]></category>
		<category><![CDATA[Advanced .NET]]></category>
		<category><![CDATA[C# 3.0 for Internal DSL]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/05/08/daniel-cazzulinos-blog-statically-typed-reflection-with-linq/</guid>
		<description><![CDATA[With .NET 3.5 and C# 3.0 released now, it was time for an update. As part of the update, I also improved the API a little bit. Usage now is:
MethodInfo toString = Reflect.GetMethod(x =&#62; x.ToString());The renamed Reflect class receives the type you want to reflect as a generic parameter. Then you can use GetMethod, GetField or GetProperty.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=183&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>To quote Daniel&#8230; : &#8220;Quite some time ago I posted about <a href="http://www.clariusconsulting.net/blogs/kzu/archive/2006/07/06/TypedReflection.aspx">how to use LINQ to provide a strong-typed reflection API</a>. I used a very old LINQ preview back then.</p>
<p>With <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=333325fd-ae52-4e35-b531-508d977d32a6&amp;displaylang=en">.NET 3.5 and C# 3.0 released</a> now, it was time for an update. As part of the update, I also improved the API a little bit. Usage now is:</p>
<pre style="text-align:center;"><strong>MethodInfo toString = Reflect&lt;object&gt;.GetMethod(x =&gt; x.ToString());</strong></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>The renamed <code>Reflect&lt;TTarget&gt;</code> class receives the type you want to reflect as a generic parameter. Then you can use <code>GetMethod</code>, <code>GetField</code> or <code>GetProperty</code>.</p>
<p>Other examples:</p>
<pre style="text-align:center;">MethodInfo clone = Reflect&lt;ICloneable&gt;.GetMethod(x =&gt; x.Clone());
PropertyInfo prop = Reflect&lt;AppDomain&gt;.GetProperty(x =&gt; x.BaseDirectory);
FieldInfo field = Reflect&lt;Mock&gt;.GetField(x =&gt; x.PublicField);</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Working principle is the same: the lambda you pass to the methods is actually an expression</p>
<p>which I analyze to retrieve the underlying reflection object that is already exposed by the LINQ Expression API. For example, once you get to a <a href="http://msdn2.microsoft.com/en-us/library/system.linq.expressions.methodcallexpression.aspx">MethodCallExpression</a>, you can get the method being called through its <a href="http://msdn2.microsoft.com/en-us/library/bb340973.aspx">Method</a> property:</p>
<pre style="text-align:center;">((MethodCallExpression)lambda.Body).Method;</pre>
<p>It&#8217;s interesting to see how this works actually, and what&#8217;s the compiler generating for those lambda expressions invoking methods.</p>
<p>In Reflector, the following C# code:</p>
<p>MethodInfo clone = Reflect&lt;ICloneable&gt;.GetMethod(x =&gt; x.Clone());</p>
<p>is decompiled as (indented for readability):</p>
<pre style="text-align:center;">ParameterExpression CS$0$0000;
MethodInfo clone = Reflect&lt;ICloneable&gt;.GetMethod(
Expression.Lambda&lt;Action&lt;ICloneable&gt;&gt;(Expression.Call(CS$0$0000 =
Expression.Parameter(typeof(ICloneable), "x"),
 (MethodInfo) methodof(ICloneable.Clone), new Expression[0] ),
new ParameterExpression[] { CS$0$0000 }  ));</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Note how the MethodInfo is retrieved directly from the interface by using a <code>methodof</code> operator. It&#8217;s not a valid C# keyword, but given that <a href="http://www.aisto.com/roeder/">Lutz Roeder</a> works for Microsoft (not on the C# team, though), let&#8217;s hope it will get eventually in the language :).</p>
<p>That <code>methodof</code> translation is actually the conversion from the following two IL lines:</p>
<pre style="text-align:center;">L_0017: ldtoken instance object [mscorlib]System.ICloneable::Clone()L_001c: call class
 [mscorlib]System.Reflection.MethodBase</pre>
<pre style="text-align:center;">[mscorlib]System.Reflection.MethodBase::GetMethodFromHandle(valuetype</pre>
<pre style="text-align:center;">[mscorlib]System.RuntimeMethodHandle)</pre>
<p><code>ldtoken</code> is the key there, let&#8217;s hope it gets promoted to C# in some way eventually.</p>
<p>Anyway, since I wrote my original article, I realized through <a href="http://www.ayende.com/Blog/Default.aspx">Ayende&#8217;s blog</a> that you can also do <a href="http://www.ayende.com/Blog/archive/2005/10/29/8176.aspx">static reflection without LINQ</a>. It only works for methods though, and you cannot use the lambda syntax because it results in method infos that are actually from a compiler-generated type (the one that contains the closures too if any).</p>
<p>As I&#8217;m so in love with the lambda syntax, I&#8217;ll keep my implementation based on expression trees instead of delegates.</p>
<p>It&#8217;s released now as part of <a href="http://www.codeplex.com/clarius">Clarius Labs</a> projects. <a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=clarius&amp;ReleaseId=9495">Get the source</a> and have fun!&#8221;</p>
<p><a href="http://www.clariusconsulting.net/blogs/kzu/archive/2007/12/30/49063.aspx">Daniel Cazzulino&#8217;s Blog : Statically-typed reflection with LINQ</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/183/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/183/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/183/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/183/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/183/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=183&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/05/08/daniel-cazzulinos-blog-statically-typed-reflection-with-linq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>
	</item>
		<item>
		<title>ReSharper 4.0 EAP Notes &#8211; JetBrains.net</title>
		<link>http://team.pushbomb.com/2008/05/01/resharper-40-eap-notes-jetbrainsnet/</link>
		<comments>http://team.pushbomb.com/2008/05/01/resharper-40-eap-notes-jetbrainsnet/#comments</comments>
		<pubDate>Thu, 01 May 2008 15:33:16 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[C# 3.0 for Internal DSL]]></category>
		<category><![CDATA[Framework Design]]></category>
		<category><![CDATA[Proof Driven Development]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[EAP]]></category>
		<category><![CDATA[ReSharper 4.0]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/05/01/resharper-40-eap-notes-jetbrainsnet/</guid>
		<description><![CDATA[
 From ReSharper&#8217;s EAP Site
I&#8217;ve been using the 4.0 EAP (pre-beta) since the first preview and it&#8217;s awesome&#8230; Rocky at times, but I&#8217;ve never lost any code (however you should use at your own risk!).
There is something very comforting in auto-creating an anonymous delegate and having it convert automagically to lambata syntax&#8230;.
For example, here is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=182&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<blockquote>
<h3><span style="color:#ffffff;"> From ReSharper&#8217;s EAP Site</span></h3>
<p>I&#8217;ve been using the 4.0 EAP (pre-beta) since the first preview and it&#8217;s awesome&#8230; Rocky at times, but I&#8217;ve never lost any code (however you should use at your own risk!).</p>
<p>There is something very comforting in auto-creating an anonymous delegate and having it convert automagically to lambata syntax&#8230;.</p>
<p>For example, here is a step by step from a real code sample:</p>
<h4><a name="ReSharper4.0EAPNotes-C#3.0support">C# 3.0 support</a></h4>
<p><a name="ReSharper4.0EAPNotes-Implicitlytypedlocalsandarrays">Implicitly typed locals and arrays</a></p>
<p>Fully supported, including suggestions to omit explicit type specification, Introduce Variable refactoring and context actions to convert to implicit or explicit form.<br />
<img src="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_use_var.png" border="0" alt="" align="absmiddle" /></p>
<p><a name="ReSharper4.0EAPNotes-ExtensionMethodssupport">Extension Methods support</a></p>
<p>Fully supported, with Import Symbol completion (previously known as Type Name completion) after dot which can import suitable extension method and insert appropriate using directive. Analysis will suggest converting invocations from static-like to instance-like form. Context action can convert it back, and there are refactorings to convert static method of static class to Extension Method and update all call sites. There is also reverse refactoring, of course.</p>
<p><a name="ReSharper4.0EAPNotes-Objectandcollectioninitializers">Object and collection initializers</a></p>
<p>Fully supported, with suggestions and context actions to fold series of statements to collection or object to initializer, if possible.<br />
<img src="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_use_object_initializer.png" border="0" alt="" align="absmiddle" /><br />
ReSharper also provides smart intellisense features in such places, like completing settable properies or displaying correct parameter information for Add method used in collection initializer.<br />
<img src="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_completion_in_initializer.png" border="0" alt="" align="absmiddle" /></p>
<p><a name="ReSharper4.0EAPNotes-Automaticproperties">Automatic properties</a></p>
<p>Fully supported, with context actions to convert to property with backing field and back. Analysis can show properties which are candidates for conversion. Code generation features may suggest creating automatic property in addition to property with backing field, if appropriate.<br />
<img src="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_convert_to_autoproperty.png" border="0" alt="" align="absmiddle" /></p>
<p><a name="ReSharper4.0EAPNotes-Anonymoustypes">Anonymous types</a></p>
<p>Fully supported. ReSharper can search for similar anonymous types throughout the project or solution, give a name to anonymous type and replace usages, rename properties, suggest reordering properties if two anonymous types look similar and more.<br />
<img src="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_sync_anonymous_types.png" border="0" alt="" align="absmiddle" /></p>
<p><a name="ReSharper4.0EAPNotes-Lambdas">Lambdas</a></p>
<p>Partially supported. By partially, it means that not all features we want there are ready. The code shouldn&#8217;t be red and intellisense should be working, but some context actions, quickfixes, analysis and such may be missing. We are actively working on those features, so as time passes ReSharper will be more and more smart about lambdas. We have conversion actions like delegate to lambda and back and some suggestions. Note, that not all features of ReSharper are lambda-aware yet, so they may fail when they happen to operate on lambdas.<br />
<img src="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_convert_to_lambda.png" border="0" alt="" align="absmiddle" /></p>
<p><a name="ReSharper4.0EAPNotes-LINQ">LINQ</a></p>
<p>Almost supported. We import appropriate extension methods, provide intellisense, a number quickfixes, our refactorings are aware of queries. We also provide special live templates.</p>
<p><a name="ReSharper4.0EAPNotes-Partialmethods">Partial methods</a></p>
<p>Not supported.</p>
<p><a name="ReSharper4.0EAPNotes-Newandupdatedfeatures">New and updated features</a></p>
<p><a name="ReSharper4.0EAPNotes-GotoType,File,SymbolandFindResults">Go to Type, File, Symbol and Find Results</a></p>
<p>You can now put results of &#8220;Go to&#8221; features to find results for browsing<br />
<img src="http://www.jetbrains.net/confluence/download/attachments/31721/GotoByNameResults.png" border="0" alt="" width="488" height="415" align="absmiddle" /></p>
<p><a name="ReSharper4.0EAPNotes-ExternalAnnotations">External Annotations</a></p>
<p>Ability to annotate external (non-source) symbols with ReSharper-specific attributes, like CanBeNull and NotNull. Note, that we standardized attribute names for better interoperability and less configuration hassle, so you may need to refactor you code a bit if you use these attributes.</p>
<p><a name="ReSharper4.0EAPNotes-CodeCleanup">Code Cleanup</a></p>
<p>Successor of Reformat Code, Optimize Usings and other code cleaning features &#8211; all in one interface with many more modules. Includes things like processing readonly fields, removing redundancies, updating file header, converting to automatic properties, replacing explicit types with vars and more. All in batch mode, so that you can instantly clean the whole project or even solution.<br />
<img src="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_code_cleanup.png" border="0" alt="" align="absmiddle" /></p>
<p><a name="ReSharper4.0EAPNotes-Plentyofnewanalyses">Plenty of new analyses</a></p>
<p>We added many more inspections in ReSharper 4. Some of them are related to C# 3.0 and deal with new language constructs. Also, there are new structure-related inspections, like &#8220;if&#8221; statement analysis, anonymous method closure analysis, and more. We also added new severity level for analysis results &#8211; Hint &#8211; which is a lot less intrusive. It does not participate in next/previous highlight navigation and is not shown on error stripe. It simply tells you: &#8220;Pssst! Take a look here, it can make your code look better.&#8221;</p>
<p><a name="ReSharper4.0EAPNotes-CompleteStatement">Complete Statement</a></p>
<p>Also known as Smart Enter, it inserts required syntax elements to complete the code you are writing. It can close parentheses as needed, add semicolon, complete constructs such as if, while, for and so on.</p>
<p><a name="ReSharper4.0EAPNotes-CompletionwithCamelHumps">Completion with CamelHumps</a></p>
<p>All kinds of code completion (Symbol completion, Import Symbol Completion and Smart Completion) now supports filtering by CamelHumps, which tremendously speeds things up. E.g. if you know you have D<em>efaultCodeCompletionManager</em> type somewhere you just type <em>DCCM</em> and invoke Import symbol completion. Full type name will be inserted and using directive will be added as needed.</p>
<p><a name="ReSharper4.0EAPNotes-Refactorings">Refactorings</a></p>
<p>There are new refactorings related to C# 3.0 features, like &#8220;Convert Property to Automatic Property&#8221; and back, &#8220;Convert Static Method to Extension Method&#8221; and back and &#8220;Name Anonymous Type&#8221;. &#8220;Introduce Variable&#8221; is now dialogless and this improves coding flow a lot! Another great new refactoring is &#8220;Inline Method&#8221;, which can replace method call with method body at specific point or all over your code. &#8220;Method to Indexer&#8221; is a nice addition to &#8220;Method to Property&#8221; refactoring. There are also improvements in almost all refactorings, both in usability and smartness.</p>
<p><a name="ReSharper4.0EAPNotes-RecentEdits">Recent Edits</a></p>
<p>In addition to Recent Files we created Recent Edits feature, which shows what you&#8217;ve been changing recently. If appropriate, it displays type and member the change occured in.<br />
<img src="http://www.jetbrains.net/confluence/download/attachments/31721/RecentEdits.png" border="0" alt="" width="495" height="175" align="absmiddle" /></p>
<p><a name="ReSharper4.0EAPNotes-Todoitemsonidentifiersandstringliterals">To-do items on identifiers and string literals</a></p>
<p>You can now configure ReSharper to search for specific patterns not only in comments, but also in string literals and identifiers. It is quite useful to set NotImplementedException pattern to have a quick access to code you have to write.<br />
<img src="http://www.jetbrains.net/confluence/download/attachments/31721/ToDoIdentifiers.png" border="0" alt="" align="absmiddle" /></p>
<p><a name="ReSharper4.0EAPNotes-Supportforsolutionsusingdifferenttargets">Support for solutions using different targets</a></p>
<p>ReSharper now fully supports solutions where different projects use different versions of CLR like .NET Compact Framework or Silverlight. You can now have e.g. Smart Device projects and normal projects in the same solution and all ReSharper features will work perfectly fine in this scenario.</p>
<p><a name="ReSharper4.0EAPNotes-ProjectReferences">Project References</a></p>
<p>This is more like preview of the feature which may or may not come into final bits of ReSharper 4. It can show dependencies between projects and libraries in terms of assembly references.</p>
<p><a name="ReSharper4.0EAPNotes-LiveTemplatesEditor">Live Templates Editor</a></p>
<p>We are improving usability of Live Templates editor and currently it is large work in progress. Be careful with it if you use custom templates.</p>
<p><a name="ReSharper4.0EAPNotes-Easiercreationofnewfoldersthroughgenerate(AltInsertshortcut)">Easier creation of new folders through generate (Alt+Insert shortcut)</a></p>
<p><img src="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_new_folder.png" border="0" alt="" align="absmiddle" /></p>
<p><a name="ReSharper4.0EAPNotes-Dozensofotherfeatures">Dozens of other features</a></p>
<p>We also have dozens of other minor features, keep track of</p>
<p><a href="http://www.jetbrains.net/jira/secure/IssueNavigator.jspa?reset=true&amp;&amp;type=2&amp;pid=10241&amp;resolution=1&amp;fixfor=11304&amp;sorter/field=issuekey&amp;sorter/order=DESC">this tracker query<sup><img src="http://www.jetbrains.net/confluence/images/icons/linkext7.gif" border="0" alt="" width="7" height="7" align="absmiddle" /></sup></a> for the current list.</p></blockquote>
<p><a href="http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+4.0+EAP+Notes">ReSharper 4.0 EAP Notes &#8211; JetBrains.net</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/182/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/182/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=182&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/05/01/resharper-40-eap-notes-jetbrainsnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>

		<media:content url="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_use_var.png" medium="image" />

		<media:content url="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_use_object_initializer.png" medium="image" />

		<media:content url="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_completion_in_initializer.png" medium="image" />

		<media:content url="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_convert_to_autoproperty.png" medium="image" />

		<media:content url="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_sync_anonymous_types.png" medium="image" />

		<media:content url="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_convert_to_lambda.png" medium="image" />

		<media:content url="http://www.jetbrains.net/confluence/download/attachments/31721/GotoByNameResults.png" medium="image" />

		<media:content url="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_code_cleanup.png" medium="image" />

		<media:content url="http://www.jetbrains.net/confluence/download/attachments/31721/RecentEdits.png" medium="image" />

		<media:content url="http://www.jetbrains.net/confluence/download/attachments/31721/ToDoIdentifiers.png" medium="image" />

		<media:content url="http://www.jetbrains.net/confluence/download/attachments/31721/release_notes_new_folder.png" medium="image" />

		<media:content url="http://www.jetbrains.net/confluence/images/icons/linkext7.gif" medium="image" />
	</item>
		<item>
		<title>Framework Usage Patterns &#8211; Next Generation Software Engineering</title>
		<link>http://team.pushbomb.com/2008/04/14/framework-usage-patterns-next-generation-software-engineering/</link>
		<comments>http://team.pushbomb.com/2008/04/14/framework-usage-patterns-next-generation-software-engineering/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 02:52:01 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[Software Factories]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[resharper]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[JetBrains]]></category>
		<category><![CDATA[Software Innovation]]></category>
		<category><![CDATA[Software Next Generation]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/?p=162</guid>
		<description><![CDATA[Language Oriented Programming or LOP is a novel software development approach which employs domain specific languages. A domain specific language is a language which is designed to deal with one specific kind of tasks within a specific domain. One of the patterns of LOP usage, namely "framework-usages" is discussed. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=162&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sergeydmitriev.com/mps/doc/article/article.html">http://www.sergeydmitriev.com/mps/doc/article/article.html</a></p>
<p> </p>
<p>This is fantastic stuff coming from one of my all-time favorite companies, JetBrains. Here is a start:</p>
<h1><span style="font-size:small;">Framework-usage pattern in MPS</span></h1>
<p><span style="font-size:xx-small;"><a href="mailto:Cyril.Konopko@jetbrains.com">Cyril Konopko</a>, <a href="mailto:Konstantin.Solomatov@jetbrains.com">Konstantin Solomatov</a> </span></p>
<p> </p>
<p> </p>
<div style="margin-top:50px;margin-left:100px;margin-right:100px;text-align:center;"><strong>Language Oriented Programming or LOP is a novel software development approach which employs domain specific languages. A domain specific language is a language which is designed to deal with one specific kind of tasks within a specific domain. One of the patterns of LOP usage, namely &#8220;framework-usages&#8221; is discussed. </strong></div>
<h2><a id="intro">Introduction</a></h2>
<p>Language Oriented Programming or LOP is a software development approach which employs domain specific languages, or DSLs for short. A domain specific language, in contrast to general purpose languages, is a language which is designed to deal with one specific kind of tasks or with several related task kinds within a specific domain. For example, SQL is a DSL in a domain of database queries. LOP solves your main problem by dividing it into several subproblems in different domains, then each subproblem is solved using an appropriate DSL. In rather big projects, LOP can reduce singificantly the amount of work which has to be done.</p>
<p>In this article we will speak about JetBrains MPS, being developed by JetBrains, Inc., which is a so-called &#8220;language workbench&#8221;, i.e. a tool that helps you to use LOP in practice. You can read more about language workbenches on <a href="http://www.martinfowler.com/articles/languageWorkbench.htm">Martin Fowler&#8217;s site</a> and about LOP in <a href="http://www.onboard.jetbrains.com/is1/articles/04/10/lop/">Sergey Dmitriev&#8217;s article</a>.</p>
<p>A lot of people who heard about MPS don&#8217;t realize how it&#8217;s possible to take advantage of it. The current state of MPS is far from the point where you can throw away your Java or C# IDE and start writing everything in MPS with LOP, however it&#8217;s possible to use LOP and simplify some tasks significantly today. Actually, you probably use in your current project some kind of poor man&#8217;s LOP, techniques which make it possible to create small sublanguages in the program written on a language like Java, C#, or Ruby (Martin Fowler called such sublanguages Internal DSLs). This article explains the pattern that can employ MPS in its current state, describes prevalent poor man&#8217;s LOP tricks and presents several examples of it.</p>
<h2>&#8230;.</h2>
<p> </p>
<p>Seriously, check this out. Download the EAP, start using&#8230;..</p>
<p> </p>
<p>Thanks,</p>
<p>Damon</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/162/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/162/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/162/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=162&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/04/14/framework-usage-patterns-next-generation-software-engineering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7b572cbcda5a17fe984e7dd1ddc9c3d6?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">pushbomb</media:title>
		</media:content>
	</item>
	</channel>
</rss>