<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.pluralsight-training.net/community/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"><channel><title>Pluralsight Blogs</title><link>http://www.pluralsight-training.net/community/blogs/</link><description>See what you can learn</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>VS2010 deploy web project with nightly build</title><link>http://www.pluralsight-training.net/community/blogs/fritz/archive/2010/07/30/vs2010-deploy-web-project-with-nightly-build.aspx</link><pubDate>Fri, 30 Jul 2010 13:06:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:92638</guid><dc:creator>fritz-onion</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;In my &lt;a href="http://www.pluralsight-training.net/microsoft/olt/webcasts.aspx"&gt;Pluralsight Webcast&lt;/a&gt;&amp;nbsp;on Web deployment in VS2010 last week there was a question about how to integrate the new Web deployment features of VS2010 into a nightly build (for testing on a staging server, for example). It turns out it&amp;#39;s pretty straight forward, once you have your Web solution set up, you can add it to a build definition and have the deploy occur every time the build is fired.&lt;/p&gt;
&lt;p&gt;The key to integrating a Web deployment is to point it to your Web solution (under items to build), and under Advanced add the following commands in the MSBuild Arguments:&lt;/p&gt;
&lt;p&gt;/p:DeployOnBuild=True /p:Configuration=Stage&lt;/p&gt;
&lt;p&gt;The DeployOnBuild flag will run the deployment script (including the config file merging and all) when the build is complete. The Configuration setting is what configuration you want to build (the defaults are Debug and Release, but it often makes sense to add new ones like Stage for scenarios like this, especially when it comes to configuration file modifications with XDT).&lt;/p&gt;
&lt;p&gt;There&amp;#39;s a presentation by Vishal Joshi from PDC09 on Web Deployment that walks through this process - look around minute 26 of this video:&lt;br /&gt;&lt;a href="http://www.microsoftpdc.com/2009/FT56"&gt;http://www.microsoftpdc.com/2009/FT56&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=92638" width="1" height="1"&gt;</description><category domain="http://www.pluralsight-training.net/community/blogs/fritz/archive/tags/VS2010/default.aspx">VS2010</category></item><item><title>I'm back --- and Microsoft has released HPC Server 2008 R2 (aka "V3")</title><link>http://www.pluralsight-training.net/community/blogs/drjoe/archive/2010/07/27/i-m-back-and-microsoft-has-released-hpc-server-2008-r2-aka-quot-v3-quot.aspx</link><pubDate>Tue, 27 Jul 2010 21:55:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:92038</guid><dc:creator>joe-hummel</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hello all, I&amp;#39;m back from my 2-month sailing adventure, where I was lucky enough to sail up the East Coast of the USA, and then across the Atlantic to Ireland and eventually the UK.&amp;nbsp; I have some pictures on my facebook page, eventually I&amp;#39;ll get them up on the web for anyone interested.&amp;nbsp; I&amp;#39;m happy to be back home and adjusting to life on land.&lt;/p&gt;
&lt;p&gt;On the technology front, last week Microsoft quietly released the next version (&amp;quot;V3&amp;quot;) of their HPC Server product, officially called &amp;quot;HPC Server 2008 R2&amp;quot; (in case you didn&amp;#39;t know, the naming convention refers to the underlying operating system on which&amp;nbsp;the HPC Pack must be installed).&amp;nbsp; The next release adds a number of news features to the product, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;improved support for HPC-based,&amp;nbsp;service-oriented workloads, including fire-and-forget&lt;/li&gt;
&lt;li&gt;integration with Excel 2010 for HPC-based spreadsheet execution&lt;/li&gt;
&lt;li&gt;support for cycle-stealing from Windows 7 workstations&lt;/li&gt;
&lt;li&gt;MPI and SOA debuggers (plugins for VS 2008, builtin to VS 2010)&lt;/li&gt;
&lt;li&gt;Improved IT functionality (deployment, diagnostics, reporting, failover)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can read more about it &lt;a href="http://www.microsoft.com/hpc/en/us/product/service-oriented-architecture.aspx" title="here"&gt;here&lt;/a&gt;, and &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=4b013794-f6fc-4070-b769-9acd0c140ca9&amp;amp;displaylang=en" title="download"&gt;download&lt;/a&gt; evaluation versions of the base OS (HPC Server 2008 R2 HPC Edition) and HPC Pack (HPC Pack 2008 R2).&amp;nbsp; Developers will also want to download the HPC Pack 2008 R2 &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=BC671B22-F158-4A5F-828B-7A374B881172&amp;amp;displaylang=en" title="SDK"&gt;SDK&lt;/a&gt;, as well as the MS-MPI &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=CE888449-0E71-44F3-A2FC-947EC57FF90F&amp;amp;displaylang=en" title="redistributable"&gt;redistributable&lt;/a&gt;.&amp;nbsp; As for me, I&amp;#39;ll be installing the RTM bits shortly, and will start to report on the new feature set as well as develop new curricular materials for our training efforts.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Hope everyone is well!&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=92038" width="1" height="1"&gt;</description></item><item><title>Pluralcast 20 : Technical Community and Geek Give with Steve Andrews</title><link>http://www.pluralsight-training.net/community/blogs/pluralcast/archive/2010/07/20/pluralcast-20-technical-community-and-geek-give-with-steve-andrews.aspx</link><pubDate>Tue, 20 Jul 2010 12:51:40 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:91519</guid><dc:creator>david-starr</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;b&gt;&lt;a href="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/pluralcast/474185792_5F00_3E590C81.jpg"&gt;&lt;img style="border-right-width:0px;margin:5px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="474185792" border="0" alt="474185792" align="right" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/pluralcast/474185792_5F00_thumb_5F00_274A8B45.jpg" width="201" height="204" /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_020_mr_community.mp3" target="_blank"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="PlayIcon_0DDE4823" border="0" alt="PlayIcon_0DDE4823" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/pluralcast/PlayIcon_5F00_0DDE4823_5F00_66A83ED5.png" width="24" height="24" /&gt;&lt;/a&gt;&amp;#160; &lt;a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_020_mr_community.mp3" target="_blank"&gt;Listen Now&lt;/a&gt;! [34:20]&lt;/p&gt;  &lt;p&gt;Steve Andrews is all about community and helps us understand what it really means to be a part of the technical developer meatspace. Steve has gone beyond the occasional Code Camp and has actually presented talks at 52 community events in one year. Also, Steve is the founder of Geek Give, an occasional community of geeks working with Habitat for Humanity to help make the world a better place. And Steve happens to be on the road at the moment, making his way across the U.S. and keeping us all posted at &lt;a href="http://GeekRoadTrip.com" target="_blank"&gt;The Geek Road Trip&lt;/a&gt;. Bottom line: What a great visit and great story.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Bio:&lt;/b&gt; Steve Andrews is an independent consultant, INETA speaker, and Microsoft MVP for Visual Studio ALM. He has been working in technology for over ten years focusing on custom application development and Application Lifecycle Management. Steve is also Microsoft and IBM certified and a community fanatic having led sessions at nearly 100 community events across North America. When he&amp;#39;s not developing software solutions or engaging with the community about software technology, Steve is a closet singer and songwriter and plays the guitar and keys. Occasionally, Steve even gets to sleep. Occasionally.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Steve’s Links:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://GeekGive.org" target="_blank"&gt;Geek Give&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://GeekRoadTrip.com" target="_blank"&gt;Geek Road Trip&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://platinumbay.com" target="_blank"&gt;Steve’s Blog&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=91519" width="1" height="1"&gt;</description></item><item><title>Pluralcast 19 : OData with Matt Milner</title><link>http://www.pluralsight-training.net/community/blogs/pluralcast/archive/2010/07/05/pluralcast-19-odata-with-matt-milner.aspx</link><pubDate>Mon, 05 Jul 2010 21:50:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:90497</guid><dc:creator>david-starr</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_019_odata.mp3"&gt;&lt;img height="24" width="24" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/pluralcast/PlayIcon_5F00_0DDE4823.png" alt="PlayIcon" border="0" title="PlayIcon" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt;&amp;nbsp; &lt;a target="_blank" href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_019_odata.mp3"&gt;Listen to this Episode&lt;/a&gt; [45:12]&lt;/p&gt;
&lt;p&gt;What&amp;rsquo;s all this OData talk? Find out in this episode with Matt Milner, who helps us understand this new way of publishing and consuming data on the web. Matt also tells us about a project he recently did for Pluralsight in which he published his first &amp;ldquo;real&amp;rdquo; OData feed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/pluralcast/matt_5F00_milner_5F00_2D8D21EB.jpg"&gt;&lt;img height="156" width="134" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/pluralcast/matt_5F00_milner_5F00_thumb_5F00_0C99AF44.jpg" align="right" alt="matt_milner" border="0" title="matt_milner" style="border-right-width:0px;margin:5px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; Matt Milner&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Matt is a member of the technical staff at Pluralsight, where he focuses on connected systems technologies (WCF, Windows WF, BizTalk, &amp;quot;Dublin&amp;quot; and the Azure Services Platform). Matt is also an independent consultant specializing in Microsoft .NET application design and development. As a writer Matt has contributed to several journals and magazines including MSDN Magazine where he currently authors the workflow content for the Foundations column. Matt regularly shares his love of technology by speaking at local, regional and international conferences such as Tech Ed. Microsoft has recognized Matt as an MVP for his community contributions around connected systems technology.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Show Links&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a target="_blank" href="http://www.odata.org/"&gt;OData.org&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.pluralsight.com/OData%20"&gt;The Pluralsight OData Feed&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/data/ee844254.aspx"&gt;OData Q&amp;amp;A on MSDN&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://www.pluralsight-training.net/microsoft/olt/Course.aspx?n=odata-introduction"&gt;Online OData Course&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;@milnertweet &amp;ndash; &lt;a target="_blank" href="http://twitter.com/milnertweet"&gt;Matt on Twitter&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=90497" width="1" height="1"&gt;</description></item><item><title>SoCal Code Camp</title><link>http://www.pluralsight-training.net/community/blogs/keith/archive/2010/06/28/socal-code-camp.aspx</link><pubDate>Mon, 28 Jun 2010 19:26:59 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:90092</guid><dc:creator>keith-brown</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;It was great meeting all of you at the camp! Thanks for coming to my talk, “Get a Whiff of WIF”. The slides and demos can be found &lt;a href="http://pluralsight-free.s3.amazonaws.com/keith-brown/shows/2010-06-socal-code-camp.zip"&gt;here&lt;/a&gt;. If you attended the camp, don’t forget to activate your free 7-day subscription to &lt;a href="http://www.pluralsight-training.net/microsoft/olt/default.aspx"&gt;Pluralsight &lt;em&gt;On-Demand!&lt;/em&gt;&lt;/a&gt; You’ll be able to see *all* of our courses without restriction!&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=90092" width="1" height="1"&gt;</description></item><item><title>Two helpful updates for Windows Server AppFabric</title><link>http://www.pluralsight-training.net/community/blogs/matt/archive/2010/06/21/two-helpful-updates-for-windows-server-appfabric.aspx</link><pubDate>Mon, 21 Jun 2010 21:08:20 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89928</guid><dc:creator>matt-milner</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;From Damir Dobric (&lt;a title="http://developers.de/blogs/damir_dobric" href="http://developers.de/blogs/damir_dobric"&gt;http://developers.de/blogs/damir_dobric&lt;/a&gt;):&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Patch to fix an issue where autostart services start in the wrong application pool:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/kb/983484" href="http://support.microsoft.com/kb/983484"&gt;http://support.microsoft.com/kb/983484&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This only applies to Windows 7 and Server 2008 R2 as IIS 7.5 is the only supported platform for autostart in a service.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Patch to fix issues where the IIS Manager or PowerShell cmdlets fail due to schema issues in IIS configuration files.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/kb/980423" href="http://support.microsoft.com/kb/980423"&gt;http://support.microsoft.com/kb/980423&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;There are a number of different error messages that result from this core issue.&amp;#160; In addition to this patch, you should already have installed the hotfix described in the following article:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/kb/970773" href="http://support.microsoft.com/kb/970773"&gt;http://support.microsoft.com/kb/970773&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89928" width="1" height="1"&gt;</description><category domain="http://www.pluralsight-training.net/community/blogs/matt/archive/tags/Dublin/default.aspx">Dublin</category><category domain="http://www.pluralsight-training.net/community/blogs/matt/archive/tags/AppFabric/default.aspx">AppFabric</category></item><item><title>Pluralcast 18 : BDD in .NET with StoryQ</title><link>http://www.pluralsight-training.net/community/blogs/pluralcast/archive/2010/06/21/pluralcast-18-bdd-in-net-with-storyq.aspx</link><pubDate>Mon, 21 Jun 2010 18:39:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89925</guid><dc:creator>david-starr</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_018_storyq.mp3"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="PSODPlayIcon24" border="0" alt="PSODPlayIcon24" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/pluralcast/PSODPlayIcon24_5F00_2DDE0132.png" width="24" height="24" /&gt;&lt;/a&gt;&amp;#160;&amp;#160; &lt;b&gt;&lt;a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_018_storyq.mp3" target="_blank"&gt;Listen to this episode&lt;/a&gt;&lt;/b&gt;&lt;b&gt;!&lt;/b&gt; [31:03]&lt;/p&gt;  &lt;p&gt;This episode is a visit with Rob Fonseca-Ensor, the HCIC (Head Craftsman in Charge) of StoryQ, a BDD testing framework for .NET. I used StoryQ in &lt;a href="http://www.msteched.com/2010/NorthAmerica/DPR302" target="_blank"&gt;this talk&lt;/a&gt; at TechEd 2010 and have used it in production for awhile now. I really like this framework as a vehicle for helping get minds wrapped around the concepts of BDD and for including business folks in our specification discussions.&lt;/p&gt;  &lt;p&gt;Rob shares the genesis of the tool and how it works, along with some great nuggets on BDD along the way.&lt;/p&gt;  &lt;h2&gt;Rob Fonseca-Ensor&lt;/h2&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;margin:5px;display:inline;border-top:0px;border-right:0px;" title="highres_9587862" border="0" alt="highres_9587862" align="right" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/pluralcast/highres_5F00_9587862_5F00_76726F6B.jpg" width="244" height="184" /&gt; &lt;/p&gt;  &lt;p&gt;Rob Fonseca-Ensor is a New Zealander living in London, working as a .NET consultant for Infusion Development. Founder of the nascent &lt;a href="http://www.meetup.com/cwdnug"&gt;Canary Wharf .Net User Group&lt;/a&gt;, Rob has a keen interest in all things agile. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Rob’s Links&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://storyq.codeplex.com" target="_blank"&gt;Get StoryQ&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://flit.codeplex.com" target="_blank"&gt;FLIT&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.robfe.com" target="_blank"&gt;Rob’s blog&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.goneopen.com/2010/03/test-automation-pyramid-asp-net-mvc/" target="_blank"&gt;Todd’s blog&lt;/a&gt; (re: the test automation pyramid)&lt;/li&gt; &lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89925" width="1" height="1"&gt;</description></item><item><title>Interested in web services interoperability with WCF?</title><link>http://www.pluralsight-training.net/community/blogs/matt/archive/2010/06/21/interested-in-web-services-interoperability-with-wcf.aspx</link><pubDate>Mon, 21 Jun 2010 16:38:38 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89922</guid><dc:creator>matt-milner</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Then go take this survey and let Microsoft feel your pain!&amp;#160; Not sure anyone will get zapped by their chair when you send feedback, but the team is actively looking into how to make the interop story better, so be sure to get your voice heard.&amp;#160; Oh, and it’s a short survey so not a huge time commitment.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://mymfe.microsoft.com/Feedback.aspx?formID=283"&gt;http://mymfe.microsoft.com/Feedback.aspx?formID=283&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89922" width="1" height="1"&gt;</description><category domain="http://www.pluralsight-training.net/community/blogs/matt/archive/tags/Windows+Communication+Foundation/default.aspx">Windows Communication Foundation</category></item><item><title>Custom web faults with System.ServiceModel.Web 3.x</title><link>http://www.pluralsight-training.net/community/blogs/matt/archive/2010/06/14/custom-web-faults-with-system-servicemodel-web-3-x.aspx</link><pubDate>Mon, 14 Jun 2010 21:04:14 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89793</guid><dc:creator>matt-milner</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;A former student approached me with a problem related to the Web programming model using WCF in .NET 3.5.&amp;nbsp; In short, he was using a custom IErrorHandler to create a custom fault message, but the client was always receiving a generic error.&amp;nbsp; Even more of a problem was that the custom error was an HTML formatted message, despite having set the response format on the service to JSON.&amp;nbsp; This caused big problems for the AJAX client trying to reason over that response.&amp;nbsp; I knew that WCF REST Starter Kit and WCF 4 both allowed for custom error messages, so I did some digging to see what might be at the root of the problem.&amp;nbsp; It turns out that the WebHttpBehavior inserts its own IErrorHandler and it was getting in the way of the custom handler he was adding.&amp;nbsp; After pointing this out to Dave, he quickly realized he could create a class that derived from the WebHttpBehavior and override the AddServerErrorHandlers to insert his own error handler.&amp;nbsp; He also created the requisite BehaviorExtensionElement so the new endpoint behavior could be added in the configuration file.&amp;nbsp; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;JsonWebHttpBehavior &lt;/span&gt;: &lt;span style="color:#2b91af;"&gt;WebHttpBehavior
    &lt;/span&gt;{
        &lt;span style="color:blue;"&gt;protected override void &lt;/span&gt;AddServerErrorHandlers(&lt;span style="color:#2b91af;"&gt;ServiceEndpoint &lt;/span&gt;endpoint,
        System.ServiceModel.Dispatcher.&lt;span style="color:#2b91af;"&gt;EndpointDispatcher &lt;/span&gt;endpointDispatcher)
        {
            endpointDispatcher.DispatchRuntime.ChannelDispatcher.ErrorHandlers.Add(
               &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;JsonErrorHandler&lt;/span&gt;(endpointDispatcher.DispatchRuntime.ChannelDispatcher.IncludeExceptionDetailInFaults));
        }
    }

    &lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;JsonWebHttpElement &lt;/span&gt;: &lt;span style="color:#2b91af;"&gt;BehaviorExtensionElement
    &lt;/span&gt;{
        &lt;span style="color:blue;"&gt;protected override object &lt;/span&gt;CreateBehavior()
        {
            &lt;span style="color:blue;"&gt;return new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;JsonWebHttpBehavior&lt;/span&gt;();
        }

        &lt;span style="color:blue;"&gt;public override &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Type &lt;/span&gt;BehaviorType
        {
            &lt;span style="color:blue;"&gt;get &lt;/span&gt;{ &lt;span style="color:blue;"&gt;return typeof&lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;JsonWebHttpBehavior&lt;/span&gt;); }
        }
    }
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&lt;span style="color:#2b91af;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;
&lt;p&gt;The job of the custom error handler is to create a custom fault class that provides data back to the calling application.&amp;nbsp; This solution nicely takes into consideration the IncludeExceptionDetailsInFaults property to correctly send the details only when configured to do so.&amp;nbsp; In this case, the status code is always set to 500 to trigger the correct error handling in the client library, but you could also modify this to send more specific HTTP status codes depending on the error message caught on the server.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/span&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class="code"&gt;[&lt;span style="color:#2b91af;"&gt;DataContract&lt;/span&gt;]
    &lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;JsonFault
    &lt;/span&gt;{
        [&lt;span style="color:#2b91af;"&gt;DataMember&lt;/span&gt;]
        &lt;span style="color:blue;"&gt;public string &lt;/span&gt;ExceptionType;

        [&lt;span style="color:#2b91af;"&gt;DataMember&lt;/span&gt;]
        &lt;span style="color:blue;"&gt;public string &lt;/span&gt;Message;

        [&lt;span style="color:#2b91af;"&gt;DataMember&lt;/span&gt;]
        &lt;span style="color:blue;"&gt;public string &lt;/span&gt;StackTrace;
    }

    &lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;JsonErrorHandler &lt;/span&gt;: &lt;span style="color:#2b91af;"&gt;IErrorHandler
    &lt;/span&gt;{
        &lt;span style="color:blue;"&gt;public &lt;/span&gt;JsonErrorHandler(&lt;span style="color:blue;"&gt;bool &lt;/span&gt;includeExceptionDetailInFaults)
        {
            &lt;span style="color:blue;"&gt;this&lt;/span&gt;.includeExceptionDetailInFaults = includeExceptionDetailInFaults;
        }

        &lt;span style="color:blue;"&gt;public bool &lt;/span&gt;HandleError(&lt;span style="color:#2b91af;"&gt;Exception &lt;/span&gt;error)
        {
            &lt;span style="color:blue;"&gt;return false&lt;/span&gt;;
        }

        &lt;span style="color:blue;"&gt;public void &lt;/span&gt;ProvideFault(&lt;span style="color:#2b91af;"&gt;Exception &lt;/span&gt;error,
            System.ServiceModel.Channels.&lt;span style="color:#2b91af;"&gt;MessageVersion &lt;/span&gt;version,
            &lt;span style="color:blue;"&gt;ref &lt;/span&gt;System.ServiceModel.Channels.&lt;span style="color:#2b91af;"&gt;Message &lt;/span&gt;fault)
        {
            &lt;span style="color:#2b91af;"&gt;JsonFault &lt;/span&gt;jsonFault;
            &lt;span style="color:blue;"&gt;if &lt;/span&gt;(includeExceptionDetailInFaults)
            {
                jsonFault = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;JsonFault
                &lt;/span&gt;{
                    ExceptionType = error.GetType().FullName,
                    Message = error.Message,
                    StackTrace = error.StackTrace
                };
            }
            &lt;span style="color:blue;"&gt;else
            &lt;/span&gt;{
                jsonFault = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;JsonFault
                &lt;/span&gt;{
                    ExceptionType = &lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(System.&lt;span style="color:#2b91af;"&gt;Exception&lt;/span&gt;).FullName,
                    Message =
                        &lt;span style="color:#a31515;"&gt;&amp;quot;An error occurred on the server. See server logs for details.&amp;quot;&lt;/span&gt;,
                    StackTrace = &lt;span style="color:blue;"&gt;null
                &lt;/span&gt;};
            }

            &lt;span style="color:#2b91af;"&gt;DataContractJsonSerializer &lt;/span&gt;serializer =
                &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;DataContractJsonSerializer&lt;/span&gt;(&lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;JsonFault&lt;/span&gt;));

            fault = &lt;span style="color:#2b91af;"&gt;Message&lt;/span&gt;.CreateMessage(version, &lt;span style="color:blue;"&gt;null&lt;/span&gt;, jsonFault, serializer);
            fault.Properties.Add(&lt;span style="color:#2b91af;"&gt;WebBodyFormatMessageProperty&lt;/span&gt;.Name,
                &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;WebBodyFormatMessageProperty&lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;WebContentFormat&lt;/span&gt;.Json));
            &lt;span style="color:#2b91af;"&gt;WebOperationContext&lt;/span&gt;.Current.OutgoingResponse.ContentType = &lt;span style="color:#a31515;"&gt;&amp;quot;application/json&amp;quot;&lt;/span&gt;;
            &lt;span style="color:#2b91af;"&gt;WebOperationContext&lt;/span&gt;.Current.OutgoingResponse.StatusCode =
                System.Net.&lt;span style="color:#2b91af;"&gt;HttpStatusCode&lt;/span&gt;.InternalServerError;
        }

        &lt;span style="color:blue;"&gt;private bool &lt;/span&gt;includeExceptionDetailInFaults;
    }
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You could certainly make modifications to only provide faults for certain types of exceptions (which is what .NET 4 does) log information in the HandleError method, etc.&amp;nbsp; Many thanks to Dave Grundgeiger for the inspiration to look into this and the final solution which he designed and allowed me to share here.&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89793" width="1" height="1"&gt;</description><category domain="http://www.pluralsight-training.net/community/blogs/matt/archive/tags/Windows+Communication+Foundation/default.aspx">Windows Communication Foundation</category></item><item><title>Pluralsight is giving an iPad to one lucky TechEd attendee</title><link>http://www.pluralsight-training.net/community/blogs/aaron/archive/2010/06/12/pluralsight-is-giving-an-ipad-to-one-lucky-teched-attendee.aspx</link><pubDate>Sat, 12 Jun 2010 23:10:21 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89718</guid><dc:creator>Aaron Skonnard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;At Pluralsight, we just released all of our &lt;a href="http://www.pluralsight-training.net/microsoft/olt/subscriptions.aspx"&gt;.NET training videos&lt;/a&gt; for the iPad. If you’re a subscriber, you can get them now.&lt;/p&gt;  &lt;p&gt;Last week at TechEd in New Orleans, we gave away 1000 complimentary subscriptions to the &lt;a href="http://www.pluralsight-training.net/microsoft/olt/subscriptions.aspx"&gt;Pluralsight &lt;em&gt;On-Demand!&lt;/em&gt; training library&lt;/a&gt;. It’s a white plastic card that looks something like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/aaron/PromoCardImage_5F00_6C21AC9F.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="PromoCardImage" border="0" alt="PromoCardImage" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/aaron/PromoCardImage_5F00_thumb_5F00_2055D5E6.png" width="242" height="158" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;If you &lt;strong&gt;activate this card by 6/18 (next Friday)&lt;/strong&gt;, you will receive a &lt;strong&gt;2-week subscription &lt;/strong&gt;to our training library and you’ll be automatically entered to win a &lt;strong&gt;brand new 64 GB iPad &lt;/strong&gt;sitting here on my desk (unopened). The winner will also receive a &lt;strong&gt;1-year Professional subscription &lt;/strong&gt;to &lt;a href="http://www.pluralsight-training.net/microsoft/olt/subscriptions.aspx"&gt;Pluralsight &lt;em&gt;On-Demand!&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;which makes it possible to fill up your the iPad with our .NET training courses.&lt;/p&gt;  &lt;p&gt;We will announce the winner on 6/21. Will we announce it on Twitter (follow &lt;a href="http://twitter.com/pluralsight"&gt;@pluralsight&lt;/a&gt;) and email the winner.&lt;/p&gt;  &lt;p&gt;Don’t forget to activate your card – it only takes a few seconds. Instructions are on the back. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89718" width="1" height="1"&gt;</description></item><item><title>Keith Brown’s TechEd NA 2010 Session Demos</title><link>http://www.pluralsight-training.net/community/blogs/keith/archive/2010/06/12/keith-brown-s-teched-na-2010-session-demos.aspx</link><pubDate>Sat, 12 Jun 2010 22:23:42 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89714</guid><dc:creator>keith-brown</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I was fortunate to be able to tag team a talk at TechEd New Orleans with &lt;a href="http://www.pluralsight-training.net/community/blogs/aaron/default.aspx"&gt;Aaron Skonnard&lt;/a&gt; this week, and I wanted to post my bits from the demos we did.&lt;/p&gt;  &lt;p&gt;There were three parts to my demo. The first part was where Aaron added in an attribute on his Presentation Feed service to require a claim before granting access to the feed. You can get the code for his service and my WCF behavior attribute from his demos &lt;a href="http://www.pluralsight-training.net/community/blogs/aaron/archive/2010/06/12/aaron-skonnard-s-teched-na-2010-session-demos.aspx"&gt;here&lt;/a&gt;. The code for the client that authenticates with ACS to get a token to send in the Authorization header to Aaron’s service can be found in my demos (below). It’s in the PresentationFeedClient folder.&lt;/p&gt;  &lt;p&gt;The second part of my demo used a simple string reverser service that I built in ASP.NET MVC. Once again, I simply authenticated directly with ACS, got a token, and sent it to the service as part of the Authorization header.&lt;/p&gt;  &lt;p&gt;The third part of my demo simulated an enterprise single sign on. I used &lt;a href="http://blogs.msdn.com/b/justinjsmith/archive/2009/11/14/acs-saml-adfs-v2-sample.aspx"&gt;Justin Smith’s “mini ADFS” simulator&lt;/a&gt; to issue a SAML token to my client, simulating a logon request to a real ADFS federation server in a domain. I then sent this SAML token up to ACS and got back a SWT (Simple Web Token) which I sent to my string reverser service, which allowed me in.&lt;/p&gt;  &lt;p&gt;The service and client for these last two parts can also be found in the StringReverser folder of my demos (below). I also included a copy of Justin’s MiniADFS server as part of the solution. I hope he doesn’t mind! You’ll need to install the &lt;a href="http://www.microsoft.com/Downloads/details.aspx?familyid=C148B2DF-C7AF-46BB-9162-2C9422208504&amp;amp;displaylang=en"&gt;Windows Identity Foundation SDK&lt;/a&gt; to run this third demo, as that’s where the SAML and WS-Trust support comes from.&lt;/p&gt;  &lt;p&gt;I used the sample ACS Management Browser from the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=39856a03-1490-4283-908f-c8bf0bfad8a5"&gt;Azure AppFabric SDK&lt;/a&gt; to set up a very simple policy in ACS to issue the tokens needed by the services. I included a copy of the policy in the policy.xml file. Nothing fancy here – just simple rules based on issuer claims.&lt;/p&gt;  &lt;p&gt;Download my demos &lt;a href="http://pluralsight-free.s3.amazonaws.com/keith-brown/shows/2010-06-TechEd-ACS-demos.zip"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Thanks to those who turned in evaluations. Our talk was number three in our track thanks to you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89714" width="1" height="1"&gt;</description><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/Security/default.aspx">Security</category><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/Geek+talk/default.aspx">Geek talk</category><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/Identity/default.aspx">Identity</category></item><item><title>Aaron Skonnard’s TechEd NA 2010 Session Demos</title><link>http://www.pluralsight-training.net/community/blogs/aaron/archive/2010/06/12/aaron-skonnard-s-teched-na-2010-session-demos.aspx</link><pubDate>Sat, 12 Jun 2010 18:51:57 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89703</guid><dc:creator>Aaron Skonnard</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;TechEd North America 2010 is a wrap.&amp;#160; You can grab the demos from both of my sessions &lt;a href="http://pluralsight-free.s3.amazonaws.com/aaron-skonnard/shows/2010-06-TechedNA-Demos.zip"&gt;here&lt;/a&gt;.&amp;#160; Hope you enjoyed them. &lt;/p&gt;  &lt;p&gt;Feel free to connect with me on Twitter (&lt;a href="http://twitter.com/skonnard"&gt;@skonnard&lt;/a&gt;) to stay in touch after the event.&amp;#160; Also, I’ll be posting a bunch of pictures from the week to the &lt;a href="http://www.facebook.com/pluralsight?ref=ts"&gt;Pluralsight .NET Training&lt;/a&gt; page on Facebook.&lt;/p&gt;  &lt;p&gt;One of my favorite experiences from the week: we ran into a street band while walking back to the hotel one night, they were jamming New Orleans style and everyone was watching this little girl dance away. Awesome.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/aaron/IMG_5F00_2118_5F00_2B9617D5.jpg"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="IMG_2118" border="0" alt="IMG_2118" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/aaron/IMG_5F00_2118_5F00_thumb_5F00_63D48EED.jpg" width="182" height="242" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89703" width="1" height="1"&gt;</description></item><item><title>Pluralsight makes virtual training available On-Demand!</title><link>http://www.pluralsight-training.net/community/blogs/aaron/archive/2010/06/07/pluralsight-makes-virtual-training-available-on-demand.aspx</link><pubDate>Mon, 07 Jun 2010 14:11:28 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89494</guid><dc:creator>Aaron Skonnard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Pluralsight is excited to announce a new addition to the product line-up: &lt;strong&gt;&lt;em&gt;virtual classroom&lt;/em&gt; &lt;em&gt;training&lt;/em&gt;&lt;/strong&gt;! &lt;/p&gt;  &lt;p&gt;We’ve actually been doing virtual classroom deliveries since the beginning of the company over 6 years ago, but it was only upon request. Now, the virtual classroom is a first-class citizen in our training delivery strategy.&lt;/p&gt;  &lt;p&gt;You can learn all about our new addition on the new &lt;a href="http://www.pluralsight-training.net/microsoft/vil/default.aspx"&gt;virtual training landing page&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.pluralsight-training.net/microsoft/vil/default.aspx"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="NewVirtualPage" border="0" alt="NewVirtualPage" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/aaron/NewVirtualPage_5F00_2E34D12E.png" width="242" height="172" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Our public virtual courses are &lt;strong&gt;5 days long, 3 hours each day&lt;/strong&gt;. You’ll be assigned homework lab exercises to complete on your own before the next day of class. The first 40 min of each day will be spent reviewing the lab exercises from the previous day. You will cover 10 learning modules during the 5 day course, about 2 modules/day. &lt;/p&gt;  &lt;p&gt;This usually equates to 80% of what we cover in our &lt;a href="http://www.pluralsight-training.net/ilt/courses.aspx"&gt;in-person classroom courses&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;To attend a virtual course, all you need is a browser and you’ll be up and running within minutes. Any software you need will be installed on-demand. Software setup for labs is described in detail for each course, and varies by course, so the instructor will guide you through the setup on the first day of instruction.&lt;/p&gt;  &lt;p&gt;During the course, you’ll develop a relationship with your instructor as you ask your questions and apply what you’re learning to your job. Our instructors are the best in the business, especially in this delivery format.&lt;/p&gt;  &lt;p&gt;The most compelling thing about virtual is the price. &lt;strong&gt;You can register for any course for $499.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The virtual training experience becomes even more effective when combined with our &lt;a href="http://www.pluralsight-training.net/microsoft/olt/subscriptions.aspx"&gt;Pluralsight &lt;em&gt;On-Demand!&lt;/em&gt; training subscriptions&lt;/a&gt;. With an &lt;em&gt;On-Demand! s&lt;/em&gt;ubscription, you can review course materials and demos between virtual sessions, and get answers to your questions even when the live instructor isn’t there. You can also explore related topics along the way to enhance and deepen your understand, as you prepare for the next day.&lt;/p&gt;  &lt;p&gt;Given the synergy between the virtual and &lt;em&gt;On-Demand!&lt;/em&gt; training options, we’ve packaged virtual training benefits into some of our &lt;a href="http://www.pluralsight-training.net/microsoft/olt/subscriptions.aspx"&gt;&lt;em&gt;On-Demand! &lt;/em&gt;subscription plans&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.pluralsight-training.net/microsoft/olt/subscriptions.aspx"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="NewPlans" border="0" alt="NewPlans" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/aaron/NewPlans_5F00_542A8184.png" width="242" height="195" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Premium&lt;/strong&gt; subscriptions will now include &lt;strong&gt;1 virtual training voucher&lt;/strong&gt;, which will allow them to register for any of our 5-day virtual courses scheduled within their yearly subscription. We are also adding a new &lt;strong&gt;Ultimate &lt;/strong&gt;subscription that comes with a full premium On-Demand! subscription plus &lt;strong&gt;3 virtual training vouchers&lt;/strong&gt;. This provides an unparalleled value when deciding how to spend your training dollar for the year.&lt;/p&gt;  &lt;p&gt;We are very excited about these new additions and the additional value they’ll provide our customers. If you’re at TechEd this week, &lt;a href="http://www.pluralsight-training.net/community/blogs/aaron/archive/2010/06/07/pluralsight-at-teched-2010-in-nola.aspx"&gt;come by the booth&lt;/a&gt; to learn more.&lt;/p&gt;  &lt;p&gt;You can begin registering for virtual events today, but the new Ultimate subscription and &lt;em&gt;On-Demand! &lt;/em&gt;integration won’t be complete for another month. We’ll make another announcement once it goes live, so stay tuned.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://pluralsight-free.s3.amazonaws.com/aaron-skonnard/psod-new-features-06-2010.wmv"&gt;&lt;strong&gt;Listen to a short private Webcast where we announced these changes to our customers.&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://pluralsight-free.s3.amazonaws.com/aaron-skonnard/PluralsightPresentationV3.mov"&gt;&lt;strong&gt;Watch a short promotional video playing at our TechEd booth this week.&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89494" width="1" height="1"&gt;</description></item><item><title>Pluralcast 17 : M, the Modeling Language</title><link>http://www.pluralsight-training.net/community/blogs/pluralcast/archive/2010/06/07/pluralcast-17-m-the-modeling-language.aspx</link><pubDate>Mon, 07 Jun 2010 13:27:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89488</guid><dc:creator>david-starr</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;a target="_blank" href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_017_m.mp3"&gt;&lt;img height="24" width="24" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/pluralcast/PSODPlayIcon24_5F00_2DDE0132_5F00_056790B7.png" alt="PSODPlayIcon24_2DDE0132" border="0" title="PSODPlayIcon24_2DDE0132" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;strong&gt;&lt;a target="_blank" href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_017_m.mp3"&gt;Listen to this episode&lt;/a&gt;! [35:36]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Microsoft Regional Director and Connected Systems MVP, Stuart Celarier joined me for a discussion of M, DSLs, and other things modeling related at the 2010 Seattle Code Camp. If you have heard of the M language and wondered if it was:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An AI app that generates the liner notes to Madam Butterfly &lt;/li&gt;
&lt;li&gt;A reaction to a good meal &lt;/li&gt;
&lt;li&gt;The sound a DBA makes when not really listening to what&amp;rsquo;s being said &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;then this show is for you!&lt;/p&gt;
&lt;p&gt;This show is a few weeks old, as you can tell from some of the references to &amp;ldquo;last week&amp;rdquo; when those things actually occurred &amp;ldquo;last month&amp;rdquo;. That said, I finally understand what all this M and Oslo conversation is all about! Terrific!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;table width="582" cellpadding="2" cellspacing="0" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="200" valign="top"&gt;&amp;nbsp;&lt;img height="244" width="194" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/pluralcast/stuart_5F00_6B935A87.jpg" alt="stuart" border="0" title="stuart" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt; &lt;/td&gt;
&lt;td width="380" valign="top"&gt;           
&lt;ul&gt;
&lt;strong&gt;Stuart&amp;rsquo;s Links                &lt;br /&gt;                &lt;br /&gt;&lt;/strong&gt;
&lt;li&gt;&lt;a target="_blank" href="http://visualstuart.net/"&gt;Visual Stuart&lt;/a&gt; (Stuart&amp;#39;s&amp;nbsp;Blog) &lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://twitter.com/vstuart"&gt;Stuart on Twitter&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/dd129519(VS.85).aspx"&gt;M on MSDN&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=29e4ead0-fd81-42ba-862b-f3589378466a&amp;amp;displaylang=en"&gt;SQL Server Modeling CTP&lt;/a&gt; (download) &lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/dd129873.aspx"&gt;SQL Server Modeling CTP Questions and Answers&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/dd578304%28v=MSDN.10%29.aspx"&gt;Questions and Answers &amp;ndash; &amp;quot;M&amp;quot; Modeling Language&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://www.microsoft.com/interop/osp/default.mspx"&gt;Microsoft Open Promise&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/dd861709(VS.85).aspx"&gt;IntelliPad&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89488" width="1" height="1"&gt;</description></item><item><title>Pluralsight + InnerWorkings .NET Training Special</title><link>http://www.pluralsight-training.net/community/blogs/aaron/archive/2010/06/07/pluralsight-innerworkings-net-training-special-teched-2010.aspx</link><pubDate>Mon, 07 Jun 2010 13:10:50 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89486</guid><dc:creator>Aaron Skonnard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Having a hard time choosing between Pluralsight and InnerWorkings? This week at TechEd you don’t have to! &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.pluralsight-training.net/microsoft"&gt;Pluralsight&lt;/a&gt; has joined forces with &lt;a href="http://www.innerworkings.com/"&gt;InnerWorkings&lt;/a&gt; to provide an amazing &lt;strong&gt;&lt;em&gt;.NET training special &lt;/em&gt;&lt;/strong&gt;to attendees this week. Both companies offer best-of-breed .NET training solutions that are very complementary to one another. Pluralsight offers the highest quality &lt;a href="http://www.pluralsight-training.net/microsoft/olt/subscriptions.aspx"&gt;&lt;em&gt;On-Demand!&lt;/em&gt; training videos&lt;/a&gt; on the market while InnerWorkings offers an &lt;a href="http://www.innerworkings.com/solutions"&gt;innovative hands-on learning solution&lt;/a&gt; fully integrated with Visual Studio. Combining these two best-of-breed solutions offers you an unparalleled self-paced learning environment for ramping-up on .NET technologies.&lt;/p&gt;  &lt;p&gt;All Teched 2010 attendees have the opportunity to purchase a full subscription to both training libraries for the price of one. Simply &lt;strong&gt;&lt;em&gt;visit the Pluralsight or InnerWorkings booth&lt;/em&gt;&lt;/strong&gt; this week to register for the offer.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/aaron/poster_5F00_almost_5F00_final_5F00_6B188CF7.jpg"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="poster_almost_final" border="0" alt="poster_almost_final" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/aaron/poster_5F00_almost_5F00_final_5F00_thumb_5F00_2DA82870.jpg" width="163" height="242" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89486" width="1" height="1"&gt;</description></item><item><title>Pluralsight sessions at Teched this week</title><link>http://www.pluralsight-training.net/community/blogs/aaron/archive/2010/06/07/pluralsight-sessions-at-teched-this-week.aspx</link><pubDate>Mon, 07 Jun 2010 12:35:24 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89478</guid><dc:creator>Aaron Skonnard</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Several members of the Pluralsight &lt;a href="http://www.pluralsight-training.net/microsoft/about/instructors.aspx"&gt;technical staff&lt;/a&gt; are here in New Orleans this week speaking at TechEd. Below you’ll find a list of their talks for easy reference.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;b&gt;&lt;i&gt;Aaron Skonnard&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;ASI312 What&amp;#39;s New in Windows Communication, &lt;/i&gt;&lt;i&gt;6/9/2010 11:45AM&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;ASI308 Programming AppFabric: Moving Microsoft .NET to the Cloud, &lt;/i&gt;&lt;i&gt;6/10/2010 3:15PM&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;b&gt;&lt;i&gt;Keith Brown&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;BOF07-DV Claims-Based Identity, &lt;/i&gt;&lt;i&gt;6/10/2010 8:00AM&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;ASI308 Programming AppFabric: Moving Microsoft .NET to the Cloud, &lt;/i&gt;&lt;i&gt;6/10/2010 3:15PM&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;b&gt;&lt;i&gt;Matt Milner&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;ASI201 Intro to Workflow Services and Windows Server AppFabric, &lt;/i&gt;&lt;i&gt;6/8/2010 1:30PM&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;BOF11-DV How Are YOU Using Windows Azure?, &lt;/i&gt;&lt;i&gt;6/8/2010 5:00PM&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;b&gt;&lt;i&gt;David Starr&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;BOF02-DV &lt;/i&gt;&lt;i&gt;What&amp;#39;s Really Happening with Agile Teams in the Wild?, &lt;/i&gt;&lt;i&gt;6/7/2010 2:45PM&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;BOF08-DV Behavior-Driven Development in the Wild, &lt;/i&gt;&lt;i&gt;6/9/2010 1:30PM&lt;/i&gt;&lt;/p&gt;    &lt;p&gt;&lt;i&gt;DPR302 &lt;/i&gt;&lt;i&gt;Behavior-Driven Development in the Real World, &lt;/i&gt;&lt;i&gt;6/10/2010 1:30PM&lt;/i&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In addition to this group, there are several Pluralsight &lt;a href="http://www.pluralsight-training.net/microsoft/about/instructors.aspx"&gt;technical contributors&lt;/a&gt; (&lt;em&gt;On-Demand! &lt;/em&gt;authors) here this week speaking, including &lt;em&gt;&lt;strong&gt;Julie Lerman, Kate Gregory, Dan Wahlin, Russ Fustino&lt;/strong&gt;&lt;/em&gt;, and several more who are actively authoring new courses for us right now. All of these folks are amazing speakers – so be sure to check them out. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89478" width="1" height="1"&gt;</description></item><item><title>Pluralsight at TechEd 2010 in NOLA</title><link>http://www.pluralsight-training.net/community/blogs/aaron/archive/2010/06/07/pluralsight-at-teched-2010-in-nola.aspx</link><pubDate>Mon, 07 Jun 2010 12:16:33 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89470</guid><dc:creator>Aaron Skonnard</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;a href="http://pluralsight.com"&gt;Pluralsight&lt;/a&gt; has a strong presence at Teched 2010 in New Orleans this week. About &lt;a href="http://www.pluralsight-training.net/microsoft/about/instructors.aspx"&gt;18 of us&lt;/a&gt; are here from Pluralsight, including full time staff, instructors, and&lt;em&gt; On-Demand!&lt;/em&gt; authors. Four of us are speaking at the show, including myself, Keith Brown, Matt Milner, and David Starr. If you’re here this week, please come by and say hello. We’d love to meet you in person and get your feedback on the Pluralsight training experience.&lt;/p&gt;  &lt;p&gt;We are in booth&lt;strong&gt;&lt;em&gt; #2544&lt;/em&gt;&lt;/strong&gt;, which is a little off the beaten path. When you enter the exhibit hall, it’s in the &lt;em&gt;&lt;strong&gt;back left corner&lt;/strong&gt;&lt;/em&gt; of the room. We have over &lt;strong&gt;&lt;em&gt;400 cool t-shirts&lt;/em&gt;&lt;/strong&gt; to give away, along with some complimentary &lt;em&gt;On-Demand!&lt;/em&gt; subscriptions (good for &lt;strong&gt;&lt;em&gt;2-weeks of free trai&lt;/em&gt;ning&lt;/strong&gt;), some full-year subscriptions that we’re raffling off each day, and details on how you can enter an &lt;strong&gt;&lt;em&gt;iPad drawing&lt;/em&gt;&lt;/strong&gt;, which will take place online a week after the event.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/aaron/photo_5F00_5E76A60F.jpg"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="photo" border="0" alt="photo" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/aaron/photo_5F00_thumb_5F00_0393F07C.jpg" width="242" height="182" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;We’re also doing a limited time &lt;strong&gt;&lt;em&gt;special promotion&lt;/em&gt;&lt;/strong&gt; with &lt;a href="http://www.innerworkings.com/"&gt;InnerWorkings&lt;/a&gt; for all TechEd attendees. It provides an amazing deal that allows TechEd attendees to purchase a full training subscription to both of our libraries for the price of one. You’ll need to come by either the Pluralsight or InnerWorkings booth to get registered for the offer before the end of the week. Then you’ll have until the end of the month to act on it.&lt;/p&gt;  &lt;p&gt;Pluralsight is making a few exciting product announcements this week, which I’ll write more about in a separate post. To summarize, we’re introducing &lt;a href="http://www.pluralsight-training.net/microsoft/vil/default.aspx"&gt;&lt;strong&gt;&lt;em&gt;virtual training&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; (think Live Meeting delivery) as a first class citizen in our product line-up – at an amazing price point I might add - and we’re incorporating virtual training benefits into our &lt;em&gt;&lt;a href="http://www.pluralsight-training.net/microsoft/olt/subscriptions.aspx"&gt;On-Demand! subscriptions&lt;/a&gt;&lt;/em&gt;. We are confident this new addition will drive more value to all Pluralsight customers, and especially &lt;em&gt;On-Demand! &lt;/em&gt;subscribers, and increase your training ROI throughout the year.&lt;/p&gt;  &lt;p&gt;Finally, Pluralsight is hosting a small &lt;em&gt;&lt;strong&gt;customer appreciation event&lt;/strong&gt;&lt;/em&gt; on Wed night in the French quarter. If you’re here, you can get an invite at the Pluralsight booth. Space is limited so come by early in the week.&lt;/p&gt;  &lt;p&gt;Have a great TechEd everyone!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89470" width="1" height="1"&gt;</description></item><item><title>Dynamically emitting types for unit tests</title><link>http://www.pluralsight-training.net/community/blogs/keith/archive/2010/06/02/dynamically-emitting-types-for-unit-tests.aspx</link><pubDate>Thu, 03 Jun 2010 02:47:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89360</guid><dc:creator>keith-brown</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I&amp;rsquo;m building a view engine for ASP.NET MVC 2 that locates views based on the type names of the controllers. To unit test the bits that construct a path from a namespace, I needed to have a bunch of different types of controllers, and using actual types was clearly going to get messy, so I synthesized my own dynamic types using Reflection.Emit. This particular example is hardcoded to produce classes that derive from System.Web.Mvc.Controller, but it&amp;rsquo;s a great start for anyone who wants to synthesize types for whatever reason. It was well worth 15 minutes of research and coding. Kudos to the .NET team for making it so easy!&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s an example of usage:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;var factory = &lt;span class="kwrd"&gt;new&lt;/span&gt; ControllerTypeFactory();
var type = factory.MakeControllerType(&lt;span class="str"&gt;&amp;quot;Foo.Bar.MyController&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;p&gt;The output from this call allows you to avoid having to write this:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Foo.Bar
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; MyController : Controller { }
}&lt;/pre&gt;
&lt;p&gt;If you want an instance instead of just the type, call MakeController instead, which simply adds a call to Activator.CreateInstance() on the dynamically created type.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s the code. Note that it creates a &amp;ldquo;RunAndCollect&amp;rdquo; assembly, which is great for simple cases like this because the assembly will be unloaded from the domain automatically once everything in it is collected. It&amp;rsquo;s making my unit tests green, which is making me smile.&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ControllerTypeFactory
{
    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; AssemblyBuilder assemblyBuilder;

    &lt;span class="kwrd"&gt;public&lt;/span&gt; ControllerTypeFactory()
    {
        var assemblyName = &lt;span class="kwrd"&gt;new&lt;/span&gt; AssemblyName(Guid.NewGuid().ToString());
        assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName,AssemblyBuilderAccess.RunAndCollect);
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; Type MakeControllerType(&lt;span class="kwrd"&gt;string&lt;/span&gt; controllerTypeName)
    {
        var moduleBuilder = assemblyBuilder.DefineDynamicModule(&lt;span class="str"&gt;&amp;quot;module&amp;quot;&lt;/span&gt;);
        &lt;span class="kwrd"&gt;const&lt;/span&gt; TypeAttributes typeAttributes = TypeAttributes.Public | TypeAttributes.Class;
        var parentType = &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(Controller);
        var typeBuilder = moduleBuilder.DefineType(controllerTypeName, typeAttributes, parentType);
        &lt;span class="kwrd"&gt;return&lt;/span&gt; typeBuilder.CreateType();
    }

    &lt;span class="kwrd"&gt;internal&lt;/span&gt; ControllerBase MakeController(&lt;span class="kwrd"&gt;string&lt;/span&gt; controllerTypeName)
    {
        var controllerType = MakeControllerType(controllerTypeName);
        &lt;span class="kwrd"&gt;return&lt;/span&gt; (ControllerBase)Activator.CreateInstance(controllerType);
    }
}&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89360" width="1" height="1"&gt;</description><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/Geek+talk/default.aspx">Geek talk</category><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/Testing/default.aspx">Testing</category></item><item><title>Types vs. Strings to identify controllers and simplify Areas in ASP.NET MVC 2</title><link>http://www.pluralsight-training.net/community/blogs/keith/archive/2010/06/02/types-vs-strings-to-identify-controllers-and-simplify-areas-in-asp-net-mvc-2.aspx</link><pubDate>Thu, 03 Jun 2010 00:50:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:89359</guid><dc:creator>keith-brown</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Ever since I started working out the RESTful routing strategy we&amp;rsquo;ll be using for our MVC apps at Pluralsight, I&amp;rsquo;ve been trying to avoid identifying controllers with strings in places like HtmlHelpers.ActionLink. It occurred to me early on that I&amp;rsquo;d much rather use type names to identify resources and controllers rather than string.&lt;/p&gt;
&lt;p&gt;If you have a WidgetController, why pass controller=&amp;ldquo;Widget&amp;rdquo; when you could specify the type of the controller instead? Then you&amp;rsquo;d see compile errors early, as opposed to having links with empty href elements because the HtmlHelper couldn&amp;rsquo;t find a matching route because you misspelled a controller name.&lt;/p&gt;
&lt;p&gt;You could solve this particular problem by using constants (controller = Controllers.Widget), I suppose. But then when you look at how Areas work, it sure would be nice having the type as part of the route.&lt;/p&gt;
&lt;p&gt;I suppose the reason controller names are passed around as strings so much is because of the default routes that ASP.NET MVC gives you when you run the wizard: {controller}/{id}/{action}. But for someone who wants to take a more RESTful approach, you don&amp;rsquo;t want this style of routing anyway, and you&amp;rsquo;ll be adding a bunch of custom routes instead of trying to use one generic URL pattern for routing.&lt;/p&gt;
&lt;p&gt;In large systems, {controller} isn&amp;rsquo;t enough to identify a controller anyway. You need to add areas to ensure uniqueness of controller names. Which leads me to the subject of this post (finally!) I&amp;rsquo;m wondering if anyone can think of any major drawback to simply removing {controller} from the values used in RouteData.Values and replace it with {controllerType} in RouteData.DataTokens. In one fell swoop you eliminate both controller names and area names from the equation.&lt;/p&gt;
&lt;p&gt;In large systems where you care about testing, you&amp;rsquo;re likely to be using ViewModels and modeling links to make them testable. So you won&amp;rsquo;t be using Html.ActionLink anyway, and it&amp;rsquo;s very natural to use controller types to build the models for links to controllers that you depend on.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve got a prototype of this working now, and it allows me to put my controllers wherever I like (they don&amp;rsquo;t have to be in the Controllers folder). My unit tests for resolving incoming requests and outgoing URL generation are all green.&lt;/p&gt;
&lt;p&gt;My next step is to build a custom view engine that looks for views based on the controller type. Once that&amp;rsquo;s wrapped up, I should have very natural support for &amp;ldquo;areas&amp;rdquo; that&amp;rsquo;s based on the types of the controllers, with a hierarchy that follows the namespace structure of the controllers, which should naturally resolve any naming conflicts that could arise. My initial thought about view resolution is that it&amp;rsquo;d be nice to be able to map an arbitrary prefix of the controller type (e.g. the first bit of the namespace) onto a root folder for the &amp;ldquo;area&amp;rdquo; then have the namespace-driven search algorithm take over from there, following the rest of the namespace down the folder tree from the &amp;ldquo;area&amp;rdquo; root. Might also be nice to have the view engine be able to pick up shared views from anywhere up the hierarchy.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Request to the MVC team:&lt;/strong&gt; I had to make one minor change to MvcHandler to be able to get ASP.NET MVC 2 to work this way. I changed MvcHandler.ProcessRequestInit from [private] to [protected virtual]. This allowed me to reuse the vast majority of MvcHandler (the async stuff would be a *** to reimplement). This seems like a really useful extensibility point.&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&lt;b&gt;Update (3 Jun 2010)&lt;/b&gt;: My view engine is complete, and it&amp;#39;s working like a charm. No more worrying about &amp;quot;areas&amp;quot; - I get a nice hierarchical site based on the structure of the namespaces of the types that I use in my application. If I run into any problems I&amp;#39;ll post them here, but it looks like this is a feasible way to implement a RESTful routing scheme.&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=89359" width="1" height="1"&gt;</description><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/Geek+talk/default.aspx">Geek talk</category><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Controlling TemplateDepth in ASP.NET MVC 2 Templates</title><link>http://www.pluralsight-training.net/community/blogs/keith/archive/2010/05/31/controlling-templatedepth-in-asp-net-mvc-2-templates.aspx</link><pubDate>Mon, 31 May 2010 17:43:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:88996</guid><dc:creator>keith-brown</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;In my last &lt;a href="http://www.pluralsight-training.net/community/blogs/keith/archive/2010/05/29/dynamically-structured-viewmodels-in-asp-net-mvc.aspx"&gt;post&lt;/a&gt;, I talked about how convenient it is to use MVC 2 templates to display data. I&amp;rsquo;ve been trying to use similar ideas to construct generic forms, but I&amp;rsquo;m running into a problem that I&amp;rsquo;m hoping there&amp;rsquo;s an easy way to fix.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve built a very simple example to demonstrate what I&amp;rsquo;m seeing: a Widget controller that allows you to Create new Widgets. I&amp;rsquo;m using the default route, nothing special. But I&amp;rsquo;m using view models, not domain models. Here they are:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; CreateWidgetPage
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; SummaryOfExistingWidgets;
    &lt;span class="kwrd"&gt;public&lt;/span&gt; CreateWidgetForm TheForm;
}

