<?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; Proof Driven Development</title>
	<atom:link href="http://team.pushbomb.com/category/software-as-strategic/proof-driven-development/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; Proof Driven Development</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>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>Update! CruiseControl.net Advanced Metrics &#8211; RC1 1.4 Build</title>
		<link>http://team.pushbomb.com/2008/06/19/open-source-project-updated-cruise-controlnet-advanced-metrics/</link>
		<comments>http://team.pushbomb.com/2008/06/19/open-source-project-updated-cruise-controlnet-advanced-metrics/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 16:25:11 +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 Futures]]></category>
		<category><![CDATA[agile practices]]></category>
		<category><![CDATA[CC.NET]]></category>
		<category><![CDATA[CCStatistics]]></category>
		<category><![CDATA[Continuous Integration]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/?p=267</guid>
		<description><![CDATA[I finally had time to perform some much needed upgrades to the code base for the qualitative and quantitative metrics for Cruise Control.net continuous integration (a must have in my opinion).

I'll be speaking more about it but here is the 'smoke mock/regression test' I just got running, and which all further regression-driven/verification-driven development will occur (not sure which I like better as a phrase but test-driven has got to go... It is so universally misunderstood, misapplied, and misconstrued. Can I get a witness?)...

Anyway here's the framework API for now. This will evolve into a full Linq provider (I hope)...<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=267&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>We finally had time to perform some much needed upgrades to the code base for the qualitative and quantitative metrics produced by our addin to CruiseControl.net continuous integration system</p>
<p>Anyway here&#8217;s an idea of how the framework API is shaping up. Expect this to move dramatically toward&#8217;s Fowler&#8217;s fantastic coverage of <a href="http://www.martinfowler.com/dslwip/ExpressionBuilder.html">&#8216;Expression Builder&#8217;</a>.</p>
<p><a href="http://www.ayende.com/projects/rhino-mocks/downloads.aspx"><img class="size-full wp-image-274 alignleft" style="margin:0 20px 0 0;" src="http://dcarr.files.wordpress.com/2008/06/rhinomocks-120x90.png?w=104&#038;h=78" alt="dont mock around" width="104" height="78" /></a></p>
<p>We hope that this will evolve into a full Linq provider, and due to the XML foundation this is not all that unrealistic a goal.<br />
 </p>
<p> </p>
<p> </p>
<pre><span style="background:black;color:#bbfdcc;">namespace </span><span style="background:black;color:#ffffff;">CCStatisticsTDD
{
    </span><span style="background:black;color:#bbfdcc;">using </span><span style="background:black;color:#ffffff;">System;
    </span><span style="background:black;color:#bbfdcc;">using </span><span style="background:black;color:#ffffff;">System.Collections.Generic;
    </span><span style="background:black;color:#bbfdcc;">using </span><span style="background:black;color:#ffffff;">System.Linq;
    </span><span style="background:black;color:#bbfdcc;">using </span><span style="background:black;color:#ffffff;">CCStatistics.Domain.Api;
    </span><span style="background:black;color:#bbfdcc;">using </span><span style="background:black;color:#ffffff;">CCStatistics.Domain.Api.Interfaces;
    </span><span style="background:black;color:#bbfdcc;">using </span><span style="background:black;color:#ffffff;">NUnit.Framework;
    </span><span style="background:black;color:#bbfdcc;">using </span><span style="background:black;color:#ffffff;">Rhino.Mocks;
    </span><span style="background:black;color:#bbfdcc;">using </span><span style="background:black;color:#ffffff;">TDDViewOutputStatus;
    </span><span style="background:black;color:#bbfdcc;">using </span><span style="background:black;color:#ffffff;">ThoughtWorks.CruiseControl.Core;

    </span><span style="background:black;color:#808080;">/// &lt;summary&gt;
    /// </span><span style="background:black;color:#008000;">This is a monolitic 'Smoke Test'. There are many fine grained tests to be writtem!
    </span><span style="background:black;color:#808080;">/// &lt;/summary&gt;
    </span><span style="background:black;color:#ffffff;">[</span><span style="background:black;color:#2b91af;">TestFixture</span><span style="background:black;color:#ffffff;">]
    </span><span style="background:black;color:#bbfdcc;">public class </span><span style="background:black;color:#2b91af;">MainTestFixtureBaselineSmokes </span><span style="background:black;color:#ffffff;">: </span><span style="background:black;color:#2b91af;">TestBase
    </span><span style="background:black;color:#ffffff;">{
        </span><span style="background:black;color:#808080;">/// &lt;summary&gt;
        /// </span><span style="background:black;color:#008000;">Gets the mock list.
        </span><span style="background:black;color:#808080;">/// &lt;/summary&gt;
        /// &lt;param name="mockBuildName"&gt;</span><span style="background:black;color:#008000;">Name of the mock build.</span><span style="background:black;color:#808080;">&lt;/param&gt;
        /// &lt;param name="repositoryBuildCount"&gt;</span><span style="background:black;color:#008000;">The repository build count.</span><span style="background:black;color:#808080;">&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        /// </span><span style="background:black;color:#008000;">Documentation Created 6/23/2008
        </span><span style="background:black;color:#bbfdcc;">private static </span><span style="background:black;color:#2b91af;">List</span><span style="background:black;color:#ffffff;">&lt;</span><span style="background:black;color:#bbfdcc;">string</span><span style="background:black;color:#ffffff;">&gt; GetMockList(</span><span style="background:black;color:#bbfdcc;">string </span><span style="background:black;color:#ffffff;">mockBuildName, </span><span style="background:black;color:#bbfdcc;">int </span><span style="background:black;color:#ffffff;">repositoryBuildCount)
        {
            </span><span style="background:black;color:#008000;">// Add the build name to the array tht is expected to be available for ALL builds
            // from the repositoy. Here we use 10

            </span><span style="background:black;color:#bbfdcc;">return
                </span><span style="background:black;color:#2b91af;">Enumerable</span><span style="background:black;color:#ffffff;">.Repeat(mockBuildName + </span><span style="background:black;color:#a31515;">" {0}"</span><span style="background:black;color:#ffffff;">, repositoryBuildCount).Select(
                    s =&gt; </span><span style="background:black;color:#2b91af;">String</span><span style="background:black;color:#ffffff;">.Format(s, </span><span style="background:black;color:#2b91af;">DateTime</span><span style="background:black;color:#ffffff;">.Now.TimeOfDay.TotalMilliseconds/1000)).ToList();
        }

        </span><span style="background:black;color:#bbfdcc;">protected override </span><span style="background:black;color:#2b91af;">ICCStatsProject </span><span style="background:black;color:#ffffff;">Prepare()
        {
            </span><span style="background:black;color:#008000;">// We need a name for this project
            </span><span style="background:black;color:#bbfdcc;">const </span><span style="background:black;color:#2b91af;">String </span><span style="background:black;color:#ffffff;">mockBuildName = </span><span style="background:black;color:#a31515;">"CCStatisticsBuildMock"</span><span style="background:black;color:#ffffff;">;

            </span><span style="background:black;color:#008000;">// Simulate 100 legacy build results
            </span><span style="background:black;color:#bbfdcc;">const int </span><span style="background:black;color:#ffffff;">repositoryBuildCount = 100;

            </span><span style="background:black;color:#bbfdcc;">var </span><span style="background:black;color:#ffffff;">repository = mocks.Stub&lt;</span><span style="background:black;color:#2b91af;">IIntegrationRepository</span><span style="background:black;color:#ffffff;">&gt;();
            </span><span style="background:black;color:#bbfdcc;">var </span><span style="background:black;color:#ffffff;">buildNames = GetMockList(mockBuildName, repositoryBuildCount);

            </span><span style="background:black;color:#008000;">// OK set this up to return our builds
            </span><span style="background:black;color:#ffffff;">repository.Stub(x =&gt; x.GetBuildNames()).Return(buildNames.ToArray());

            </span><span style="background:black;color:#bbfdcc;">var </span><span style="background:black;color:#ffffff;">currentProject = mocks.Stub&lt;</span><span style="background:black;color:#2b91af;">ICCStatsProject</span><span style="background:black;color:#ffffff;">&gt;();

            currentProject.Stub(x =&gt; x.IntegrationRepository).Return(repository);
            currentProject.Stub(x =&gt; x.StatisticsForPublisher).Return(MockStats);

            currentProject.StubEx(x =&gt; x.Name, mockBuildName).
                StubEx(x =&gt; x.BuildLogDirectory, DefaultDirectory).
                StubEx(x =&gt; x.ArtifactDirectory, DefaultDirectory).
                StubEx(x =&gt; x.WorkingDirectory, DefaultDirectory).
                Stub(x =&gt; x.StatsPostPublisher).Return(InitializePublisher(currentProject));

            </span><span style="background:black;color:#bbfdcc;">return </span><span style="background:black;color:#ffffff;">currentProject;
        }

        </span><span style="background:black;color:#bbfdcc;">private </span><span style="background:black;color:#2b91af;">IMetricPublisher </span><span style="background:black;color:#ffffff;">InitializePublisher(</span><span style="background:black;color:#2b91af;">ICCStatsProject </span><span style="background:black;color:#ffffff;">project)
        {
            </span><span style="background:black;color:#008000;">// OK now it's interesting.. We have our own IMetricPublisher which is a stand-in for the
            // StattisticsPublisher concrete class in CruiseControl. We need to add a new overload
            // and obviously make this behave in ways it was not intended to (as we are doing all the legacy builds)
            </span><span style="background:black;color:#bbfdcc;">var </span><span style="background:black;color:#ffffff;">_statisticsPublisher = mocks.Stub&lt;</span><span style="background:black;color:#2b91af;">IMetricPublisher</span><span style="background:black;color:#ffffff;">&gt;();

            </span><span style="background:black;color:#008000;">// Here we use the mock array of stats created above. This is a duplicate of StatisticsForPublisher
            // Need to look into consolodating that.
            </span><span style="background:black;color:#ffffff;">_statisticsPublisher.Stub(x =&gt; x.ConfiguredStatistics).Return(MockStats);

            </span><span style="background:black;color:#008000;">// Core Validation is Below
            </span><span style="background:black;color:#ffffff;">_statisticsPublisher.Expect(x =&gt; x.ProcesLogFile(project.Name)).
                IgnoreArguments().Repeat.Times(project.BuildCount);

            </span><span style="background:black;color:#bbfdcc;">return </span><span style="background:black;color:#ffffff;">_statisticsPublisher;
        }

        </span><span style="background:black;color:#808080;">/// &lt;summary&gt;
        /// </span><span style="background:black;color:#008000;">NOTE: This is a FULL CYCLE Mock Smoke test. We need many more finely grained
        </span><span style="background:black;color:#808080;">/// </span><span style="background:black;color:#008000;">tests. This is just to ensure all is well in the application. Each subcomponent
        </span><span style="background:black;color:#808080;">/// </span><span style="background:black;color:#008000;">will need to have tests added as this evolves. In the mean time this works
        </span><span style="background:black;color:#808080;">/// </span><span style="background:black;color:#008000;">well to ensure we fundamentally work and this is called from OUR BuildServer
        </span><span style="background:black;color:#808080;">/// </span><span style="background:black;color:#008000;">(how META is that?) to ensure this is working.
        </span><span style="background:black;color:#808080;">/// </span><span style="background:black;color:#008000;">This should be your first stop to undersand this code
        </span><span style="background:black;color:#808080;">/// &lt;/summary&gt;
        </span><span style="background:black;color:#ffffff;">[</span><span style="background:black;color:#2b91af;">Test</span><span style="background:black;color:#ffffff;">]
        </span><span style="background:black;color:#bbfdcc;">public void </span><span style="background:black;color:#ffffff;">ShouldSmokeTestProjectAPI()
        {
            </span><span style="background:black;color:#bbfdcc;">using </span><span style="background:black;color:#ffffff;">(mocks.Record())
                </span><span style="background:black;color:#2b91af;">Assert</span><span style="background:black;color:#ffffff;">.IsTrue(</span><span style="background:black;color:#2b91af;">ForStatistics</span><span style="background:black;color:#ffffff;">.RefreshValues(</span><span style="background:black;color:#2b91af;">MockTDDView</span><span style="background:black;color:#ffffff;">.New, Prepare()));
        }
    }

    </span><span style="background:black;color:#bbfdcc;">public static class </span><span style="background:black;color:#2b91af;">MockExtensions
    </span><span style="background:black;color:#ffffff;">{
        </span><span style="background:black;color:#808080;">/// &lt;summary&gt;
        /// </span><span style="background:black;color:#008000;">Stubs the type defined
        </span><span style="background:black;color:#808080;">/// &lt;/summary&gt;
        /// &lt;typeparam name="TType"&gt;</span><span style="background:black;color:#008000;">The type of the type.</span><span style="background:black;color:#808080;">&lt;/typeparam&gt;
        /// &lt;param name="currentProject"&gt;</span><span style="background:black;color:#008000;">The current project.</span><span style="background:black;color:#808080;">&lt;/param&gt;
        /// &lt;param name="funcMock"&gt;</span><span style="background:black;color:#008000;">The func mock.</span><span style="background:black;color:#808080;">&lt;/param&gt;
        /// &lt;param name="returnString"&gt;</span><span style="background:black;color:#008000;">The return string.</span><span style="background:black;color:#808080;">&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        /// </span><span style="background:black;color:#008000;">Documentation Created 6/20/2008
        </span><span style="background:black;color:#bbfdcc;">public static </span><span style="background:black;color:#ffffff;">TType StubEx&lt;TType&gt;(</span><span style="background:black;color:#bbfdcc;">this </span><span style="background:black;color:#ffffff;">TType currentProject, </span><span style="background:black;color:#2b91af;">Func</span><span style="background:black;color:#ffffff;">&lt;TType, </span><span style="background:black;color:#2b91af;">String</span><span style="background:black;color:#ffffff;">&gt; funcMock,
                                          </span><span style="background:black;color:#2b91af;">String </span><span style="background:black;color:#ffffff;">returnString)
            </span><span style="background:black;color:#bbfdcc;">where </span><span style="background:black;color:#ffffff;">TType : </span><span style="background:black;color:#bbfdcc;">class</span><span style="background:black;color:#ffffff;">, </span><span style="background:black;color:#2b91af;">ICCStatsProject
        </span><span style="background:black;color:#ffffff;">{
            currentProject.Expect(funcMock).Return(returnString).Repeat.Any();
            </span><span style="background:black;color:#bbfdcc;">return </span><span style="background:black;color:#ffffff;">currentProject;
        }
    }
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/267/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/267/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/267/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=267&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/06/19/open-source-project-updated-cruise-controlnet-advanced-metrics/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/06/rhinomocks-120x90.png" medium="image">
			<media:title type="html">dont mock around</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>NUnit &#8211; New Alpha 1 2.5 Release &#8211; Some Cool Newness to an old friend</title>
		<link>http://team.pushbomb.com/2008/05/15/nunit-new-alpha-1-25-release-some-cool-newness-to-an-old-friend/</link>
		<comments>http://team.pushbomb.com/2008/05/15/nunit-new-alpha-1-25-release-some-cool-newness-to-an-old-friend/#comments</comments>
		<pubDate>Thu, 15 May 2008 20:42:38 +0000</pubDate>
		<dc:creator>Damon Wilder Carr</dc:creator>
				<category><![CDATA[Proof Driven Development]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[agile practices]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[NUnit]]></category>
		<category><![CDATA[Fluent API]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2008/05/15/nunit-new-alpha-1-25-release-some-cool-newness-to-an-old-friend/</guid>
		<description><![CDATA[
NUnit 2.5 Alpha 1 Release &#8211; April 18, 2008
Note: Since this is an alpha level release, the features are not complete and some features present in this release may be removed or changed in future releases.

General





There are no longer separate distributed packages for .NET 1.1 an 2.0. Both the binary zip and msi packages contain [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=198&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nunit.org"></a></p>
<h5>NUnit 2.5 Alpha 1 Release &#8211; April 18, 2008</h5>
<p><strong>Note:</strong> Since this is an alpha level release, the features are not complete and some features present in this release may be removed or changed in future releases.</p>
<p>
<h2>General</h2>
</p>
<p><a href="http://www.nunit.org"></a></p>
<p><a href="http://www.nunit.org"></a></p>
<ul>
<li>
<p>There are no longer separate distributed packages for .NET 1.1 an 2.0. Both the binary zip and msi packages contain subdirectories for .NET 1.1 and 2.0. In the case of the msi, the user may elect to install either or both of them. </p>
</li>
<li>
<p>The Visual Studio solutions and projects are now in a directory tree that is parallel to the source tree. This eliminates problems where the VS2003 and VS2005 builds were interfering with one another and makes room for adding VS2008. </p>
</li>
<li>
<p>NUnit is now built using NAnt 0.86 beta 1 </p>
</li>
<li>
<p>The windows installer is now created using WiX 2.0.5085 </p>
</li>
</ul>
<p>
<h2>Framework</h2>
</p>
<ul>
<li>Two new attributes have been added to support passing arguments to test methods: </li>
<ul>
<ul></ul>
<li>
<p><strong>TestCaseAttribute</strong> allows the programmer to specify the arguments and a number of optional parameters inline. </p>
</li>
<li>
<p><strong>DataSourceAttribute</strong> identifies a static property that will provide the arguments and other parameters. </p>
</li>
</ul>
</ul>
<p>Two new constraints have been added to permit testing of application-created paths, without requiring that they exist in the file system. The following syntax is supported: </p>
<ul>
<ul>
<ul></ul>
<li>
<p><strong>Is.SamePath(string)</strong> </p>
</li>
<li>
<p><strong>Is.SamePathOrUnder(string)</strong> </p>
</li>
</ul>
<p>The DirectoryAssert class has been added, providing the following Methods:
<ul></ul>
</p>
<li>
<p><strong>AreEqual(DirectoryInfo, DirectoryInfo)</strong> </p>
</li>
<li>
<p><strong>AreEqual(string, string)</strong> </p>
</li>
<li>
<p><strong>AreNotEqual(DirectoryInfo, DirectoryInfo)</strong> </p>
</li>
<li>
<p><strong>AreNotEqual(string, string)</strong> </p>
</li>
<li>
<p><strong>IsEmpty(DirectoryInfo, DirectoryInfo)</strong> </p>
</li>
<li>
<p><strong>IsEmpty(string, string)</strong> </p>
</li>
<li>
<p><strong>IsNotEmpty(DirectoryInfo, DirectoryInfo)</strong> </p>
</li>
<li>
<p><strong>IsNotEmpty(string, string)</strong> </p>
</li>
<li>
<p><strong>IsWithin(DirectoryInfo, DirectoryInfo)</strong> </p>
</li>
<li>
<p><strong>IsWithin(string, string)</strong> </p>
</li>
<li>
<p><strong>IsNotWithin(DirectoryInfo, DirectoryInfo)</strong> </p>
</li>
<li>
<p><strong>IsN</strong><strong>otWithin(string, string)</strong> </p>
</li>
</ul>
<p>&#160;</p>
<p>The method <strong>Assert.Throws(Type expectedException, TestSnippet code)</strong> has been added to provide more control over tests of expected exceptions. <strong>TestSnippet</strong> is a delegate, which may of course be supplied anonymously under .NET 2.0. If the correct exception type is thrown, the actual exception is returned from the method, allowing further verification to be performed. </p>
<ul>
<li>
<p>The <strong>Assert.DoesNotThrow</strong> method may be used to verify that a delegate does not throw an exception. </p>
</li>
<li>
<p>The <strong>Assert.Pass</strong> method allows early termination of a test with a successful result. </p>
</li>
<li>
<p>The <strong>Assert.Inconclusive</strong> method allows returning the new Inconclusive result state. </p>
</li>
<p>NUnit now includes added funtionality in the .NET 2.0 build of the framework. The following additional features are supported:
<ul></ul>
</p>
<li>
<p>All Asserts and Constraints work with nullable types. </p>
</li>
<p>Some Asserts allow an alternate generic syntax for convenience:
<ul></ul>
</p>
<li>
<p><strong>Assert.IsInstanceOf&lt;T&gt;(object actual);</strong> </p>
</li>
<li>
<p><strong>Assert.IsNotInstanceOf&lt;T&gt;(object actual);</strong> </p>
</li>
<li>
<p><strong>Assert.IsAssignableFrom&lt;T&gt;(object actual);</strong> </p>
</li>
<li>
<p><strong>Assert.IsNotAssignableFrom&lt;T&gt;(object actual);</strong> </p>
</li>
<li>
<p><strong>Assert.Throws&lt;T&gt;(TypeSnippet code);</strong> </p>
</li>
<p>The following obsolete interfaces, classes and methods have been removed:
<ul></ul>
</p>
<li>
<p>The <strong>IAsserter</strong> interface </p>
</li>
<li>
<p>The <strong>AbstractAsserter</strong> class </p>
</li>
<li>
<p>The <strong>Assertion</strong> class </p>
</li>
<li>
<p>The <strong>AssertionFailureMessage</strong> class </p>
</li>
<li>
<p>The old <strong>NUnit.Framework.TestCase</strong> class used for inheriting test classes </p>
</li>
<li>
<p>The <strong>Assert.DoAssert()</strong> method </p>
</li>
<li>
<p>Two <strong>ExpectedExceptionAttribute(Type, string)</strong> constructor </p>
</li>
<li>
<p>Two <strong>ExpectedExceptionAttribute(string, string)</strong> constructor </p>
</li>
</ul>
<p>The syntactic constructs in the <strong>SyntaxHelpers</strong> namespace have been moved to the <strong>NUnit.Framework.Syntax.CSharp</strong> namespace. The old namespace may still be used for existing classes, but will not be supported after the 2.5 release. </p>
<p>
<h2>Core</h2>
</p>
<ul>
<li>
<p>NUnit now allows use of static methods as tests and for SetUp, TearDown, TestFixtureSetUp and TestFixtureTearDown. </p>
</li>
<li>
<p>Failures and Errors are now distinquished internally and in summary reports. Methods that are not run because they are invalid are also reported separately. </p>
</li>
</ul>
<p>
<h2>Console</h2>
</p>
<ul>
<li>
<p>The summary report now displays Errors, Failures, Inconclusive, Ignored and Skipped tests separately. More detailed information on non-runnable tests and setup failures is provided. </p>
</li>
<li>
<p>The console summary report is no longer created using a stylesheet, which renders the <strong>/transform</strong> option meaningless. The option has been removed. </p>
</li>
</ul>
<p>
<h2>Gui</h2>
</p>
<ul>
<li>
<p>The default GUI display now uses a single tab for all text output. For users upgrading from an earlier release, the current settings are honored. If you wish to change to the new default, use the Restore Defaults button on the Text Output settings dialog. </p>
</li>
<li>
<p>The final test run display shows a more detailed summary: passed tests, errors, failures, inconclusive, non-runnable, skipped and ignored. </p>
</li>
<li>
<p>The status bar now displays errors and failures separately in. </p>
</li>
<li>
<p>The tree display shows non-runnable tests in red and inconclusive tests in orange. Inconclusive tests are temporarily listed on the Tests Not Run tab for this alpha release. </p>
</li>
</ul>
<p>
<h2>Extensibility</h2>
</p>
<ul>
<li>
<p>A new extension point <strong>ParameterProviders</strong> allows addins to provide data for parameterized tests. </p>
</li>
<li>The following extensions are included in the nunit.core.extensions and nunit.framework.extensions assemblies:      </li>
<ul>
<ul></ul>
<li>
<p>The MaxTime extension, which was previously a sample. </p>
</li>
<li>
<p>The RowTest extension, which remains an alternative to NUnit&#8217;s native TestCase syntax. </p>
</li>
<li>
<p>The XmlConstraint extension, which allows comparing two xml files </p>
</li>
</ul>
</ul>
<p>
<h2>Technorati Tags: <a href="http://technorati.com/tags/agile" rel="tag">agile</a>,<a href="http://technorati.com/tags/NUnit" rel="tag">NUnit</a>,<a href="http://technorati.com/tags/Software+Engineering" rel="tag">Software Engineering</a>,<a href="http://technorati.com/tags/TDD" rel="tag">TDD</a>,<a href="http://technorati.com/tags/C%23" rel="tag">C#</a>,<a href="http://technorati.com/tags/Fluent+API" rel="tag">Fluent API</a></h2>
</p>
<p>
<h2></h2>
<h2>del.icio.us Tags: <a href="http://del.icio.us/popular/agile" rel="tag">agile</a>,<a href="http://del.icio.us/popular/NUnit" rel="tag">NUnit</a>,<a href="http://del.icio.us/popular/Software+Engineering" rel="tag">Software Engineering</a>,<a href="http://del.icio.us/popular/TDD" rel="tag">TDD</a>,<a href="http://del.icio.us/popular/C%23" rel="tag">C#</a>,<a href="http://del.icio.us/popular/Fluent+API" rel="tag">Fluent API</a></h2></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/198/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/198/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/198/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=198&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2008/05/15/nunit-new-alpha-1-25-release-some-cool-newness-to-an-old-friend/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>Software as a Service and Service Oriented Architecture &#8211; Why they fail to meet the hype in execution</title>
		<link>http://team.pushbomb.com/2007/10/01/software-as-a-service-its-all-about-the-words/</link>
		<comments>http://team.pushbomb.com/2007/10/01/software-as-a-service-its-all-about-the-words/#comments</comments>
		<pubDate>Mon, 01 Oct 2007 02:30:00 +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 Factories]]></category>
		<category><![CDATA[Software Futures]]></category>
		<category><![CDATA[agile practices]]></category>
		<category><![CDATA[.NET Web Services]]></category>
		<category><![CDATA[Communication Foundation]]></category>
		<category><![CDATA[Domain Model]]></category>
		<category><![CDATA[Entity Model]]></category>
		<category><![CDATA[Evolution of Software]]></category>
		<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[SaaS]]></category>
		<category><![CDATA[Semantics]]></category>
		<category><![CDATA[Service Oriented Architecture]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Softwre as a Service]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://dcarr.wordpress.com/2007/10/01/software-as-a-service-its-all-about-the-words/</guid>
		<description><![CDATA[The hype factor has done it again. We are all left starting at each other for just what in the world we all mean by SOA. ENOUGH! It's not that hard, and consultants, (myself being one so I will not be overly critical), vendors, the media, etc. have DESTROYED yet again any meaning in language. N-Tier, Message Bus, etc. etc. it goes back 20 years! The pattern never ends..<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=90&subd=dcarr&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>The hype factor has done it again. We are all left starting at each other for just what in the world we all mean by SOA. ENOUGH! It&#8217;s not that hard, and consultants, (myself being one so I will not be overly critical), vendors, the media, etc. have DESTROYED yet again any meaning in language. N-Tier, Message Bus, etc. etc. it goes back 20 years! The pattern never ends..</p>
<p>Not to be a terrible bore, but brush up on your <a href="http://en.wikipedia.org/wiki/Ludwig_Wittgenstein">Wittgenstein</a> lately?! Ok don&#8217;t go that far just yet&#8230;(grin).</p>
<p> First, a <a href="http://en.wikipedia.org/wiki/Pattern_language">Pattern Language</a> (P.L.) is not some academic concept, although many would like you to believe that.</p>
<p> </p>
<div>
<table border="0" cellspacing="0" cellpadding="2" width="262" align="right">
<tbody>
<tr>
<td width="77" align="right" valign="top"><a title="pdf-icon" href="http://www.flickr.com/photos/93223205@N00/1468114276/"><img src="http://static.flickr.com/1150/1468114276_f1d15541e6.jpg" border="0" alt="pdf-icon" width="31" height="31" /></a></td>
<td width="183" align="right" valign="top"><a href="http://www.agilefactor.com/SaasPatternLanguage.pdf">&#8216;Software as a Service &#8211; The Pattern Language Approach&#8217;</a></td>
</tr>
<tr>
<td width="77" align="right" valign="top"><a title="ie-icon" href="http://www.flickr.com/photos/93223205@N00/1468122752/"><img src="http://static.flickr.com/1196/1468122752_7267762646.jpg" border="0" alt="ie-icon" width="31" height="32" /></a></td>
<td width="183" align="right" valign="top"><a href="http://www.agilefactor.com/SaasPatternLanguage_files/fullscreen.htm#slide0001.htm">&#8216;Software as a Service &#8211; The Pattern Language Approach&#8217;</a></td>
</tr>
<tr>
<td width="77" align="right" valign="top"><a title="icon-set2-firefox" href="http://www.flickr.com/photos/93223205@N00/1468130216/"><img src="http://static.flickr.com/1259/1468130216_a701773dab.jpg" border="0" alt="icon-set2-firefox" width="31" height="31" /></a></td>
<td width="183" align="right" valign="top"><a href="http://www.agilefactor.com/SaasPatternLanguage.htm">&#8216;Software as a Service &#8211; The Pattern Language Approach&#8217;</a></td>
</tr>
</tbody>
</table>
</div>
<p><a title="SaaS" href="http://www.flickr.com/photos/93223205@N00/1465323619/"></a></p>
<p>NOTE: I take issue with the word design below&#8230; It should be far more broad in most cases, but it often gets boxed into the design aspect of a problem. I would say &#8216;best practices&#8217; which brings up its own semantic mess&#8230;</p>
<blockquote>
<p style="text-align:left;">A pattern language is a structured method of describing [best] good design practices within a field of expertise. It is characterized by</p>
<ol>
<li>Noticing and naming the common problems [and positively executed solutions proven over time] in a field of interest [domain in my words]</li>
<li>Describing the key characteristics of effective solutions for meeting [one or more] some stated goal[s], [Often patterns are combined and are multi-faceted]</li>
<li>Helping the designer [domain stakeholder] move from problem to problem [and challenge to challenge] in a logical way, [in an attempt to reduce and even eliminate ambiguity] and allowing for many different paths through the design process.</li>
</ol>
<p>- Wikipedia </p></blockquote>
<ol>
<li>This ties in perfectly with my claim that complex software engineering is a &#8216;wicked problem&#8217;. If you disagree then you can stop reading, as none of my assumptions will work. However, I would love to hear your arguments since only around 20-30% of all software projects &#8217;succeed&#8217;&#8230;. There is no doubt there is dreadful crisis which I know you know about so enough said.</li>
</ol>
<p>If the fundamental issue here is NOT that people cannot/will not see software engineering for what it is, then what?!</p>
<p><a href="http://en.wikipedia.org/wiki/Wicked_problems">Wicked Problem</a></p>
<p>FYI: This is also why your pretty much nuts to not be Agile at this point, with some critical exceptions.</p>
<p>OK just to get you started chew on these 10 basic characteristics and tell me how any of them and the failure of senior stakeholders to understand that indeed software fits these characteristics is likely a key systemic disaster which we see and live every day in this industry.<a href="http://damon.agilefactor.com/software-is-a-wicked-problem-2/"> Click here for more.</a></p>
<p> Before I was able to &#8216;take this deck on the road&#8217; which I have done now with success (and why I am revisiting this post to offer insights), I had to get the audience (I hate to call them that&#8230; The collaborators is better) knowing (for example) that SOA was not a damn bunch of web services! I had to get people understanding exactly how distributed objects and components ARE NOT THE SAME but are similar. etc. etc.</p>
<p>That ASMX pages in .NET are not even close to what you want to be doing, even with WSE 3.0 and &#8216;Contract First&#8217; techniques (most notably the WSCF add-in from the always amazing <a href="http://www.thinktecture.com/">thinktecture</a>).</p>
<blockquote><p>There is nothing more necessary than truth, and in comparison with it everything else has only secondary value.<br />
This absolute will to truth: what is it? Is it the will to not allow ourselves to be deceived? Is it the will not to deceive?<br />
One does not want to be deceived, under the supposition that it is injurious, dangerous, or fatal to be deceived.</p>
<p>Friedrich Nietzsche, 1890</p></blockquote>
<p>Thanks Herr Nietzsche&#8230; None of us want that. So &#8220;Listen for the speakers intended meaning, not your perceived definition&#8221;.</p>
<p>In this rather philosophical vein, I offer you here an attempt at the beginnings of a unified P.L. covering many best practices we have evolved in the SOA/SaaS space.</p>
<p>As stated, this presentation is born from necessity as it has become almost impossible to have a meaningful conversation on many topics in this domain due to &#8216;definition overloading&#8217;.</p>
<p>This presentation not only attacks that issue, it also brings together into a cohesive pattern language Object Orientation, Distributed Objects, Components and Services while being careful to not make overly broad generalizations that would harm any SaaS initiative.</p>
<p>For example, it is a best practice to evolve a Domain Driven API which is (at a minimum) the core APU which your services will use to fulfil their contracts.</p>
<p>The presentation is here and feedback is encouraged. This also assumes you have embraced either the SCA environment (for Java development) or WCF for .NET. These are (in our guidance to clients) the only relevant implementation frameworks for strategic large scale organizational transformations to SaaS.</p>
<p>Otherwise in real-world terms there are not resources (developers, or the dramatically increased effort with very little benefit) available to support other approaches. Many &#8216;purists to the extreme&#8217; might attempt a hand-crafted &#8216;build it all over again&#8217; approach with hand-crafted contracts (typically XSDs).</p>
<p>As these environments support full extensibility, indeed it is incredibly rare that one of these environments will not completely address your needs. Of course there are always exceptions, but this is addresses to 95% of the market.</p>
<p>Due to the immaturity of this space, it is alarming how many companies believe they are not part of that 95%!! Typically they are being driven by parties (internal or external) that have motivations not in line with the business drivers.</p>
<p> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dcarr.wordpress.com/90/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dcarr.wordpress.com/90/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dcarr.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dcarr.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dcarr.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dcarr.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dcarr.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dcarr.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dcarr.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dcarr.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dcarr.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dcarr.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=team.pushbomb.com&blog=2366446&post=90&subd=dcarr&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://team.pushbomb.com/2007/10/01/software-as-a-service-its-all-about-the-words/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://static.flickr.com/1150/1468114276_f1d15541e6.jpg" medium="image">
			<media:title type="html">pdf-icon</media:title>
		</media:content>

		<media:content url="http://static.flickr.com/1196/1468122752_7267762646.jpg" medium="image">
			<media:title type="html">ie-icon</media:title>
		</media:content>

		<media:content url="http://static.flickr.com/1259/1468130216_a701773dab.jpg" medium="image">
			<media:title type="html">icon-set2-firefox</media:title>
		</media:content>
	</item>
	</channel>
</rss>