&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; CreateWidgetForm
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Name { get; set; }
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Color { get; set; }
}&lt;/pre&gt;
&lt;p&gt;The page I display when you GET /Widget/Create includes more than just a form. I&amp;rsquo;ve got some display-only details that I want to show the user when she&amp;rsquo;s about to create a widget. It doesn&amp;rsquo;t matter what it is, the point is that it&amp;rsquo;s not something that&amp;rsquo;s logically part of the form that I want posted back.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s the interesting part of the Create view, which relies on &lt;a href="http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-4-custom-object-templates.html"&gt;Brad&amp;rsquo;s tabular Object.ascx editor template&lt;/a&gt; to display a simple editable table for Name and Color:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;: Model.SummaryOfExistingWidgets &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Create&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; ...&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;= Html.EditorFor(m =&amp;gt; m.TheForm) &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;#39;submit&amp;#39;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;#39;Create&amp;#39;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;And the controller&amp;rsquo;s Create method that processes the form:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult Create(CreateWidgetForm formModel) 
{
   &lt;span class="rem"&gt;// ...&lt;/span&gt;
}&lt;/pre&gt;
&lt;p&gt;The ViewModel that is posted to Create has null values for both Name and Color. Why? Because the EditorFor helper is encoding the scoping element, &amp;ldquo;TheForm&amp;rdquo;, as a prefix on the names of the properties on the view model. If I inspect the HTML that is rendered with a GET to /Widget/Create, the Name property is represented like this:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;TheForm.Name&amp;quot;&lt;/span&gt; ... &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Clearly this isn&amp;rsquo;t going to bind well to CreateWidgetForm, which knows about a &amp;ldquo;Name&amp;rdquo;, not &amp;ldquo;TheForm.Name&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;In an effort to divorce CreateWidgetForm from its scope, I tried this:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; var theForm = Model.TheForm; &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;= Html.EditorFor(m =&amp;gt; theForm) &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;This didn&amp;rsquo;t help. The variable, &amp;ldquo;theForm&amp;rdquo;, ended up being used as the scope:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;theForm.Name&amp;quot;&lt;/span&gt; ... &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;I could see how someone using domain models directly in their views wouldn&amp;rsquo;t run into this problem. GET on the controller&amp;rsquo;s Create would return a Widget, say, and POST to the controller&amp;rsquo;s Create would send that exact same thing back. There&amp;rsquo;s no need for nesting the way I&amp;rsquo;ve done it here.&lt;/p&gt;
&lt;p&gt;It feels like what I need is a way to tell EditorFor that I want a new root. Don&amp;rsquo;t pay attention to the fact that TheForm is a property on some bigger object. I want TemplateDepth = 1 when we drill into EditorFor in the above examples. There&amp;rsquo;s probably some super easy way to do this that I&amp;rsquo;m just not finding.&lt;/p&gt;
&lt;p&gt;Indeed what I&amp;rsquo;m trying to achieve with ViewModels goes beyond the simplified example I&amp;rsquo;ve used above. I&amp;rsquo;m thinking it would be quite nice to have a very generic template for a create form. Something like this:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; CreateForm
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; PrettyNameForTheThingWeAreAboutToCreate;
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt; FormModel;
}&lt;/pre&gt;
&lt;p&gt;Coupled with a display template that looks something like this:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%@ Control Language=&amp;quot;C#&amp;quot; Inherits=&amp;quot;System.Web.Mvc.ViewUserControl&amp;lt;CreateForm&amp;gt;&amp;quot; %&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Create &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;: Model.PrettyNameForTheThingWeAreAboutToCreate&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h2&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; ...&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;= Html.EditorFor(m =&amp;gt; m.FormModel) &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;#39;submit&amp;#39;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;#39;Create&amp;#39;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;

&lt;/p&gt;
&lt;p&gt;I searched quite a bit to see if anyone else had posted about this issue and didn&amp;rsquo;t find anything, but I can&amp;rsquo;t be the first to run into this. What am I missing?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PROBLEM SOLVED (Thanks Brad :-)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The solution in my case is to use the overloaded version of EditorFor which allows you to control the prefix:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;= Html.EditorFor(m =&amp;gt; m.FormModel, null, &amp;quot;&amp;quot;) &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Worked like a charm!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=88996" width="1" height="1"&gt;</description><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/Geek+talk/default.aspx">Geek talk</category><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Dynamically Structured ViewModels in ASP.NET MVC</title><link>http://www.pluralsight-training.net/community/blogs/keith/archive/2010/05/29/dynamically-structured-viewmodels-in-asp-net-mvc.aspx</link><pubDate>Sat, 29 May 2010 17:26:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:88366</guid><dc:creator>keith-brown</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;We started building our website back in 2004, when ASP.NET WebForms were all the rage. I&amp;rsquo;ve finally bitten the bullet and started integrating MVC into our website so that going forward, we&amp;rsquo;ll have a cleaner architecture that allows for better testability, separation of concerns, etc. This transition has been a fun and challenging one.&lt;/p&gt;
&lt;p&gt;As part of this effort, I&amp;rsquo;ve done a lot of experimenting with different ways of implementing testable, maintainable views. There are a lot of good threads out there that touch on this. Here are a few that I happened to read this morning:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://codeclimber.net.nz/archive/2009/10/27/12-asp.net-mvc-best-practices.aspx"&gt;http://codeclimber.net.nz/archive/2009/10/27/12-asp.net-mvc-best-practices.aspx&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://geekswithblogs.net/michelotti/archive/2009/10/25/asp.net-mvc-view-model-patterns.aspx"&gt;http://geekswithblogs.net/michelotti/archive/2009/10/25/asp.net-mvc-view-model-patterns.aspx&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://www.arrangeactassert.com/asp-net-mvc-view-best-practices-keep-logic-out-of-your-views/"&gt;http://www.arrangeactassert.com/asp-net-mvc-view-best-practices-keep-logic-out-of-your-views/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A comment in the last thread by Jaime prompted me to write this post. I&amp;rsquo;m still not completely settled on the details of the techniques I think will work best for us at Pluralsight, but some ideas are definitely crystallizing, so I figured I&amp;rsquo;d jot them down here.&lt;/p&gt;
&lt;p&gt;For one thing, I&amp;rsquo;ve come to the conclusion that using ViewModels is pretty critical for us, since I want to be able to write automated tests that assure me that the dynamic data I want rendered is likely to actually be rendered. And I want those tests to be exposed to precisely the data that&amp;rsquo;s going to be rendered in the view &amp;ndash; no more and no less. Using domain models directly in views feels like a nice shortcut, but doesn&amp;rsquo;t lead to this outcome except in very simple cases.&lt;/p&gt;
&lt;p&gt;Another goal of mine is to eliminate *all* logic from the views themselves so the views become simply a way to interleave HTML tags with dynamic content.&lt;/p&gt;
&lt;p&gt;One of the first habits I worked on breaking was including &amp;ldquo;if&amp;rdquo; statements in views to manage optional sections. I used a lot of asp:Panel controls in my WebForm days, and it felt pretty natural to replace those panels with &amp;ldquo;if&amp;rdquo; statements in the view. After writing a couple of views this way, I quickly realized I was not going to get the level of testability I wanted. So instead of an &amp;ldquo;if&amp;rdquo; in the view checking a flag to see if an optional section should be rendered, I now take that section of the view and make another view model for it. Here&amp;rsquo;s a view model for showing a pencil with an optional erasor:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; SampleViewModels
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ShowPencil
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Brand { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; Erasor Erasor { get; set; }
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Erasor
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Color { get; set; }
    }
}&lt;/pre&gt;
&lt;p&gt;Once ShowPencil is constructed, my automated tests can walk over the structure and assert that Erasor is null or not based on the scenario I&amp;rsquo;m testing. To render the Erasor, I use a partial view, but I don&amp;rsquo;t use an &amp;ldquo;if&amp;rdquo; statement, as you&amp;rsquo;ll see later.&lt;/p&gt;
&lt;p&gt;I used a lot of asp:MultiView controls in my WebForms days. Now if I have a section of the view that needs to render one thing or another depending on business logic, I use a very similar approach to the Erasor, except I more loosely type the link to the child view model, such as I do with Mechanism below:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; SampleViewModels
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ShowPencilSharpener
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Brand { get; set; }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt; Mechanism { get; set; }
    }
    
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ElectricSharpeningMechanism
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; Voltage { get; set; }
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; MechanicalSharpeningMechanism
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;double&lt;/span&gt; ArmLength { get; set; }
    }
}&lt;/pre&gt;
&lt;p&gt;These techniques allow me to easily test right under the surface of my views. I say &amp;ldquo;easily&amp;rdquo; because it&amp;rsquo;s conceptually easy, but as business logic gets more complicated and views have more optional features, tests get more complicated as well, but that&amp;rsquo;s the price you pay for complicated business logic.&lt;/p&gt;
&lt;p&gt;Now the only trick is to build a set of views and partial views that can render these dynamically structured view models. It turns out the templating features[1] introduced in ASP.NET MVC 2 work very nicely for this. For example, here&amp;rsquo;s a what a partial view for ShowPencilSharpener might look like:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&amp;lt;%@ Control Language=&lt;span class="str"&gt;&amp;quot;C#&amp;quot;&lt;/span&gt; Inherits=&lt;span class="str"&gt;&amp;quot;System.Web.Mvc.ViewUserControl&amp;lt;SampleViewModels.ShowPencilSharpener&amp;gt;&amp;quot;&lt;/span&gt; %&amp;gt;

&amp;lt;div&amp;gt;
Brand: &amp;lt;%: Model.Brand %&amp;gt;
&amp;lt;/div&amp;gt;

&amp;lt;%= Html.DisplayFor(model =&amp;gt; model.Mechanism) %&amp;gt;&lt;/pre&gt;
&lt;p&gt;DisplayFor won&amp;rsquo;t show anything if model.Mechanism is null. But if there&amp;rsquo;s something there, it will use a well defined template resolution strategy[2] to find an appropriate partial view to use. And the view selected depends on the type of object that my controller (or better yet, my view model builder) put into the Mechanism property.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s say my view model used a MechanicalSharpeningMechanism. I write a custom display template (which is really just a partial view) so I can control how that section of the view should look. Another nice feature of breaking things up like this is that if any other view model uses MechanicalSharpeningMechanism, I can easily reuse that partial view for rendering that part of the view model, if it makes sense to do so. Here&amp;rsquo;s what that partial view might look like:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&amp;lt;%@ Control Language=&lt;span class="str"&gt;&amp;quot;C#&amp;quot;&lt;/span&gt; Inherits=&lt;span class="str"&gt;&amp;quot;System.Web.Mvc.ViewUserControl&amp;lt;SampleViewModels.MechanicalSharpeningMechanism&amp;gt;&amp;quot;&lt;/span&gt; %&amp;gt;

&amp;lt;div&amp;gt;
Arm length: &amp;lt;%: Model.ArmLength %&amp;gt; inches
&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;p&gt;This sort of view model composition seems really powerful to me. This morning I&amp;rsquo;m experimenting with new ways of generating forms based on this idea.&lt;/p&gt;
&lt;p&gt;Huge kudos to Brad Wilson for taking the time to walk us all through MVC 2 templates. His lucid explanation made my life much easier when I went searching for a way to render these dynamically structured view models.&lt;/p&gt;
&lt;p&gt;[1] &lt;a href="http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-1-introduction.html"&gt;http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-1-introduction.html&lt;/a&gt; 
  &lt;br /&gt;[2] &lt;a href="http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-3-default-templates.html"&gt;http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-3-default-templates.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=88366" width="1" height="1"&gt;</description><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/Geek+talk/default.aspx">Geek talk</category><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Pluralcast 16 : A Software Journeyman’s Journey</title><link>http://www.pluralsight-training.net/community/blogs/pluralcast/archive/2010/05/23/pluralcast-16-a-software-journeyman-s-journey.aspx</link><pubDate>Mon, 24 May 2010 01:43:22 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:83577</guid><dc:creator>david-starr</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_016_software_journeymans_journey.mp3"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="PSODPlayIcon24" border="0" alt="PSODPlayIcon24" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/pluralcast/PSODPlayIcon24_5F00_2DDE0132.png" width="24" height="24" /&gt;&lt;/a&gt;&amp;#160;&amp;#160; &lt;b&gt;&lt;a href="http://pluralsight-free.s3.amazonaws.com/pluralcast/pc_016_software_journeymans_journey.mp3" target="_blank"&gt;Listen to this episode&lt;/a&gt;&lt;/b&gt;&lt;b&gt;!&lt;/b&gt; [34:14]&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="495"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="493"&gt;         &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;margin:5px 5px 0px;display:inline;border-top:0px;border-right:0px;" title="liam" border="0" alt="liam" align="left" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/pluralcast/liam_5F00_1D899B72.png" width="131" height="131" /&gt;Liam McLennan is an independent software developer based in Brisbane, Australia. He recently packed&amp;#160; his bags and came to the U.S. to attend some developer community events, but in the week between events traveled across the country pairing with other developers. Liam shares tales of his travels in this episode along with some ideas on software craftsmanship.&lt;/p&gt;          &lt;p&gt;In his own words, Liam is an independent journeyman software shaman, mariner, hiker, and universal enthusiast.&lt;/p&gt;          &lt;p&gt;&lt;strong&gt;Show Links&lt;/strong&gt;&lt;/p&gt;          &lt;ul&gt;           &lt;li&gt;&lt;a href="http://hackingon.net/" target="_blank"&gt;Liam&amp;#39;s Blog&lt;/a&gt; &lt;/li&gt;            &lt;li&gt;&lt;a href="http://twitter.com/liammclennan" target="_blank"&gt;Liam on Twitter&lt;/a&gt; &lt;/li&gt;            &lt;li&gt;&lt;a href="http://groups.google.com/group/software_craftsmanship" target="_blank"&gt;Software Craftsmanship Google Group&lt;/a&gt; &lt;/li&gt;            &lt;li&gt;&lt;a href="http://www.8thlight.com/" target="_blank"&gt;8th Light&lt;/a&gt; &lt;/li&gt;            &lt;li&gt;&lt;a href="http://obtiva.com/" target="_blank"&gt;Optiva&lt;/a&gt; &lt;/li&gt;            &lt;li&gt;&lt;a href="http://thesoftwarecraftsmancooperative.com/" target="_blank"&gt;Software Craftsman Cooperative&lt;/a&gt; &lt;/li&gt;         &lt;/ul&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=83577" width="1" height="1"&gt;</description></item><item><title>How to programmatically change the physical directory for a web app in IIS 7.x</title><link>http://www.pluralsight-training.net/community/blogs/keith/archive/2010/05/21/how-to-programmatically-change-the-physical-directory-for-a-web-app-in-iis-7-x.aspx</link><pubDate>Fri, 21 May 2010 14:30:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:78608</guid><dc:creator>keith-brown</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;There&amp;rsquo;s lots of info out there on using Microsoft.Web.Administration to configure IIS programmatically. I personally found most of it rather confusing, and I spent way too much time trying to figure this out, calling GetApplicationHostConfiguration, etc.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s a dead simple way to do this that I finally found.&lt;/p&gt;
&lt;p&gt;Notes about this code:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The collections return null if they don&amp;rsquo;t have the thing you are looking for. I&amp;rsquo;m not checking for that in this sample code. &lt;/li&gt;
&lt;li&gt;Don&amp;#39;t forget to include a slash in front of your app name. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; Edit later same day: Updated code to be more robust by not assuming first vdir is root. Now the code searches for a vdir named &amp;quot;/&amp;quot; under the app.   &lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; Microsoft.Web.Administration;
&lt;span class="kwrd"&gt;class&lt;/span&gt; Program
{
    &lt;span class="rem"&gt;// add reference to System.Web&lt;/span&gt;
    &lt;span class="rem"&gt;// and %WINDIR%\system32\inetsrv\Microsoft.Web.Administration.dll&lt;/span&gt;
    &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main()
    {
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; WebsiteName = &lt;span class="str"&gt;&amp;quot;Default Web Site&amp;quot;&lt;/span&gt;;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; AppName = &lt;span class="str"&gt;&amp;quot;/test&amp;quot;&lt;/span&gt;; &lt;span class="rem"&gt;// Note: starts with slash&lt;/span&gt;
        &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; NewPhysicalPath = &lt;span class="str"&gt;@&amp;quot;c:\temp\newDir&amp;quot;&lt;/span&gt;;

        &lt;span class="kwrd"&gt;using&lt;/span&gt; (var serverManager = &lt;span class="kwrd"&gt;new&lt;/span&gt; ServerManager())
        {
            var site = serverManager.Sites[WebsiteName];
            var app = site.Applications[AppName];
            var vdir = FindAppVdir(app);
            vdir.PhysicalPath = NewPhysicalPath;
            serverManager.CommitChanges();
        }
    }

    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; VirtualDirectory FindAppVdir(Application app)
    {
        &lt;span class="kwrd"&gt;return&lt;/span&gt; app
            .VirtualDirectories
            .FirstOrDefault(vdir =&amp;gt; vdir.Path == &lt;span class="str"&gt;&amp;quot;/&amp;quot;&lt;/span&gt;);
    }
}&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=78608" width="1" height="1"&gt;</description><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/Geek+talk/default.aspx">Geek talk</category><category domain="http://www.pluralsight-training.net/community/blogs/keith/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Gone Sailing!  19 May 2010 - 17 July 2010</title><link>http://www.pluralsight-training.net/community/blogs/drjoe/archive/2010/05/17/gone-sailing-19-may-2010-17-july-2010.aspx</link><pubDate>Mon, 17 May 2010 21:26:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:76734</guid><dc:creator>joe-hummel</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Well, I&amp;#39;m certainly not the most active blogger on the planet, but hopefully that will change when I get back!&amp;nbsp; I&amp;#39;m excited to report that I&amp;#39;m departing on a 2-month sailing adventure, racing one leg of the &amp;quot;Clipper Around the World&amp;quot; race.&amp;nbsp; 10 yachts, racing around the world, with&amp;nbsp;non-professionals.&amp;nbsp; The boats left the UK last Fall, and I&amp;#39;m set to join the last leg as they race from Jamaica, up the East Coast of the USA, and back over to the UK.&amp;nbsp; Yes, I&amp;#39;m a lucky guy. &amp;nbsp;I&amp;#39;m on the &amp;quot;California&amp;quot; entry, and you can track our progress at &lt;a href="http://www.clipperroundtheworld.com/"&gt;http://www.clipperroundtheworld.com/&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;When I get back, there should be tons to blog about:&amp;nbsp; the upcoming release of HPC Server v3 (aka &amp;quot;HPC Server 2008 R2&amp;quot;), parallel Excel in Office 2010, map-reduce on the HPC Server framework with Dryad, and more.&amp;nbsp;&amp;nbsp;Take care everyone!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=76734" width="1" height="1"&gt;</description></item><item><title>Boxcar Case Macro in Visual Studio 2010 - Video</title><link>http://www.pluralsight-training.net/community/blogs/starr/archive/2010/05/17/boxcar-case-macro-in-visual-studio-2010-video.aspx</link><pubDate>Mon, 17 May 2010 17:20:57 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:76725</guid><dc:creator>david-starr</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I get so much use out of this handy dandy little macro that I just had to share it. It is a simple little Visual Studio macro that should work in 2010 or 2008 to change a string like this:&lt;/p&gt;  &lt;p&gt;“When writing a unit test”&lt;/p&gt;  &lt;p&gt;into this:&lt;/p&gt;  &lt;p&gt;When_writing_a_unit_test&lt;/p&gt;  &lt;p&gt;And do it in a single keystroke. My dirty little secret? I am a bad typist, so I need little helpers like this.&lt;/p&gt;  &lt;p&gt;The following video will walk you through installing the macro and binding it up to a keyboard shortcut. If you haven’t worked with Visual Studio macros before, this might help get there a bit faster.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://pluralsight-free.s3.amazonaws.com/david-starr/videos/boxcar_macro_in_vs_2010.mp4" target="_blank"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.pluralsight-training.net/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/starr/image_5F00_07A62350.png" width="244" height="184" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://pluralsight-free.s3.amazonaws.com/david-starr/videos/boxcar_macro_in_vs_2010.mp4" target="_blank"&gt;MP4&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And here is the macro itself.&lt;/p&gt;  &lt;div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;padding-top:4px;" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Imports&lt;/span&gt; System&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Imports&lt;/span&gt; EnvDTE&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Imports&lt;/span&gt; EnvDTE80&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Imports&lt;/span&gt; EnvDTE90&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum5"&gt;   5:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Imports&lt;/span&gt; EnvDTE90a&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum6"&gt;   6:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Imports&lt;/span&gt; EnvDTE100&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum7"&gt;   7:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Imports&lt;/span&gt; System.Diagnostics&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum8"&gt;   8:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Imports&lt;/span&gt; System.Windows.Forms&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum9"&gt;   9:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Imports&lt;/span&gt; System.Text.RegularExpressions&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum10"&gt;  10:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum11"&gt;  11:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Module&lt;/span&gt; BddMethods&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum12"&gt;  12:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum13"&gt;  13:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;Sub&lt;/span&gt; BoxcarTheCurrentLineOfCode()&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum14"&gt;  14:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum15"&gt;  15:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;Dim&lt;/span&gt; description &lt;span style="color:#0000ff;"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;String&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum16"&gt;  16:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;Dim&lt;/span&gt; regEx &lt;span style="color:#0000ff;"&gt;As&lt;/span&gt; Regex = &lt;span style="color:#0000ff;"&gt;New&lt;/span&gt; Regex(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color:#006080;"&gt;&amp;quot;([^&amp;quot;&lt;/span&gt;&lt;span style="color:#006080;"&gt;&amp;quot;]+)&amp;quot;&lt;/span&gt;&lt;span style="color:#006080;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum17"&gt;  17:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum18"&gt;  18:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;If&lt;/span&gt; DTE.ActiveDocument &lt;span style="color:#0000ff;"&gt;Is&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Nothing&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Then&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Return&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum19"&gt;  19:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum20"&gt;  20:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;Dim&lt;/span&gt; currentLine &lt;span style="color:#0000ff;"&gt;As&lt;/span&gt; TextSelection = GetCurrentLine()&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum21"&gt;  21:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;If&lt;/span&gt; (currentLine &lt;span style="color:#0000ff;"&gt;Is&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Nothing&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Or&lt;/span&gt; currentLine.Text.Length() &amp;lt; 1) &lt;span style="color:#0000ff;"&gt;Then&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Return&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum22"&gt;  22:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum23"&gt;  23:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;Dim&lt;/span&gt; stringMatch &lt;span style="color:#0000ff;"&gt;As&lt;/span&gt; Match = regEx.Match(currentLine.Text)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum24"&gt;  24:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;For&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Each&lt;/span&gt; stringMatch &lt;span style="color:#0000ff;"&gt;In&lt;/span&gt; regEx.Matches(currentLine.Text)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum25"&gt;  25:&lt;/span&gt;             currentLine.Text = currentLine.Text.Replace(stringMatch.Value, BoxcarAString(stringMatch.Value))&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum26"&gt;  26:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;Next&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum27"&gt;  27:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum28"&gt;  28:&lt;/span&gt;         currentLine.EndOfLine()&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum29"&gt;  29:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Sub&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum30"&gt;  30:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum31"&gt;  31:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;Private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Function&lt;/span&gt; BoxcarAString(&lt;span style="color:#0000ff;"&gt;ByVal&lt;/span&gt; textSegmentToChange &lt;span style="color:#0000ff;"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;String&lt;/span&gt;) &lt;span style="color:#0000ff;"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;String&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum32"&gt;  32:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum33"&gt;  33:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;Dim&lt;/span&gt; segmentAfterTheChange &lt;span style="color:#0000ff;"&gt;As&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;String&lt;/span&gt; = textSegmentToChange.Trim()&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum34"&gt;  34:&lt;/span&gt;         segmentAfterTheChange = segmentAfterTheChange.Replace(&lt;span style="color:#006080;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color:#006080;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum35"&gt;  35:&lt;/span&gt;         segmentAfterTheChange = segmentAfterTheChange.Replace(&lt;span style="color:#006080;"&gt;&amp;quot; &amp;quot;&lt;/span&gt;, &lt;span style="color:#006080;"&gt;&amp;quot;_&amp;quot;&lt;/span&gt;)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum36"&gt;  36:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum37"&gt;  37:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;Return&lt;/span&gt; segmentAfterTheChange&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum38"&gt;  38:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum39"&gt;  39:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Function&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum40"&gt;  40:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum41"&gt;  41:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;Private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Function&lt;/span&gt; GetCurrentLine() &lt;span style="color:#0000ff;"&gt;As&lt;/span&gt; TextSelection&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum42"&gt;  42:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum43"&gt;  43:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;Dim&lt;/span&gt; currentLine &lt;span style="color:#0000ff;"&gt;As&lt;/span&gt; TextSelection = DTE.ActiveDocument.Selection()&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum44"&gt;  44:&lt;/span&gt;         currentLine.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstColumn)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum45"&gt;  45:&lt;/span&gt;         currentLine.EndOfLine(&lt;span style="color:#0000ff;"&gt;True&lt;/span&gt;)&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum46"&gt;  46:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum47"&gt;  47:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;Return&lt;/span&gt; currentLine&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum48"&gt;  48:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum49"&gt;  49:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Function&lt;/span&gt;&lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum50"&gt;  50:&lt;/span&gt;&amp;#160; &lt;/pre&gt;


    &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;" id="lnum51"&gt;  51:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;End&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;Module&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight-training.net/community/aggbug.aspx?PostID=76725" width="1" height="1"&gt;</description></item></channel></rss>