<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-32841709</id><updated>2012-01-26T17:41:45.581Z</updated><category term='visual studio'/><category term='c#'/><category term='.net'/><category term='xna'/><category term='xbox-live-indie-games'/><category term='tool'/><category term='tips'/><category term='open-source'/><title type='text'>Steve Dunn's Blog</title><subtitle type='html'>This blog was generated by a tool.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>78</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-32841709.post-4252386929704098458</id><published>2012-01-08T19:35:00.001Z</published><updated>2012-01-08T19:45:28.667Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><category scheme='http://www.blogger.com/atom/ns#' term='open-source'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='xbox-live-indie-games'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='xna'/><title type='text'>Announcing a new version of the Gleed 2D XNA tool</title><content type='html'>&lt;p&gt;I’ve spent some time over the Summer and Autumn of 2011 rewriting the &lt;a href="https://github.com/SteveDunn/Gleed2D/wiki" target="_blank"&gt;Gleed 2D tool&lt;/a&gt;.&amp;nbsp; This is a tool for editing levels for 2D games and is a very popular tool in the XNA community for games running on XBox and Windows Phone. &lt;/p&gt; &lt;p&gt;Most of the changes in the new version are under-the-hood.&amp;nbsp; The biggest change has been to make it have a plug-in architecture.&amp;nbsp; There has also been a few UI changes though; here’s some screen-shots.&lt;/p&gt; &lt;h5&gt;The original tool before being re-written:&lt;/h5&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-OJ_9XXlp2R8/TwnvvLjF3WI/AAAAAAAABp4/Rklq5Tbv_bY/s1600-h/gleed-original%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="gleed-original" border="0" alt="gleed-original" src="http://lh3.ggpht.com/-4Ft2VFYTxIc/TwnvwaDg28I/AAAAAAAABqA/gKkX3AiUDKY/gleed-original_thumb.jpg?imgmax=800" width="244" height="186"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h5&gt;and here’s the new version:&lt;/h5&gt; &lt;h5&gt;&lt;a href="http://lh5.ggpht.com/-ro86_QbGWjw/Twnv29BEl-I/AAAAAAAABqI/RNrVfVBQGhQ/s1600-h/new-annotated%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="new-annotated" border="0" alt="new-annotated" src="http://lh5.ggpht.com/-YRBqlt80_F8/Twnv4_u4QII/AAAAAAAABqQ/ojo-CZqj764/new-annotated_thumb.png?imgmax=800" width="244" height="199"&gt;&lt;/a&gt;&lt;/h5&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;The main reason for rewriting the tool was that I wanted to add more features to it but found that it wasn’t easy.&amp;nbsp; It wasn’t easy because it was originally written to just handle the basics needed for creating and editing levels.&lt;/p&gt; &lt;p&gt;The features that I wanted to add were for the next version of &lt;a href="http://marketplace.xbox.com/en-US/Product/Crazy-Balloon-Lite/66acd000-77fe-1000-9115-d80258550914" target="_blank"&gt;my game&lt;/a&gt; (&lt;a href="http://www.youtube.com/watch?v=-H3099NgokM" target="_blank"&gt;video here&lt;/a&gt;). I wanted to include lighting and shadows and&amp;nbsp; I wanted to design these on the canvas.&lt;/p&gt; &lt;p&gt;Instead of shoe-horning my changes into the original Gleed 2D source, I decided it’d be best to rewrite it and change it to a plug-in based tool.&lt;/p&gt; &lt;p&gt;So, now everything is a plug-in.&amp;nbsp; The basic shapes (rectangle, circle, path) and textures are now plug-ins.&amp;nbsp; Lighting (lights and shadows) is now a plug-in.&amp;nbsp; There’s also a plug-in for simple ‘behaviour’.&lt;/p&gt; &lt;p&gt;Here’s a quick video showing how to use the basic shapes and textures:&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:f36e7a50-87e7-4598-8f1b-5a8bc1bd9d44" class="wlWriterEditableSmartContent"&gt;&lt;div&gt;&lt;object width="448" height="252"&gt;&lt;param name="movie" value="http://www.youtube.com/v/9UitcINDDjc?hl=en&amp;amp;hd=1"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/9UitcINDDjc?hl=en&amp;amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style="width:448px;clear:both;font-size:.8em"&gt;Basic shapes and textures&lt;/div&gt;&lt;/div&gt; &lt;p&gt;Here’s a short video showing lighting:&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:94f2fdb3-5562-4b7b-9cc7-3a1d65c70bdf" class="wlWriterEditableSmartContent"&gt;&lt;div&gt;&lt;object width="448" height="252"&gt;&lt;param name="movie" value="http://www.youtube.com/v/2a4shMgRQrk?hl=en&amp;amp;hd=1"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/2a4shMgRQrk?hl=en&amp;amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style="width:448px;clear:both;font-size:.8em"&gt;Lights and shadows&lt;/div&gt;&lt;/div&gt; &lt;p&gt;and lastly, here’s a short video showing simple behaviours:&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:50a1baf5-a94f-48ca-96a5-dbe8a79f71fb" class="wlWriterEditableSmartContent"&gt;&lt;div&gt;&lt;object width="448" height="252"&gt;&lt;param name="movie" value="http://www.youtube.com/v/rFReB6OzYT0?hl=en&amp;amp;hd=1"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/rFReB6OzYT0?hl=en&amp;amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style="width:448px;clear:both;font-size:.8em"&gt;Simple behaviours&lt;/div&gt;&lt;/div&gt; &lt;p&gt;The tool is still currently a bit rough.&amp;nbsp; There’s various &lt;a href="https://github.com/SteveDunn/Gleed2D/issues" target="_blank"&gt;bugs&lt;/a&gt; that need to be fixed, but none of them stop the tool from doing what it was designed to do.&amp;nbsp; The project is now quick big, so I’m hoping that the community will jump in and add/fix stuff.&amp;nbsp; I’d like to see plug-ins for physics and particle systems.&lt;/p&gt; &lt;p&gt;Feel free to download the source and play around.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-4252386929704098458?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/4252386929704098458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=4252386929704098458&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4252386929704098458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4252386929704098458'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2012/01/announcing-new-version-of-gleed-2d-xna.html' title='Announcing a new version of the Gleed 2D XNA tool'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/-4Ft2VFYTxIc/TwnvwaDg28I/AAAAAAAABqA/gKkX3AiUDKY/s72-c/gleed-original_thumb.jpg?imgmax=800' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-2313438609525475397</id><published>2011-08-17T21:45:00.001Z</published><updated>2011-08-17T21:45:38.133Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='open-source'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>A fast way of converting C# enums to strings–and back again.</title><content type='html'>&lt;p&gt;I recently needed a fast way of converting lots of enums to strings (and back again).&amp;nbsp; I needed to do it very quickly.&amp;nbsp; ‘Enum.Parse’ just wasn’t fast enough.&lt;/p&gt; &lt;p&gt;I discovered there was no ‘enum mapper’ in C#, so I knocked up &lt;a href="https://gist.github.com/1152680" target="_blank"&gt;this little class&lt;/a&gt;.&amp;nbsp; It uses reflection just once when it comes across a new enum.&lt;/p&gt; &lt;p&gt;It’s compatible with .NET 3.5 too.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-2313438609525475397?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/2313438609525475397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=2313438609525475397&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/2313438609525475397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/2313438609525475397'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2011/08/fast-way-of-converting-c-enums-to.html' title='A fast way of converting C# enums to strings–and back again.'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-1035053383948661691</id><published>2011-05-11T19:41:00.001Z</published><updated>2011-05-11T20:02:35.115Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>Handy use of extension method on a bool</title><content type='html'>&lt;p&gt;I don’t like to overuse if/else statements.&amp;nbsp; I really dislike seeing code like this:&lt;br&gt;&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:f1bbbcac-31e8-4858-8cd5-20cf6aae7216" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 331px; height: 179px;background-color:White;overflow: auto;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt;(somethingIsTrue)
{
  DoSomethingWhenTrue( ) ;
}
&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;else&lt;/span&gt;&lt;span style="color: #000000;"&gt;
{
  DoSomethingElse( ) ;
}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;p&gt;I just had an idea about using extension methods so I can write this instead:&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:d9b6af4f-2a93-40df-bf8b-9ae4c50e3235" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 362px; height: 83px;background-color:White;overflow: auto;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000;"&gt;somethingIsTrue.Branch(
        ( ) &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; DoSomethingWhenTrue( ),
        ( ) &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; DoSomethingElse( ) ) ;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;p&gt;… and here’s the extension method:&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:d2f9eb5e-9d05-4da9-a201-ecd61e617371" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 664px; height: 245px;background-color:White;overflow: auto;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;static&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Branch(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;this&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;bool&lt;/span&gt;&lt;span style="color: #000000;"&gt; @bool, Action left, Action right)
{
  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt;( @bool )
  {
    left( ) ;
  }
  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;else&lt;/span&gt;&lt;span style="color: #000000;"&gt;
  {
    right( ) ;
  }
}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br&gt;Nice or not? I think it reads a bit better (for single line expressions anyway).  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-1035053383948661691?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/1035053383948661691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=1035053383948661691&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/1035053383948661691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/1035053383948661691'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2011/05/handy-use-of-extension-method-on-bool.html' title='Handy use of extension method on a bool'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-30228031332473213</id><published>2010-07-11T13:13:00.001Z</published><updated>2010-07-11T13:13:59.251Z</updated><title type='text'>New version (2.5) of the Code Formatter Plug-in for Windows Live Writer</title><content type='html'>&lt;p&gt;A new version of my code formatter plug-in for Windows Live Writer can be found at &lt;a href="http://tinyurl.com/3483vwh"&gt;http://tinyurl.com/3483vwh&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-30228031332473213?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/30228031332473213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=30228031332473213&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/30228031332473213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/30228031332473213'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2010/07/new-version-25-of-code-formatter-plug.html' title='New version (2.5) of the Code Formatter Plug-in for Windows Live Writer'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-4008185928980470339</id><published>2010-04-14T11:54:00.002Z</published><updated>2010-04-14T11:59:44.865Z</updated><title type='text'>Summon Method</title><content type='html'>&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;"Summon Method"&lt;/span&gt;
A method that gets or creates something.&lt;/blockquote&gt;A common question (well, I've seen it asked a few times), is &lt;span style="font-weight: bold;"&gt;what should I call a method the gets or creates something?&lt;/span&gt;

Instead of &lt;pre&gt;Foo GetOrCreateFoo()&lt;/pre&gt;use:
&lt;pre&gt;Foo SummonFoo()&lt;/pre&gt;
What do you think?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-4008185928980470339?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/4008185928980470339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=4008185928980470339&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4008185928980470339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4008185928980470339'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2010/04/summon-method.html' title='Summon Method'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-4437544393809635168</id><published>2010-02-25T21:02:00.006Z</published><updated>2011-09-17T16:24:24.641Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='tool'/><title type='text'>A tool to switch project files between using Visual Studio 2008 and 2010</title><content type='html'>&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_bIhihWOyLpw/S4blVo1oiJI/AAAAAAAABoE/ZzX-4fuEcg8/s1600-h/toolbox10.jpg"&gt;&lt;img style="border-width: 0px; margin: 0px; display: inline;" title="tool-box" alt="tool-box" src="http://lh6.ggpht.com/_bIhihWOyLpw/S4blWx9EZhI/AAAAAAAABoI/ifZpvW7UXUI/toolbox_thumb6.jpg?imgmax=800" align="right" border="0" height="162" width="244" /&gt;&lt;/a&gt;&lt;i&gt;&lt;b&gt;Update: the source is now on &lt;a href="https://github.com/SteveDunn/SwitchVsVersion"&gt;GitHub&lt;/a&gt;&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;Visual Studio 2010 is almost here.  Visual Studio 2010 (the release candidate) &lt;strong&gt;is here&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;I’ll describe the problem before I describe the tool:  You want to use the latest version of Visual Studio but you don’t want it to modify all of your projects and solutions because you’ve got other team members who don’t want to (or can’t) switch to 2010.&lt;/p&gt;  &lt;p&gt;A serious problem indeed.  If only you could you run a tool to update all of you project files to 2010, do your changes in Visual Studio 2010, then switch all projects back to 2008 format before checking in.&lt;/p&gt;  &lt;p&gt;Well, here’s a command line tool to do just that!&lt;/p&gt;  &lt;p&gt;It’s very easy to use: run it from the command line, give it a folder name, and tell it whether you want all your projects and solutions under that folder to be either 2008 or 2010 format. For example:&lt;/p&gt;  &lt;div style="padding: 0px; margin: 0px; display: inline; float: none;" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:d5d6d703-0829-4f94-9acd-70693956c4ad" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color: rgb(255, 255, 255); white-space: pre-wrap; word-wrap: break-word; overflow: auto;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;SwitchVsVersion c:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;temp&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;MySolution &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;2010&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;
SwitchVsVersion c:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;temp&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;MySolution &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;2008&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;p&gt;As a bonus, you can also tell it to change all your target frameworks to either .NET 4 or .NET 3.5. For example:&lt;/p&gt;

&lt;div style="padding: 0px; margin: 0px; display: inline; float: none;" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:8050272c-f546-4905-8278-7e56f9f0229d" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color: rgb(255, 255, 255); white-space: pre-wrap; word-wrap: break-word; overflow: auto;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;SwitchVsVersion c:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;temp&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;MySolution &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;5Framework
SwitchVsVersion c:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;temp&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;\&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;MySolution &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0Framework&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="http://sites.google.com/a/dunnhq.com/steve/SwitchVsVersion-Binary.zip?attredirects=0&amp;amp;d=1"&gt;Binary&lt;/a&gt; here. &lt;a href="http://sites.google.com/a/dunnhq.com/steve/SwitchVsVersion-source.zip?attredirects=0&amp;amp;d=1"&gt;Source code&lt;/a&gt; here.  Here’s a &lt;a href="http://sites.google.com/a/dunnhq.com/steve/TestSolutionWithLotsOfDifferentTypeOfBlankProjects.7z?attredirects=0&amp;amp;d=1"&gt;test solution&lt;/a&gt; with lots of different empty projects to try it out on too.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://lh4.ggpht.com/_bIhihWOyLpw/S4blX2VS4UI/AAAAAAAABoM/ZVAyjPeImBs/s1600-h/toolbox4.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclaimer: this is a noddy little tool that may not work properly on your projects and solutions.  I’ve tested it on quite a large WinForms solution and it worked fine.  I’ve also tested it on quite a variety of projects including C# and VB WinForms, Web Apps, Libraries, WPF Projects, and WPF Libraries.  The only one it doesn’t do is C++ projects (which is a coincidence, because I no longer do C++ projects either).  Be sure to back up your stuff before you use this tool!  Terms and conditions apply.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Update: Thanks for the feedback.  As requested, the source is covered under the WTFPL.  Do what you want with it:
&lt;/strong&gt;&lt;/p&gt;           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
&lt;code&gt;&lt;b&gt;
This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See &lt;a href="http://sam.zoy.org/wtfpl/COPYING"&gt;http://sam.zoy.org/wtfpl/COPYING&lt;/a&gt; for more details.
&lt;/b&gt;&lt;/code&gt;
&lt;p&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-4437544393809635168?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/4437544393809635168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=4437544393809635168&amp;isPopup=true' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4437544393809635168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4437544393809635168'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2010/02/tool-to-switch-project-files-between.html' title='A tool to switch project files between using Visual Studio 2008 and 2010'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_bIhihWOyLpw/S4blWx9EZhI/AAAAAAAABoI/ifZpvW7UXUI/s72-c/toolbox_thumb6.jpg?imgmax=800' height='72' width='72'/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-163635037699929970</id><published>2010-01-09T20:07:00.001Z</published><updated>2010-01-09T20:12:41.142Z</updated><title type='text'>Updated: Code Formatter Plugin for Windows Live Writer</title><content type='html'>&lt;p&gt;This plug-in formats and highlights code. Version 2.0.0.3 can be &lt;a href="http://sites.google.com/a/dunnhq.com/steve/CodeFormatterPlugin2.0.0.3.zip?attredirects=0"&gt;downloaded here&lt;/a&gt;. Keep reading for more info.&lt;/p&gt;  &lt;p&gt;As well as a few bug fixes, this release includes the following features: &lt;/p&gt; · Use different formatting engines such as &lt;a href="http://www.actiprosoftware.com/Products/DotNet/WindowsForms/SyntaxEditor/Default.aspx"&gt;&lt;b&gt;ActiPro &lt;/b&gt;&lt;/a&gt;(Insert formatted code), and &lt;a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Demo"&gt;SyntaxHighlighter&lt;/a&gt;&lt;b&gt; &lt;/b&gt;(Insert highlighted code)   &lt;br /&gt;· Dozens of languages, including PowerShell, MSIL, Pascal and XAML   &lt;br /&gt;· Live formatting of code using the superb ActiPro code editor.&amp;#160; ActiPro very kindly donated the license.   &lt;br /&gt;· The ability to output either &lt;b&gt;highlighted text&lt;/b&gt; (html) or an &lt;b&gt;image    &lt;br /&gt;&lt;/b&gt;· WordPress support for the SyntaxHighlighter Evolved plugin   &lt;p&gt;This plugin adds &lt;strong&gt;four tools&lt;/strong&gt; in WLW's tool window: &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://lh4.ggpht.com/_bIhihWOyLpw/S0jh2R2qIwI/AAAAAAAABmA/_XcKx99thbk/s1600-h/image%5B27%5D.png"&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://lh6.ggpht.com/_bIhihWOyLpw/S0jh3HeF5bI/AAAAAAAABmE/OW94DbGPMW8/image_thumb%5B15%5D.png?imgmax=800" width="370" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Tool 1) Code as bitmap&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;This uses the ActiPro formatting engine to take a snapshot of the code.&amp;#160; &lt;/p&gt;  &lt;p&gt;You'll see this screen when clicked – if there’s text in the clipboard, it’ll be shown here, or you can copy and paste when the window appears: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_bIhihWOyLpw/S0jh4DeQhxI/AAAAAAAABmw/8myBHxtVfGY/s1600-h/image%5B28%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_bIhihWOyLpw/S0jh5XL7F7I/AAAAAAAABm4/dh3N0HtWhKc/image_thumb%5B16%5D.png?imgmax=800" width="370" height="355" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This srceen allows you to set the size of the editor window.&amp;#160; You can either select common widths from the drop-down or put in your own width - for instance, 465 is the ideal width for my template on Blogger.&amp;#160; The buttons on the bottom right allow you to then: &lt;/p&gt;  &lt;p&gt;&lt;i&gt;a)&lt;/i&gt; insert the image straight into the blog post or     &lt;br /&gt;&lt;i&gt;b) &lt;/i&gt;have the plugin copy the image or     &lt;br /&gt;c) discard it.&amp;#160; &lt;/p&gt;  &lt;p&gt;The advantage of the option A is that the code is still editable in WLW; the disadvantage - you cannot [yet] apply bitmap effects, such as reflection or drop shadow.&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;The advantage of option B is that you can apply bitmap effects, but the disadvantage is that code will no longer be editable. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Tool B) Formatted code&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;This also uses uses the ActiPro formatting engine. &lt;/p&gt;  &lt;p&gt;When inserting code, the plugin window will allow various properties of the code to be changed: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_bIhihWOyLpw/S0jh6K_HyZI/AAAAAAAABnA/yEdtq8v7dfI/s1600-h/image%5B29%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_bIhihWOyLpw/S0jh7GLsatI/AAAAAAAABnI/QxGapuPzoss/image_thumb%5B17%5D.png?imgmax=800" width="370" height="383" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;When clicking edit code, you'll see the edit source code screen: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_bIhihWOyLpw/S0jh7_ku-SI/AAAAAAAABnM/jXZX2r-__io/s1600-h/image%5B30%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_bIhihWOyLpw/S0jh89B3KqI/AAAAAAAABnY/qw26NOYDziM/image_thumb%5B18%5D.png?imgmax=800" width="370" height="244" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Tool C) Highlighted code&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;This uses the Syntax Highlighter formatting engine.&amp;#160; When inserting code, the edit screen will appear in the same way as when you insert formatted code (see above).&amp;#160; The only difference is a ‘show preview’ button, which displays this preview window:    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_bIhihWOyLpw/S0jh98LDvoI/AAAAAAAABng/bEGSH3JLB3U/s1600-h/image%5B31%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_bIhihWOyLpw/S0jh-mAsSdI/AAAAAAAABno/S9v-5czRCxs/image_thumb%5B19%5D.png?imgmax=800" width="370" height="136" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To use the SyntaxHighlighter engine, ensure your blog is correctly set-up.&amp;#160; For the preview window to correctly display your code, ensure the Settings are correct.&amp;#160; Here’s the Settings window:    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_bIhihWOyLpw/S0jh_nC5lVI/AAAAAAAABnw/6G2mf8mVyLs/s1600-h/image%5B32%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_bIhihWOyLpw/S0jiAlLtuPI/AAAAAAAABn4/tLG6HLaj7aA/image_thumb%5B20%5D.png?imgmax=800" width="370" height="246" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Tool D) WordPress Formatted&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This changes the HTML output to that expected by theSyntaxHighlighter Evolved plugin for WordPress.&amp;#160; It’s very similar to using the SyntaxHighlighter engine, but you don’t need to worry about setting up your blog with the correct scripts.&amp;#160; &lt;em&gt;Do be aware though, that for the Preview window to work correctly, you still need to set-up this plugin so that it knows where the SyntaxHighlighter brushes and scripts are (the default settings work right now, but if Alex changes the location in the future, you’ll need to update the settings).&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;To see examples of the output, please &lt;a href="http://stevedunns.blogspot.com/2009/03/new-version-of-code-formatter-plugin.html"&gt;see this blog post&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Version 2.0.0.3 can be &lt;a href="http://sites.google.com/a/dunnhq.com/steve/CodeFormatterPlugin2.0.0.3.zip?attredirects=0"&gt;downloaded here&lt;/a&gt;.&amp;#160; To use it, extract the binaries to &lt;b&gt;Program Files\Windows Live\Writer\Plugins&lt;/b&gt; and run WLW.&amp;#160; If you're using a version of WLW prior to Beta 3, then you need to remove it and update!&amp;#160; (alternatively, change the directory to \Program Files\Windows Live Writer\Plugins) &lt;/p&gt;  &lt;p&gt;Thanks again to all those that left feedback.&amp;#160;&amp;#160; Please keep it coming. Hopefully the bugs that have been reported have now been fixed.&amp;#160; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-163635037699929970?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/163635037699929970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=163635037699929970&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/163635037699929970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/163635037699929970'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2010/01/updated-code-formatter-plugin-for.html' title='Updated: Code Formatter Plugin for Windows Live Writer'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_bIhihWOyLpw/S0jh3HeF5bI/AAAAAAAABmE/OW94DbGPMW8/s72-c/image_thumb%5B15%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-8965201505829862303</id><published>2009-10-17T19:25:00.001Z</published><updated>2009-10-17T19:25:24.771Z</updated><title type='text'>Problems with CSS and themes when using ASP.NET Forms Authentication</title><content type='html'>&lt;p&gt;A while back, I wrote a &lt;a href="http://stevedunns.blogspot.com/2006/10/forms-authentication-and-stylesheet.html" target="_blank"&gt;blog post&lt;/a&gt; about how turning on Forms Authentication caused problems with stylesheets and Themes.&amp;#160; A lot of people found this post useful but had trouble finding it.&amp;#160; One reader suggested I change the title to get more hits.&amp;#160; So, I did, and this is it.&amp;#160; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-8965201505829862303?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/8965201505829862303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=8965201505829862303&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/8965201505829862303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/8965201505829862303'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/10/problems-with-css-and-themes-when-using.html' title='Problems with CSS and themes when using ASP.NET Forms Authentication'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-2341439713917419737</id><published>2009-07-27T19:48:00.001Z</published><updated>2009-07-27T19:48:56.588Z</updated><title type='text'>ReSharper for Visual Studio 2010</title><content type='html'>&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_bIhihWOyLpw/Sm4EpF3uWuI/AAAAAAAABlg/l5DpxDDeIHc/s1600-h/rs%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="rs" border="0" alt="rs" align="right" src="http://lh6.ggpht.com/_bIhihWOyLpw/Sm4Ep5LoueI/AAAAAAAABlk/cyrYs7WlqqE/rs_thumb%5B2%5D.png?imgmax=800" width="170" height="184" /&gt;&lt;/a&gt; I don’t know how I missed this for so long, but JetBrains have released a &lt;a href="http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+for+Visual+Studio+2010+%28Preview%29"&gt;preview of ReSharper for Visual Studio 2010&lt;/a&gt;! They say this version is neither 4.5.1 nor 5.0, but a preview build with some of the new 5.0 features enabled.&lt;/p&gt;  &lt;p&gt;Looking at the nightly builds, it seems that the first release was 9th July, but there was no news on their blog, which I’ve been checking daily since June (when they said it’d be ready). &lt;/p&gt;  &lt;p&gt;Anyway, now I can give Visual Studio 2010 another try.&amp;#160; I just couldn’t use it, not even for evaluation, without ReSharper!&lt;/p&gt;  &lt;p&gt;Also, let’s not forget that version 4.5.1 for Visual Studio 2005 and 2008 is also &lt;a href="http://www.jetbrains.com/resharper/index.html"&gt;now available&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-2341439713917419737?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/2341439713917419737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=2341439713917419737&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/2341439713917419737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/2341439713917419737'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/07/resharper-for-visual-studio-2010.html' title='ReSharper for Visual Studio 2010'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_bIhihWOyLpw/Sm4Ep5LoueI/AAAAAAAABlk/cyrYs7WlqqE/s72-c/rs_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-3344565284460003208</id><published>2009-06-04T06:24:00.001Z</published><updated>2009-06-04T06:24:33.849Z</updated><title type='text'>Google Squared and sexy languages!</title><content type='html'>&lt;p&gt;&lt;a href="http://www.google.com/squared"&gt;Google Squared&lt;/a&gt; looks like an interesting tool.&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“Google Squared is a search tool that helps you quickly build a collection of facts from the Web for any topic you specify. &lt;/em&gt;&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;&lt;em&gt;Facts about your topic are organized as a table of items and attributes (we call them &amp;quot;Squares&amp;quot; for fun). &lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;em&gt;Customize these Squares to see just the items and attributes you're interested in. &lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;em&gt;See the websites that served as sources for the information in your Square. &lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;em&gt;Save and share Squares with others.”&lt;/em&gt; &lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://lh5.ggpht.com/_bIhihWOyLpw/SidoldTMJjI/AAAAAAAABlQ/ZEtBt1fSHfs/s1600-h/mk%5B5%5D.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="mk" border="0" alt="mk" align="right" src="http://lh6.ggpht.com/_bIhihWOyLpw/SidolyifkYI/AAAAAAAABlU/Ls1eyf1lBR0/mk_thumb%5B3%5D.jpg?imgmax=800" width="154" height="154" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There’s some interesting results.&amp;#160; I searched for &lt;a href="http://www.google.com/squared/search?q=programming+languages#"&gt;‘programming languages’&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;It displays a list of languages, a picture of the language, a description, and what it was influenced by. &lt;/p&gt;  &lt;p&gt;I was very surprised to see the &lt;strong&gt;Miranda&lt;/strong&gt; language (apparently influenced by Haskell).&amp;#160; Try it yourself:&amp;#160; scroll down to Miranda.&amp;#160; I must take a closer look at this one! &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a href="http://lh3.ggpht.com/_bIhihWOyLpw/Sidom2xkYuI/AAAAAAAABlY/kBpImPRSChY/s1600-h/limbo%5B3%5D.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="limbo" border="0" alt="limbo" align="left" src="http://lh6.ggpht.com/_bIhihWOyLpw/SidooBxOeQI/AAAAAAAABlc/sruV-D5sOfw/limbo_thumb%5B1%5D.jpg?imgmax=800" width="244" height="174" /&gt;&lt;/a&gt;&lt;/strong&gt; Another one that might get you excited is &lt;strong&gt;Limbo&lt;/strong&gt;.&amp;#160; Scroll down and take a look &lt;font color="#ff0000"&gt;(but be careful if you’re at work!!)&lt;/font&gt;. Apparently influenced from Stackless Python.&amp;#160; I’d say more like alcohol!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-3344565284460003208?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/3344565284460003208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=3344565284460003208&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3344565284460003208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3344565284460003208'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/06/google-squared-and-sexy-languages.html' title='Google Squared and sexy languages!'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_bIhihWOyLpw/SidolyifkYI/AAAAAAAABlU/Ls1eyf1lBR0/s72-c/mk_thumb%5B3%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-8648064017793223872</id><published>2009-05-25T12:45:00.001Z</published><updated>2009-05-25T12:45:32.192Z</updated><title type='text'>Updated: Tree Trim</title><content type='html'>&lt;p&gt;&lt;a href="http://code.google.com/p/treetrim/"&gt;Tree Trim&lt;/a&gt; is a command line tool that trims your source code tree.&amp;#160; It removes debug files, source control bindings, and temporary files.&lt;/p&gt;  &lt;p&gt;It’s integrated with Windows Explorer: when you right click a folder you’re given the option to clean the folder.&lt;/p&gt;  &lt;p&gt;Massive thanks to &lt;a href="http://www.google.co.uk/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fwww.hanselman.com%2Fblog%2FTheWeeklySourceCode42TreeTrimPluginsAndMEF.aspx&amp;amp;ei=DpEaStDKOdKNjAff3_jjDA&amp;amp;usg=AFQjCNHhWMPTOYQ98ZjmgSTlq0wMMUxfnA&amp;amp;sig2=AT06w81BwD_bo2HdgknhbA"&gt;Scott Hanselman for blogging about it&lt;/a&gt; and for providing some great and detailed feedback.&lt;/p&gt;  &lt;p&gt;If you’re interested in doing your own Tree Trim plugin, there’s now a &lt;a href="http://code.google.com/p/treetrim/wiki/CreatingPlugins"&gt;Wiki page to take you through the process&lt;/a&gt;.&amp;#160; If you’d like to contribute your plugin or fix any issues, then &lt;a href="http://code.google.com/p/treetrim/wiki/HowToContribute"&gt;take a look at this page&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-8648064017793223872?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/8648064017793223872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=8648064017793223872&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/8648064017793223872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/8648064017793223872'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/05/updated-tree-trim.html' title='Updated: Tree Trim'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-5842204062872556821</id><published>2009-05-15T21:11:00.001Z</published><updated>2009-05-15T21:11:50.926Z</updated><title type='text'>Updated: Code Formatter Plugin for Windows Live Writer</title><content type='html'>&lt;p&gt;Version 2.0.0.2 of the Code Formatter Plugin can be &lt;a href="http://stevedunns.googlepages.com/codeformatterforwindowslivewriter"&gt;downloaded here&lt;/a&gt;.&amp;#160; This has a fix for when the plugin tried to load configuration from the wrong location on disk.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-5842204062872556821?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/5842204062872556821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=5842204062872556821&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5842204062872556821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5842204062872556821'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/05/updated-code-formatter-plugin-for.html' title='Updated: Code Formatter Plugin for Windows Live Writer'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-3634606305043163213</id><published>2009-04-13T11:45:00.001Z</published><updated>2009-04-13T11:45:15.734Z</updated><title type='text'>New tool: TreeTrim</title><content type='html'>&lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="hammer" border="0" alt="hammer" align="right" src="http://lh3.ggpht.com/_bIhihWOyLpw/SeMlymEVDRI/AAAAAAAABk0/y3YJB9wNtnA/hammer%5B5%5D.png?imgmax=800" width="244" height="191" /&gt; I've recently been working on a &lt;a href="http://code.google.com/p/treetrim/"&gt;tool&lt;/a&gt; based on &lt;a href="http://www.codinghorror.com/blog/"&gt;Jeff Atwoods&lt;/a&gt; &lt;a href="http://www.codinghorror.com/blog/archives/000368.html"&gt;Clean Sources Plus&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;It's called &lt;strong&gt;TreeTrim&lt;/strong&gt;.&amp;#160; It's a tool that strips out debug files and folders in your source code tree and also zips and emails amongst other things. &lt;/p&gt;  &lt;p&gt;One of the BIG requests for CleanSourcePlus (well, amongst the 5 people in the comments section of the tool's page!) is for the tool to make a working copy of your source before it deletes and zips.&amp;#160; TreeTrim does this.&lt;/p&gt;  &lt;p&gt;It's plug-in based, so if it doesn't do something that you want, you can write your own plug-in, plonk it in the directory, and have the tool run it alongside the other plugins. &lt;/p&gt;  &lt;p&gt;The installer and source code is available for download at &lt;a href="http://code.google.com/p/treetrim/"&gt;http://code.google.com/p/treetrim/&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-3634606305043163213?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/3634606305043163213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=3634606305043163213&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3634606305043163213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3634606305043163213'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/04/new-tool-treetrim.html' title='New tool: TreeTrim'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_bIhihWOyLpw/SeMlymEVDRI/AAAAAAAABk0/y3YJB9wNtnA/s72-c/hammer%5B5%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-4070427652306194942</id><published>2009-03-13T21:35:00.001Z</published><updated>2009-03-13T21:35:26.132Z</updated><title type='text'>ReSharper 4.5 Beta</title><content type='html'>&lt;p&gt;&lt;a href="http://www.jetbrains.com/resharper/beta.html" target="_blank"&gt;Nice&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-4070427652306194942?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/4070427652306194942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=4070427652306194942&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4070427652306194942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4070427652306194942'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/03/resharper-45-beta.html' title='ReSharper 4.5 Beta'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-3328280976515766199</id><published>2009-03-12T19:44:00.001Z</published><updated>2009-03-12T19:44:33.671Z</updated><title type='text'>Update to the Code Formatter Plugin</title><content type='html'>&lt;p&gt;Version 2.0.0.1 of the &lt;a href="http://stevedunns.googlepages.com/codeformatterforwindowslivewriter" target="_blank"&gt;Code Formatter Plugin&lt;/a&gt; is now available.&lt;/p&gt;  &lt;p&gt;New in this version:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Enhanced support for &lt;a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter" target="_blank"&gt;Syntax Highlighter 2x&lt;/a&gt;       &lt;br /&gt;You can now specify things such as &lt;a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Demo:tab-size" target="_blank"&gt;tab size&lt;/a&gt;, &lt;a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Demo:ruler" target="_blank"&gt;show ruler&lt;/a&gt;, &lt;a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Demo:collapse" target="_blank"&gt;collapse&lt;/a&gt;,&amp;#160; &lt;a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Demo:toolbar" target="_blank"&gt;show toolbar&lt;/a&gt;, &lt;a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Demo:gutter" target="_blank"&gt;show line numbers&lt;/a&gt;, &lt;a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Demo:first-line" target="_blank"&gt;starting line number&lt;/a&gt;, and &lt;a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Demo:highlight" target="_blank"&gt;highlighting specific line numbers&lt;/a&gt;.&amp;#160; &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_bIhihWOyLpw/SblmDoPhcXI/AAAAAAAABjs/8QDgAJQ5blU/s1600-h/image%5B5%5D.png"&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://lh3.ggpht.com/_bIhihWOyLpw/SblmEoEzDSI/AAAAAAAABjw/IwufoywrNVw/image_thumb%5B2%5D.png?imgmax=800" width="340" height="295" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Configuration screens for the different providers      &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_bIhihWOyLpw/SblmFYcCbzI/AAAAAAAABj0/nFWg-nbcp2s/s1600-h/image19.png"&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://lh3.ggpht.com/_bIhihWOyLpw/SblmGjqT8_I/AAAAAAAABj4/PlwmVJRp1Pk/image_thumb13.png?imgmax=800" width="334" height="245" /&gt;&lt;/a&gt;       &lt;br /&gt;You can now add and remove languages and generally configure each provider.&amp;#160; You can also edit the files manually – they are called SyntaxHightlighter2xConfiguration.xml and ActiProConfiguration.xml.&amp;#160; They are located in the Plugins folder. &lt;/li&gt;    &lt;li&gt;Preview window for Syntax Highlighter formatted code.      &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_bIhihWOyLpw/SblmHPgoOYI/AAAAAAAABj8/VCs_KradUVY/s1600-h/image20.png"&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://lh4.ggpht.com/_bIhihWOyLpw/SblmIE5WuAI/AAAAAAAABkA/niXMPMHNWJ8/image_thumb14.png?imgmax=800" width="348" height="206" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;This was added because the Preview tab in Windows Live Writer doesn’t include the scripts and styles used in your blog engine’s templates and hence previewing Syntax Highlighted code means it looks plain.&amp;#160; Click the Show Preview button to see this window. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://stevedunns.googlepages.com/codeformatterforwindowslivewriter" target="_blank"&gt;Code Formatter Plugin home-page&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://stevedunns.googlepages.com/CodeFormatterPlugin2.0.0.1.zip" target="_blank"&gt;Direct download link&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-3328280976515766199?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/3328280976515766199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=3328280976515766199&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3328280976515766199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3328280976515766199'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/03/update-to-code-formatter-plugin.html' title='Update to the Code Formatter Plugin'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_bIhihWOyLpw/SblmEoEzDSI/AAAAAAAABjw/IwufoywrNVw/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-5101870733589216424</id><published>2009-03-06T20:10:00.001Z</published><updated>2009-03-06T20:10:23.993Z</updated><title type='text'>IDisposable alerts</title><content type='html'>&lt;p&gt;Types that implement IDisposable usually do so for a reason.&amp;#160; They probably consume resources that should be released as early as possible.&lt;/p&gt;  &lt;p&gt;In a recent project, I came across a very neat idea.&amp;#160; In the destructor/finalizer/finaliser of your IDisposable type, do something to alert the consumer that you’re being collected by the Garbage Collector and hence you haven’t been disposed of correctly.&lt;/p&gt;  &lt;p&gt;But how does this type know it’s not been disposed correctly?&amp;#160; Well, if you follow the IDisposable pattern to the letter &lt;em&gt;(described in the excellent book Effective C# (Item 18), and about 3,000 places around t’internet)&lt;/em&gt;, in your Dispose method, you’ll call GC.SupressFinalize(this);&amp;#160; meaning the Garbage Collector won’t call your finalizer.&amp;#160; So if you ever end up in the finalizer, the naughty user hasn’t called Dispose or hasn’t put the construction of your type in a using block.&lt;/p&gt;  &lt;p&gt;There’s two bits to this&lt;/p&gt;  &lt;p&gt;The constructor:   &lt;br /&gt;    &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:16f71f16-e24d-4df5-9064-b23a0e884c18" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: csharp;"&gt;public MyResourceHungryType( )
{
  _stackTrace = new StackTrace( ) ;
}
&lt;/pre&gt;&lt;/div&gt;

  &lt;br /&gt;The finalizer:

  &lt;br /&gt;

  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:6f330505-be4f-4e78-9f7b-fb570932185b" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: csharp;"&gt;~MyResourceHungryType( )
{
  Debug.WriteLine( _stackTrace.ToString( ) ) ;
}
&lt;/pre&gt;&lt;/div&gt;

  &lt;br /&gt;Then, if the finalizer is ever called, you’ll get a call stack printed up to the point where you created this type – something like:

  &lt;br /&gt;

  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:9405c000-8e4b-4474-8d7e-6b298651f8f8" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: css;"&gt;at Namespace.MyResourceHungryType..ctor()
   at Namespace.MyType.DoSomething()
   at SomeNamespace.SomeMethod()&lt;/pre&gt;&lt;/div&gt;

  &lt;br /&gt;Handy.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-5101870733589216424?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/5101870733589216424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=5101870733589216424&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5101870733589216424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5101870733589216424'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/03/idisposable-alerts.html' title='IDisposable alerts'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-1615687804045075963</id><published>2009-03-06T07:21:00.002Z</published><updated>2009-03-07T07:51:47.014Z</updated><title type='text'>New version of the Code Formatter Plugin</title><content type='html'>&lt;p&gt;Version 2.0 of the Code Formatter Plugin for &lt;a href="http://download.live.com/writer" target="_blank"&gt;Windows Live Writer&lt;/a&gt; is now available.&lt;/p&gt;  &lt;p&gt;New in this version is the ability to use different formatting engines – in this version: &lt;a href="http://www.actiprosoftware.com/Products/DotNet/WindowsForms/SyntaxEditor/Default.aspx" target="_blank"&gt;ActiPro&lt;/a&gt; and &lt;a href="http://code.google.com/p/syntaxhighlighter/" target="_blank"&gt;SyntaxHighlighter 2.0&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Also new is the ability to output either formatted code as text or as a bitmap.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;A massive thank you to &lt;a href="http://www.actiprosoftware.com/Default.aspx" target="_blank"&gt;ActiPro&lt;/a&gt; for donating the &lt;a href="http://www.actiprosoftware.com/Products/DotNet/WindowsForms/SyntaxEditor/Default.aspx" target="_blank"&gt;ActiPro Syntax Editor&lt;/a&gt; component – &lt;strong&gt;the&lt;/strong&gt; best code editor available! &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If you’re reading this in an aggregator, the following code snippets may look unformatted (apart from the bitmap), but if you’re not, then it should be all nicely formatted.&lt;/p&gt;  &lt;p&gt;Here’s some output from ActiPro as text:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:21d3b9cb-44e3-48c3-9d09-0d6093ff0ac0" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; TabWidth
{
  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;
  {
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; _content.GetInt(&lt;/span&gt;&lt;span style="color: #800000;"&gt;@"&lt;/span&gt;&lt;span style="color: #800000;"&gt;TabWidth&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;4&lt;/span&gt;&lt;span style="color: #000000;"&gt;);
  }
  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;
  {
      _content.SetInt(&lt;/span&gt;&lt;span style="color: #800000;"&gt;@"&lt;/span&gt;&lt;span style="color: #800000;"&gt;TabWidth&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;, value);
  }
}&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Here it is again as a bitmap: &lt;/p&gt;

&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_bIhihWOyLpw/SbDO2Q2oD3I/AAAAAAAABjk/obm0porXoRc/s1600-h/image%5B5%5D.png"&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://lh6.ggpht.com/_bIhihWOyLpw/SbDO3Z7gRJI/AAAAAAAABjo/t7NwBR5pOmY/image_thumb%5B3%5D.png?imgmax=800" width="383" height="163" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;and here it is using SyntaxHighlighter 2.0 &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:7490f7c8-1e25-4244-8440-959fc1826bf8" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: csharp;"&gt;public int TabWidth
{
  get
  {
      return _content.GetInt(@&amp;quot;TabWidth&amp;quot;, 4);
  }
  set
  {
      _content.SetInt(@&amp;quot;TabWidth&amp;quot;, value);
  }
}&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://stevedunns.googlepages.com/codeformatterforwindowslivewriter" target="_blank"&gt;Please feel free to read more and download it.&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-1615687804045075963?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/1615687804045075963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=1615687804045075963&amp;isPopup=true' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/1615687804045075963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/1615687804045075963'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/03/new-version-of-code-formatter-plugin.html' title='New version of the Code Formatter Plugin'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_bIhihWOyLpw/SbDO3Z7gRJI/AAAAAAAABjo/t7NwBR5pOmY/s72-c/image_thumb%5B3%5D.png?imgmax=800' height='72' width='72'/><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-5946676158618399087</id><published>2009-03-05T07:16:00.001Z</published><updated>2009-03-05T07:16:21.056Z</updated><title type='text'>Online mind maps in Silverlight</title><content type='html'>&lt;p&gt;I’m a big fan of mind maps.&amp;#160; I use &lt;a href="http://www.mindjet.com/" target="_blank"&gt;MindManager&lt;/a&gt;, but there’s now an online Silverlight alternative from &lt;a href="http://dropmind.com/" target="_blank"&gt;DropMind&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;It’s currently in beta, so there’s a few things that need addressing to make it as nice to use as MindManager (such as keyboard navigation).&amp;#160; Despite this, it looks feature packed compared to other online mind mapping tools I’ve tried.&lt;/p&gt;  &lt;p&gt;There’s also a desktop version.&amp;#160; It has none of the above keyboard problems.&amp;#160; It also looks and feels &lt;em&gt;very&lt;/em&gt; similar to MindManager:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;DropMind&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_bIhihWOyLpw/Sa98NpZgmKI/AAAAAAAABjI/u-HnFpaRMQ4/s1600-h/image%5B5%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_bIhihWOyLpw/Sa98OlsuyTI/AAAAAAAABjM/g5ZM8shXx7s/image_thumb%5B3%5D.png?imgmax=800" width="396" height="407" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;MindManager&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_bIhihWOyLpw/Sa98PxaYPNI/AAAAAAAABjQ/gInJ5KX8uOQ/s1600-h/image%5B16%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_bIhihWOyLpw/Sa98RLBLWcI/AAAAAAAABjU/I18NvSZ2748/image_thumb%5B10%5D.png?imgmax=800" width="416" height="433" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;It’s nice to see Silverlight apps like this.&amp;#160; I’d probably switch to it once all the glitches are resolved.&amp;#160; MindManager’s great, but it comes with a lot of fluff I don’t need, like Office integration and RSS features.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-5946676158618399087?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/5946676158618399087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=5946676158618399087&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5946676158618399087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5946676158618399087'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/03/online-mind-maps-in-silverlight.html' title='Online mind maps in Silverlight'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_bIhihWOyLpw/Sa98OlsuyTI/AAAAAAAABjM/g5ZM8shXx7s/s72-c/image_thumb%5B3%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-5997206026351497820</id><published>2009-03-04T16:19:00.001Z</published><updated>2009-03-04T16:25:06.570Z</updated><title type='text'>Halt, this is StyleCop.  You are in violation of SA1201!</title><content type='html'>&lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/sourceanalysis" target="_blank"&gt;StyleCop&lt;/a&gt; has a &lt;strike&gt;law&lt;/strike&gt; rule named &lt;a href="http://www.thewayithink.co.uk/stylecop/sa1201.htm" target="_blank"&gt;SA1201&lt;/a&gt;. It says that you should put various parts of your code in the correct order.&amp;#160; For the contents of a class this goes like:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Fields&lt;/li&gt;    &lt;li&gt;Constructors&lt;/li&gt;    &lt;li&gt;Finalizers (Destructors)&lt;/li&gt;    &lt;li&gt;Delegates&lt;/li&gt;    &lt;li&gt;Events&lt;/li&gt;    &lt;li&gt;Enums&lt;/li&gt;    &lt;li&gt;Interfaces&lt;/li&gt;    &lt;li&gt;Properties&lt;/li&gt;    &lt;li&gt;Indexers&lt;/li&gt;    &lt;li&gt;Methods&lt;/li&gt;    &lt;li&gt;Structs&lt;/li&gt;    &lt;li&gt;Classes&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Doing all this by hand is tedious, but as with most things, &lt;a href="http://www.jetbrains.com/resharper/" target="_blank"&gt;ReSharper&lt;/a&gt; (R#) makes it easier!&lt;/p&gt;  &lt;p&gt;R# has a couple of features that, when combined, will mean you are fully SA1201 compliant (and, quite possibly well within the &lt;a href="http://www.entertonement.com/clips/39146/You-have-20-seconds-to-comply" target="_blank"&gt;20 seconds compliance window&lt;/a&gt;!)&amp;#160; Firstly, there is a feature called Code Cleanup:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_bIhihWOyLpw/Sa6qILXo-uI/AAAAAAAABi4/tXrO-l3Hi9k/s1600-h/sshot-2%5B5%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="sshot-2" border="0" alt="sshot-2" src="http://lh6.ggpht.com/_bIhihWOyLpw/Sa6qJCqbaMI/AAAAAAAABi8/jPIbfnZdb_o/sshot-2_thumb%5B3%5D.png?imgmax=800" width="410" height="456" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can get R# to do various things during code clean-up.&amp;#160; One of them is Reorder Type Members.&amp;#160; R# does a decent job of moving stuff around by default, but it’s not perfect and doesn’t stop all warnings about SA1201.&amp;#160; Thankfully, Reorder Type Members is configurable.&amp;#160; The interface is straight XML in the R# Options screen.&amp;#160; It’d be nice to have a GUI over it, but as yet (in R# 4.1 and &lt;a href="http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+4.5+Nightly+Builds" target="_blank"&gt;4.5&lt;/a&gt;), there isn’t one.&amp;#160; Thankfully, you can’t bugger things up too much as the XML is validated against an XSD before it’s saved.&lt;/p&gt;  &lt;p&gt;I was going through a legacy project recently and wanted a way to automatically reorder things, so I modified the R# XML configuration.&amp;#160; To get your environment set-up, &lt;a href="http://stevedunns.googlepages.com/ReSharperReorderTypeMembersConfigura.xml" target="_blank"&gt;download the new XML configuration&lt;/a&gt;, go to ReSharper/Options and under languages/C# there an entry named &lt;strong&gt;Type Members Layout&lt;/strong&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_bIhihWOyLpw/Sa6qJ55SnPI/AAAAAAAABjA/-y-3ZbSR77w/s1600-h/sshot-3%5B5%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="sshot-3" border="0" alt="sshot-3" src="http://lh5.ggpht.com/_bIhihWOyLpw/Sa6qLDwyFtI/AAAAAAAABjE/w68NSFcWPvs/sshot-3_thumb%5B3%5D.png?imgmax=800" width="420" height="391" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Deselect &lt;em&gt;Use Default Patterns&lt;/em&gt; check-box and past in the new XML and click OK.&lt;/p&gt;  &lt;p&gt;If you want a C# class that contains most of the things that should be reorganised, &lt;a href="http://stevedunns.googlepages.com/Class1.cs" target="_blank"&gt;download it here&lt;/a&gt;.&amp;#160; Mash it up a bit and then run StyleCop on it to ensure no SA1201 errors.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-5997206026351497820?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/5997206026351497820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=5997206026351497820&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5997206026351497820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5997206026351497820'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/03/halt-this-is-stylecop-you-are-in.html' title='Halt, this is StyleCop.  You are in violation of SA1201!'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_bIhihWOyLpw/Sa6qJCqbaMI/AAAAAAAABi8/jPIbfnZdb_o/s72-c/sshot-2_thumb%5B3%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-709299203569553598</id><published>2009-03-03T11:55:00.001Z</published><updated>2009-03-03T11:55:49.512Z</updated><title type='text'>Hiding your privates from StyleCop</title><content type='html'>&lt;p&gt;&lt;a href="http://stevedunns.blogspot.com/2009/02/stylecop.html" target="_blank"&gt;I like StyleCop&lt;/a&gt; but I didn’t like the fact it produced warnings on private fields and methods.&amp;#160; I was wrong. Not wrong in that I didn’t like warnings on privates, but wrong that I thought there was no way to tell it to stop it.&lt;/p&gt;  &lt;p&gt;Apparently there is.&amp;#160; &lt;a href="http://blogs.msdn.com/sourceanalysis/" target="_blank"&gt;Jason Allor&lt;/a&gt; kindly left a comment saying that it can be configured through the StyleCop settings dialog in Visual Studio. &lt;/p&gt;  &lt;p&gt;I took a look and initially didn’t find it.&amp;#160; I didn’t find it because I assumed there’d be different rules for public and private entities.&amp;#160; But there’s not, you can decide at the &lt;em&gt;rule type&lt;/em&gt; level:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_bIhihWOyLpw/Sa0awff7anI/AAAAAAAABis/YyDDOL41w8c/s1600-h/sshot-1%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="sshot-1" border="0" alt="sshot-1" src="http://lh3.ggpht.com/_bIhihWOyLpw/Sa0axMcd97I/AAAAAAAABiw/VsPPv7fowpo/sshot-1_thumb%5B2%5D.png?imgmax=800" width="376" height="318" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;It’d be nice to have separate rules for public and private.&amp;#160; Currently, I’ve turned off &lt;strong&gt;all &lt;/strong&gt;Documentation rules because I don’t like being warned that I haven’t commented private methods.&amp;#160; However, I’d still like it to give me all the other great warnings if I do decide to comment a particular private method.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-709299203569553598?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/709299203569553598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=709299203569553598&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/709299203569553598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/709299203569553598'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/03/hiding-your-privates-from-stylecop.html' title='Hiding your privates from StyleCop'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_bIhihWOyLpw/Sa0axMcd97I/AAAAAAAABiw/VsPPv7fowpo/s72-c/sshot-1_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-3899971527459743981</id><published>2009-03-03T11:34:00.001Z</published><updated>2009-03-03T11:34:01.369Z</updated><title type='text'>Programs that launch (or should launch) Visual Studio</title><content type='html'>&lt;p&gt;Programs such as &lt;a href="http://msdn.microsoft.com/en-us/library/bb429476(VS.80).aspx" target="_blank"&gt;FxCop&lt;/a&gt; provide links to source files that can be clicked and then edited in Visual Studio.&amp;#160; &lt;/p&gt;  &lt;p&gt;FxCop recently&lt;em&gt; (probably since I went 64bit, but also possibly a side-effect of running Windows 7)&lt;/em&gt; started failing when clicking these links.&amp;#160; It said:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Could not start Microsoft Visual Studio. Try specifying an alternate source code editor in Application Settings.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Maybe it just looks in \Program Files\Microsoft Visual Studio\[whatever version].&amp;#160; Anyway, I couldn’t see anything in the event log or any local FxCop logs, so I just changed the setting under Tools\Settings to use an explicit path to devenv.exe.&lt;/p&gt;  &lt;p&gt;This worked, although it started a new instance of the IDE for every file.&amp;#160; To get around that, you need to use the &lt;strong&gt;/Edit&lt;/strong&gt; argument.&amp;#160; Here’s what it looks like (click to make it bigger):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_bIhihWOyLpw/Sa0VpfS7CrI/AAAAAAAABik/JXo2ssdJd_g/s1600-h/sshot-2%5B6%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="sshot-2" border="0" alt="sshot-2" src="http://lh5.ggpht.com/_bIhihWOyLpw/Sa0VqI_zwYI/AAAAAAAABio/auvddtXA9Oo/sshot-2_thumb%5B4%5D.png?imgmax=800" width="283" height="251" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;blockquote&gt;&lt;/blockquote&gt;  &lt;p&gt;There’s other handy switches, some of which I knew about, like building a particular project/solution (to get the full list, run devenv.exe /?).&amp;#160;&amp;#160; It now uses an existing instance of Visual Studio if one’s present, otherwise it starts one up.&amp;#160; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-3899971527459743981?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/3899971527459743981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=3899971527459743981&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3899971527459743981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3899971527459743981'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/03/programs-that-launch-or-should-launch.html' title='Programs that launch (or should launch) Visual Studio'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_bIhihWOyLpw/Sa0VqI_zwYI/AAAAAAAABio/auvddtXA9Oo/s72-c/sshot-2_thumb%5B4%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-6173033147875507883</id><published>2009-02-26T10:20:00.001Z</published><updated>2009-02-26T10:20:40.190Z</updated><title type='text'>ThoughtWork’s Mingle on X64 machines</title><content type='html'>&lt;p&gt;By default, 32 bit applications installed on 64 bit machines are installed into the \Program Files (x86) directory.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://studios.thoughtworks.com/mingle-agile-project-management"&gt;Mingle&lt;/a&gt;, in particular, Ruby doesn’t like the brackets in this path, hence, when Mingle tries to start, it fails.&amp;#160; It writes the following entries to the log file in the program’s directory:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Failed to load Rails: C:/Program Files (x86)/Mingle_2_2/app/controllers/caching/keys.rb:1: Invalid char `\257’ (‘¯’) in expression C:/Program Files (x86)/Mingle_2_2/vendor/rails/activesupport/lib/active_support/dependencies.rb:505:in `load’ C:/Program Files (x86)/Mingle_2_2/config/../vendor/rails/railties/lib/initializer.rb:475:in `load_application_initializers’ C:/Program Files (x86)/Mingle_2_2/config/../vendor/rails/railties/lib/initializer.rb:474:in `each’ C:/Program Files (x86)/Mingle_2_2/config/../vendor/rails/railties/lib/initializer.rb:474:in `load_application_initializers’ C:/Program Files (x86)/Mingle_2_2/config/../vendor/rails/railties/lib/initializer.rb:145:in `process’ C:/Program Files (x86)/Mingle_2_2/config/../vendor/rails/railties/lib/initializer.rb:93:in `run’ C:/Program Files (x86)/Mingle_2_2/config/environment.rb:116 C:/Program Files (x86)/Mingle_2_2/config/environment.rb:1&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The solution: change the default installation to just \Program Files.&amp;#160; Handy.&amp;#160; If you want to use Mingle.&amp;#160; On a 64 bit machine.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-6173033147875507883?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/6173033147875507883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=6173033147875507883&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/6173033147875507883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/6173033147875507883'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/02/thoughtworks-mingle-on-x64-machines.html' title='ThoughtWork’s Mingle on X64 machines'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-3106196704250181196</id><published>2009-02-24T21:53:00.001Z</published><updated>2009-02-24T21:53:08.547Z</updated><title type='text'>Problems adding an XBox 360 Media Center Extender</title><content type='html'>&lt;p&gt;Skip this if you’re not using a Linksys Wireless N device, Media Center, or an XBox 360!&lt;/p&gt;  &lt;p&gt;After my umpteenth Seagate disk packed up yesterday, I’ve just reinstalled Windows 7 X64.&amp;#160; I have spent the last couple of hours trying to get an XBox 360 connected to Windows Media Center.&lt;/p&gt;  &lt;p&gt;Not too long ago I went through the exact same thing:&amp;#160; Start WMC, Start the XBox,&amp;#160; type the number on the XBox’s screen into WMC, and get nothing.&amp;#160; The last time I did this, it was too late in the day to discover what was wrong or how to fix it – but the next day, everything worked perfectly!&lt;/p&gt;  &lt;p&gt;This time, I went through exactly the same ritual.&amp;#160; I looked at the Security event log and it said that :&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Event 5032 – Audit Failure - Windows Firewall was unable to notify the user that it blocked an application from accepting incoming connections on the network.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;After ensuring that I’d allowed Media Center Extenders through the home network (shortly followed by turning the damn firewall off altogether), I started getting (from the Media Center log under Applications and Services Logs in Event Viewer):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Event 538 - Media Center Extender Setup failed as the Extender was detected on the network but the UPnP search for the Extender failed (timed out after 20000ms).&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This all seemed very familiar and nothing I was doing was making a difference.&amp;#160; It was at this point on my last attempt that I went off to do something else.&amp;#160; This time though, the something else’s opening hours hadn’t yet arrived, so I persevered!&lt;/p&gt;  &lt;p&gt;In the corner of the screen (remember, this is a fresh install), was the Windows Update icon.&amp;#160; I checked to see what it needed to update, and along with the 294 Office 2007 security patches was an update for a &lt;em&gt;Marvell - Network – Wireless-N USB Network Adapter&lt;/em&gt;.&amp;#160; I wondered if this had anything to do with my Linksys Wireless N USB, and it looks like it does.&amp;#160; And after restarting, everything worked great!&lt;/p&gt;  &lt;p&gt;The information from Windows Update showed this information:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Marvell - Network - Wireless-N USB Network Adapter &lt;/p&gt;    &lt;p&gt;Update type: Optional &lt;/p&gt;    &lt;p&gt;DriverUpdate: Marvell Network software update released in October, 2007 &lt;/p&gt;    &lt;p&gt;More information:      &lt;br /&gt;&lt;a href="http://winqual.microsoft.com/support/?driverid=20110859"&gt;http://winqual.microsoft.com/support/?driverid=20110859&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The URL wasn’t much good as it was broken.&amp;#160; The driver information from device manager reads:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Marvell Semiconductor, Inc, version 1.00.04.03 – filename MRVW24C.sys. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;This replaced the Vista drivers that I downloaded and installed from the Cisco site.&lt;/p&gt;  &lt;p&gt;In fact, I’ve just done a search for &lt;em&gt;Marvell Linksys driver&lt;/em&gt;, and it showed &lt;a href="http://forums.linksys.com/linksys/board/message?board.id=Wireless_Adapters&amp;amp;thread.id=10108"&gt;this page&lt;/a&gt;.&amp;#160; This shows how to force the driver on Vista/Windows 7 if it doesn’t show up via Windows Update.&lt;/p&gt;  &lt;p&gt;I hope some of these keywords will help others with this problem.&amp;#160; My heart sank when I searched for the Media Center error and didn’t get 1 single hit!&amp;#160; That shouldn’t happen any more!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-3106196704250181196?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/3106196704250181196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=3106196704250181196&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3106196704250181196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3106196704250181196'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/02/problems-adding-xbox-360-media-center.html' title='Problems adding an XBox 360 Media Center Extender'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-2720638571217272496</id><published>2009-02-23T11:21:00.001Z</published><updated>2009-02-24T13:27:12.502Z</updated><title type='text'>Tool update: Visual Studio Orphaned Items</title><content type='html'>&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_bIhihWOyLpw/SaKGkrGaYdI/AAAAAAAABiU/aP-HiGQpyes/s1600-h/sshot-1%5B7%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="sshot-1" border="0" alt="sshot-1" src="http://lh3.ggpht.com/_bIhihWOyLpw/SaKGl-hxlDI/AAAAAAAABiY/wuon1HPqglg/sshot-1_thumb%5B5%5D.png?imgmax=800" width="240" height="179" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;A while back I did a small simple tool to find files on disk that were once part of a Visual Studio project but are now orphaned (removed from the project but still on disk and in your source repository).&amp;#160; I’ve just updated it to find obsolete files from Visual Studio 2008 projects.&amp;#160; You can download the app or the installer, or the source (or all of them!).&amp;#160; The installer adds a right-click context menu action for .csproj files in Windows Explorer.&lt;/p&gt;  &lt;p&gt;Available &lt;a href="http://stevedunns.googlepages.com/vsorphaneditemsfinder" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-2720638571217272496?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/2720638571217272496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=2720638571217272496&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/2720638571217272496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/2720638571217272496'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/02/tool-update-visual-studio-orphaned.html' title='Tool update: Visual Studio Orphaned Items'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_bIhihWOyLpw/SaKGl-hxlDI/AAAAAAAABiY/wuon1HPqglg/s72-c/sshot-1_thumb%5B5%5D.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-2543969566487017326</id><published>2009-02-21T13:44:00.001Z</published><updated>2009-02-21T13:44:26.318Z</updated><title type='text'>StyleCop</title><content type='html'>&lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/sourceanalysis" target="_blank"&gt;StyleCop&lt;/a&gt; is a tool that looks at your source code and recommends ways to improve readability and consistency.&amp;#160; For instance, it tells you to:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Put things in a consistent order in the file – Constructors first, followed by public methods, followed by private methods etc.&lt;/li&gt;    &lt;li&gt;Put a blank line after a closing brace.&amp;#160; I thought this was a bit anal, but for some reason it makes code much more readable.&amp;#160; &lt;em&gt;On a related note, some people swear by having no blank lines in their source.&amp;#160; Their reasoning: they can see more on screen without having to scroll and can see more of the method on screen at once.&amp;#160; To me, this was like reading a book with no paragraphs.&amp;#160; Also, If you’ve got methods that take up a whole screen, they’re probably &lt;/em&gt;&lt;a href="http://en.wikipedia.org/wiki/Single_responsibility_principle" target="_blank"&gt;&lt;em&gt;doing too much&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and are &lt;/em&gt;&lt;a href="http://www.onjava.com/pub/a/onjava/2004/06/16/ccunittest.html" target="_blank"&gt;&lt;em&gt;too complex&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&amp;#160; I was invited to try it with the reassurance that I’d eventually see the benefit.&amp;#160; I declined, but then realised that I had been ‘trying it’ all along - every time I read the code!&amp;#160; &lt;/em&gt;&lt;/li&gt;    &lt;li&gt;Remove unnecessary parenthesis.&amp;#160; Reminds of a quote:&amp;#160; &lt;em&gt;“Parenthesis (however relevant) are unnecessary.”&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;Add XML comments to methods, properties, and events.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;There’s hundreds of suggestions, mostly good, although there are some issues – here’s mine:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;I generally don’t like to comment private methods, but there doesn’t seem a way to tell it to only warn me if I have public methods that are undocumented.&amp;#160; I hope this’ll be added to the next version.&amp;#160; I don’t like commenting private methods as, if I feel it needs a comment, then the code isn’t self describing and is either a) poorly named, or b) too complex, or c) doing too much.&lt;/li&gt;    &lt;li&gt;StyleCop says don’t precede field names with notation.&amp;#160; I follow the almost ubiquitous practice of preceding private fields with an underscore.&amp;#160; For no other reason than to be able to type &lt;em&gt;underscore &lt;/em&gt;+ &lt;em&gt;ctrl+space &lt;/em&gt;and have intellisense pop-up my private fields.&amp;#160;&amp;#160; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The good news is that it’s possible to turn off&amp;#160; warnings.&amp;#160; It’s also very well thought out in how these settings are managed:&amp;#160; If you think a certain warning is so ridiculous you never want to see it again, you can put it in the StyleCop.Settings file and put this file at the top of your source tree.&amp;#160; If you’ve got a project where it would make sense to turn off a warning just for that project, you can put another StyleCop.Settings file at the project level.&amp;#160; More &lt;a href="http://blogs.msdn.com/sourceanalysis/pages/sharing-source-analysis-settings-across-projects.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I’m wondering if anybody would be brave enough to integrate this in their CI process!&amp;#160; Breaking the build because there’s not a blank line under a brace seems a tad extreme!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-2543969566487017326?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/2543969566487017326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=2543969566487017326&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/2543969566487017326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/2543969566487017326'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2009/02/stylecop.html' title='StyleCop'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-118150884622447000</id><published>2008-11-28T15:19:00.002Z</published><updated>2008-11-28T15:27:44.430Z</updated><title type='text'>Stand-up send-up</title><content type='html'>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/SUcmpZ8hzKA&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/SUcmpZ8hzKA&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-118150884622447000?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/118150884622447000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=118150884622447000&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/118150884622447000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/118150884622447000'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2008/11/stand-up-send-up.html' title='Stand-up send-up'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-6674564964859119900</id><published>2008-11-20T12:04:00.007Z</published><updated>2009-03-06T20:40:34.893Z</updated><title type='text'>C# 4 - Default Parameters</title><content type='html'>Coming from a C++ background, I'm really pleased that there'll eventually be &lt;a href="http://codebetter.com/blogs/matthew.podwysocki/archive/2008/10/29/c-4-0-named-and-optional-parameters-behind-the-scenes.aspx"&gt;default parameters &lt;/a&gt;built into the next version of C#.  But I do think that C++ had a much cleaner way of handling them:  it would only allow defaults from right to left, for instance:
&lt;pre class="brush: csharp; toolbar: false;"&gt;void foo(int a, int b, int c=3, int d=4)&lt;/pre&gt;

It wouldn't let you do:
&lt;pre class="brush: csharp; toolbar: false;"&gt;void foo(int a=1, int b=2, int c, int d)&lt;/pre&gt;

C# will, so for the example above, you'd end up with method calls that could look like:
&lt;pre class="brush: csharp; toolbar: false;"&gt;foo( ,  , 3, 4)&lt;/pre&gt;

One feature that I still really miss from C++ is &lt;span style="font-weight: bold;"&gt;const&lt;/span&gt;.   This keyword could be applied to methods or parameters, so a method declared as:
&lt;pre class="brush: csharp; toolbar: false;"&gt;void foo(int a, int b) const
{
}
&lt;/pre&gt;

would be guaranteed to not modify the state of the object (except for mutable members)

A method declared as:
&lt;pre class="brush: csharp; toolbar: false;"&gt;void foo (const Person person)
{
}&lt;/pre&gt;
would be guaranteed to not modify the person.

Maybe C# 5?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-6674564964859119900?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/6674564964859119900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=6674564964859119900&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/6674564964859119900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/6674564964859119900'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2008/11/c-4-default-parameters.html' title='C# 4 - Default Parameters'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-7023009540502928871</id><published>2008-11-19T11:16:00.002Z</published><updated>2009-03-06T20:52:19.426Z</updated><title type='text'>Adding folders to the Class View in Visual Studio</title><content type='html'>&lt;p&gt;I didn't know this, but you can add folders to the Class View. You can then drag classes to it.&amp;#160;&amp;#160; What's even better, you can drag &lt;span style="font-weight: bold"&gt;methods&lt;/span&gt; to it! &lt;/p&gt;  &lt;p&gt;Thanks to Sara Ford for her &lt;a href="http://blogs.msdn.com/saraford/archive/2008/10/31/did-you-know-you-can-create-folders-to-organize-your-objects-and-methods-within-the-class-view-347.aspx"&gt;post&lt;/a&gt; describing this. &lt;/p&gt;  &lt;p&gt;There's more good news! When you're editing code in the editor and you're over a class or method, you can use the 'Synchronise Class View' command (I've mapped mine to a keyboard short-cut, but you can add a&lt;a href="http://www.danielmoth.com/Blog/2005/05/synchronize-class-view.html"&gt; toolbar item&lt;/a&gt;) to synchronise the Class View to the item you're currently editing.&amp;#160; Once synchronised, you can go to Class View and drag that into one of your folders.&amp;#160; Also, when you do this, you won't upset any of your team with changes to the solution or project files - because these are &lt;span style="font-weight: bold"&gt;your&lt;/span&gt; settings, and hence are stored in the .suo file &lt;span style="font-style: italic"&gt;(which, on the other hand could be a pain, because user option files shouldn't be checked into your source repository)&lt;/span&gt;. &lt;/p&gt;  &lt;p&gt;Anyway, this is the next best thing to a 'bread-crumb' feature in the editor that let's you jump around to favourite places in the the code.&amp;#160;&amp;#160; Maybe the bread-crumb feature will be in the next version of ReSharper?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-7023009540502928871?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/7023009540502928871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=7023009540502928871&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/7023009540502928871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/7023009540502928871'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2008/11/adding-folders-to-class-view-in-visual.html' title='Adding folders to the Class View in Visual Studio'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-7682041183591784780</id><published>2008-10-20T12:51:00.006Z</published><updated>2009-03-06T20:46:13.950Z</updated><title type='text'>Displaying values in the Visual Studio Debugger</title><content type='html'>&lt;p&gt;Normally, when you display values in the Visual Studio debugger, you get formatting (quotes, tabs etc.) included. For instance, if you've got &lt;span style="font-style: italic"&gt;string s = &amp;quot;Hello[tab]World&amp;quot;;&lt;/span&gt; then hovering over s in the debugger displays &amp;quot;Hello\tWorld&amp;quot;. If you wanted to copy a value value to the clipboard (maybe because you landed on an exception and you want to send the error to &lt;strike&gt;the idiot that caused it&lt;/strike&gt; your fellow colleague), you'd probably right click on the value and select 'copy value'. This copies the value to the clipboard. Another way is to use the &lt;span style="font-weight: bold"&gt;immediate window&lt;/span&gt;. Using the example above, typing 's' in the immediate window would produce:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_bIhihWOyLpw/SPyBkOfTnhI/AAAAAAAAARs/ycCmtOKDvtQ/s1600-h/hw1.png"&gt;&lt;img style="cursor: pointer" id="BLOGGER_PHOTO_ID_5259220924226575890" border="0" alt="" src="http://2.bp.blogspot.com/_bIhihWOyLpw/SPyBkOfTnhI/AAAAAAAAARs/ycCmtOKDvtQ/s400/hw1.png" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; To get rid of formatting (the quotes and the control characters), use the &lt;span style="font-style: italic; font-weight: bold"&gt;,nq&lt;/span&gt; option:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_bIhihWOyLpw/SPyBjzDc4dI/AAAAAAAAARk/QemrhnrSNIU/s1600-h/hw2.png"&gt;&lt;img style="cursor: pointer" id="BLOGGER_PHOTO_ID_5259220916861985234" border="0" alt="" src="http://2.bp.blogspot.com/_bIhihWOyLpw/SPyBjzDc4dI/AAAAAAAAARk/QemrhnrSNIU/s400/hw2.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is useful in itself, but it really becomes invaluable if you want to show some XML. With the magical &lt;span style="font-style: italic; font-weight: bold"&gt;,nq&lt;/span&gt; switch, the following code: &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_bIhihWOyLpw/SPyDNmmpDSI/AAAAAAAAAR0/Bbide7cMp8E/s1600-h/x1.png"&gt;&lt;img style="cursor: pointer" id="BLOGGER_PHOTO_ID_5259222734586055970" border="0" alt="" src="http://2.bp.blogspot.com/_bIhihWOyLpw/SPyDNmmpDSI/AAAAAAAAAR0/Bbide7cMp8E/s400/x1.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;produces the following output in the immediate window: &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_bIhihWOyLpw/SPyExCPdxHI/AAAAAAAAASM/Hk0LOH8w1yE/s1600-h/x2.png"&gt;&lt;img style="cursor: pointer" id="BLOGGER_PHOTO_ID_5259224442812089458" border="0" alt="" src="http://4.bp.blogspot.com/_bIhihWOyLpw/SPyExCPdxHI/AAAAAAAAASM/Hk0LOH8w1yE/s400/x2.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Pretty useless, but if you add &lt;span style="font-style: italic; font-weight: bold"&gt;,nq&lt;/span&gt;, you get: &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_bIhihWOyLpw/SPyDvZxIR8I/AAAAAAAAASE/A_QbIwxvBmg/s1600-h/x3.png"&gt;&lt;img style="cursor: pointer" id="BLOGGER_PHOTO_ID_5259223315255936962" border="0" alt="" src="http://4.bp.blogspot.com/_bIhihWOyLpw/SPyDvZxIR8I/AAAAAAAAASE/A_QbIwxvBmg/s400/x3.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Much nicer. &lt;/p&gt;  &lt;p&gt;&lt;span style="font-style: italic; font-weight: bold"&gt;nq&lt;/span&gt; stands for &lt;span style="font-style: italic; font-weight: bold"&gt;nice'n quick, &lt;/span&gt;because it doesn't waste time writing quotes. &lt;/p&gt;  &lt;p&gt;Probably.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-7682041183591784780?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/7682041183591784780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=7682041183591784780&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/7682041183591784780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/7682041183591784780'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2008/10/displaying-values-in-visual-studio.html' title='Displaying values in the Visual Studio Debugger'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_bIhihWOyLpw/SPyBkOfTnhI/AAAAAAAAARs/ycCmtOKDvtQ/s72-c/hw1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-3919031299791654917</id><published>2008-06-27T19:20:00.001Z</published><updated>2009-03-06T20:48:21.304Z</updated><title type='text'>Excluding Items From Code Coverage</title><content type='html'>&lt;div class="Section1"&gt;   &lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt"&gt;There's an attribute in nCover that can be applied to your code to exclude it when doing code coverage.&amp;#160; This is handy for auto-generated types such as web services etc. &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;    &lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt"&gt;The attribute is in the nCover assembly, but most people wouldn't want to ship with their assemblies.&amp;#160; Fortunately, you can define your own attribute.&amp;#160; If you're using TestDriven.NET, call it 'CoverageExcludeAttribute', if not, call it what you want.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;    &lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt"&gt;When using NCover, pass the name of the attribute in the&lt;i&gt; /ea WhateverYouCalledTheAttribute&lt;/i&gt; command line attribute.&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;    &lt;p&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt"&gt;Here's the code, with comments.&amp;#160; Remember, don't put this in a namespace!&lt;/span&gt; &lt;/p&gt;    &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:3b5b5afc-3eaf-45f6-b87a-cb22db4d5e09" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: csharp;"&gt;/// &amp;lt;summary&amp;gt; 
/// Use this attribute on types that do not need code coverage analysis. 
/// Such types are auto-generated types, such as web services etc. 
/// 
/// This attribute is used by TestDriven.NET to exclude the type/method in the 'test with coverage' functionality. 
/// This attribute can also be passed to NCover proper by using the /ea CoverageExcludeAttribute command line. 
/// &amp;lt;/summary&amp;gt; 
/// &amp;lt;remarks&amp;gt; 
/// Note that this should NOT be part of a namespace! 
/// &amp;lt;/remarks&amp;gt; 
[CoverageExclude] 
class CoverageExcludeAttribute : Attribute { } 
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-3919031299791654917?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/3919031299791654917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=3919031299791654917&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3919031299791654917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3919031299791654917'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2008/06/excluding-items-from-code-coverage.html' title='Excluding Items From Code Coverage'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-7505208070748482700</id><published>2008-06-21T18:58:00.001Z</published><updated>2008-06-21T18:58:27.015Z</updated><title type='text'>New!</title><content type='html'>&lt;p class="mobile-photo"&gt;&lt;a href="http://1.bp.blogspot.com/_bIhihWOyLpw/SF1PUw7-LlI/AAAAAAAAAMU/BdTnqGYC8Ew/s1600-h/ooh_look-707018.jpg"&gt;&lt;img src="http://1.bp.blogspot.com/_bIhihWOyLpw/SF1PUw7-LlI/AAAAAAAAAMU/BdTnqGYC8Ew/s320/ooh_look-707018.jpg"  border="0" alt="" id="BLOGGER_PHOTO_ID_5214411161717321298" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class=Section1&gt;  &lt;p class=MsoNormal&gt;&lt;span style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-7505208070748482700?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/7505208070748482700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=7505208070748482700&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/7505208070748482700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/7505208070748482700'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2008/06/new.html' title='New!'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_bIhihWOyLpw/SF1PUw7-LlI/AAAAAAAAAMU/BdTnqGYC8Ew/s72-c/ooh_look-707018.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-1287898712392889253</id><published>2007-12-12T21:21:00.001Z</published><updated>2007-12-12T21:21:32.675Z</updated><title type='text'>Code Formatter Plug-in for Windows Live Writer</title><content type='html'>&lt;p&gt;Version 1.0.0.4 of my plug-in for Windows Live Writer (WLW) is now available.&amp;#160; This version is for the released version of WLW.&amp;#160;&amp;#160; As with the previous version, the following languages are supported:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Assembly &lt;/li&gt;    &lt;li&gt;BatchFile &lt;/li&gt;    &lt;li&gt;CSharp &lt;/li&gt;    &lt;li&gt;CSS &lt;/li&gt;    &lt;li&gt;HTML &lt;/li&gt;    &lt;li&gt;INIFile &lt;/li&gt;    &lt;li&gt;Java &lt;/li&gt;    &lt;li&gt;JScript &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lua.org/about.html"&gt;Lua&lt;/a&gt; (pronounced LOO-ah) &lt;/li&gt;    &lt;li&gt;MSIL &lt;/li&gt;    &lt;li&gt;Pascal &lt;/li&gt;    &lt;li&gt;Perl &lt;/li&gt;    &lt;li&gt;PHP &lt;/li&gt;    &lt;li&gt;PowerShell &lt;/li&gt;    &lt;li&gt;Python &lt;/li&gt;    &lt;li&gt;SQL &lt;/li&gt;    &lt;li&gt;VBDotNet &lt;/li&gt;    &lt;li&gt;VBScript &lt;/li&gt;    &lt;li&gt;XAML &lt;/li&gt;    &lt;li&gt;XML &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Download it now from my &lt;a href="http://tools.dunnhq.com" target="_blank"&gt;tools&lt;/a&gt; page.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Thanks to everyone who left comments and feedback;&amp;#160; this addressed two issues reported - 1 with inserting pictures and then editing a block of code, and the other was with duplicate scroll-bar options. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-1287898712392889253?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/1287898712392889253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=1287898712392889253&amp;isPopup=true' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/1287898712392889253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/1287898712392889253'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/12/code-formatter-plug-in-for-windows-live.html' title='Code Formatter Plug-in for Windows Live Writer'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-5255595543201577852</id><published>2007-09-23T10:14:00.001Z</published><updated>2007-09-23T10:14:32.816Z</updated><title type='text'>New version of the Code Formatter Plug-in for Windows Live Writer.</title><content type='html'>&lt;p&gt;Version 1.0.0.3 of my plug-in for Windows Live Writer is now available.&amp;#xA0; This version works with the new Beta 3 version of WLW (and also older versions).&lt;/p&gt;  &lt;p&gt;Languages now include:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Assembly&lt;/li&gt;    &lt;li&gt;BatchFile&lt;/li&gt;    &lt;li&gt;CSharp&lt;/li&gt;    &lt;li&gt;CSS&lt;/li&gt;    &lt;li&gt;HTML&lt;/li&gt;    &lt;li&gt;INIFile&lt;/li&gt;    &lt;li&gt;Java&lt;/li&gt;    &lt;li&gt;JScript&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lua.org/about.html"&gt;Lua&lt;/a&gt; (pronounced LOO-ah)&lt;/li&gt;    &lt;li&gt;MSIL&lt;/li&gt;    &lt;li&gt;Pascal&lt;/li&gt;    &lt;li&gt;Perl&lt;/li&gt;    &lt;li&gt;PHP&lt;/li&gt;    &lt;li&gt;PowerShell&lt;/li&gt;    &lt;li&gt;Python&lt;/li&gt;    &lt;li&gt;SQL&lt;/li&gt;    &lt;li&gt;VBDotNet&lt;/li&gt;    &lt;li&gt;VBScript&lt;/li&gt;    &lt;li&gt;XAML&lt;/li&gt;    &lt;li&gt;XML&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Download it now from my &lt;a href="http://tools.dunnhq.com" target="_blank"&gt;tools&lt;/a&gt; page.&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-5255595543201577852?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/5255595543201577852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=5255595543201577852&amp;isPopup=true' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5255595543201577852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5255595543201577852'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/09/new-version-of-code-formatter-plug-in.html' title='New version of the Code Formatter Plug-in for Windows Live Writer.'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-4901223238801208436</id><published>2007-08-20T16:25:00.001Z</published><updated>2007-08-20T16:25:16.893Z</updated><title type='text'>If Agile is so good, why haven't we always done it?</title><content type='html'>&lt;p&gt;&lt;a href="http://processpeoplepods.blogspot.com/"&gt;Fred George&lt;/a&gt; has an &lt;a href="http://processpeoplepods.blogspot.com/2007/08/three-critical-enablers-for-agile.html"&gt;interesting post&lt;/a&gt; on his successfulness with Agile processes.&amp;nbsp; He asks, if Agile is so much better, why didn't it emerge earlier?&lt;/p&gt; &lt;p&gt;He thankfully rules out stupidity and instead lists the three enablers that we have today that we didn't have back then (Fred goes back to the 70's, but I'd say these were just as relevant for most of the 80's):&lt;/p&gt; &lt;ol&gt; &lt;li&gt;We didn't have the languages (Java, C#, Ruby) and techniques (OO, rules engines) to write code that could be changed. Our paradigms were actually the opposite: &lt;em&gt;Design your data structures, and the code writes itself.&lt;/em&gt; &lt;li&gt;JIT (Lean) hadn't made it out of the automotive manufacturing sector.  &lt;li&gt;We didn't have the &lt;em&gt;horsepower&lt;/em&gt;. I have more memory in my watch than I had in my first computer. And don't think of comparing an entry iPod to the first PC.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;I'm trying to imagine how&amp;nbsp;horrendous it would be&amp;nbsp;to try and mock some behavior written in &lt;a title="6502 assember" href="http://www.geocities.com/profdredd/cprogram/6502_ml.html" target="_blank"&gt;6502 assembler&lt;/a&gt; in a unit test, on the &lt;a href="http://www.lemon64.com/games/list.php?type=coder&amp;amp;name=Steve%20Dunn" target="_blank"&gt;Commodore 64&lt;/a&gt;!&amp;nbsp;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-4901223238801208436?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/4901223238801208436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=4901223238801208436&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4901223238801208436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4901223238801208436'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/08/if-agile-is-so-good-why-haven-we-always.html' title='If Agile is so good, why haven&amp;#39;t we always done it?'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-4104996582307314106</id><published>2007-07-19T10:13:00.001Z</published><updated>2007-07-19T15:01:17.243Z</updated><title type='text'>Challenging Conventions with Test First Development</title><content type='html'>&lt;p&gt;I've just read a &lt;a href="http://blog.objectmentor.com/articles/2007/07/17/testing-will-challenge-your-conventions"&gt;great post&lt;/a&gt; over at Tim Ottinger's blog.&amp;nbsp; In it he discusses how test first development challenges conventional development.&amp;nbsp; He makes several interesting points, some of which include:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;Point 3: &lt;em&gt;Private makes less sense than it used to. You can’t test anything that’s private.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This is something I often &lt;a href="http://stevedunns.blogspot.com/2007/05/object-oriented-vs-test-oriented.html"&gt;ponder over&lt;/a&gt;.&amp;nbsp; Making things private makes your &lt;em&gt;intent&lt;/em&gt; very clear, which I think is very important.&amp;nbsp; But private implementation is still a unit of code that needs testing.&amp;nbsp; Then again, as described in &lt;a href="http://www.amazon.co.uk/Test-Driven-Development-Practical-Guide/dp/0131016490"&gt;Test Driven Development: A Practical Guide&lt;/a&gt;,&amp;nbsp; unit tests should test the facets of &lt;em&gt;behavior.&amp;nbsp; &lt;/em&gt;As &lt;a href="http://daveastels.com/"&gt;Dave Astels&lt;/a&gt; puts it in this &lt;a href="http://daveastels.com/2005/07/05/a-new-look-at-test-driven-development/"&gt;blog post&lt;/a&gt;:&lt;/p&gt; &lt;p&gt;&lt;em&gt;"...&amp;nbsp;the idea of “unit” is a major problem. First of all it’s a vague term, and second it implies a structural division of the code (i.e. people think that they have to test methods or classes). We shouldn’t be thinking about units… we should be thinking about facets of behaviour."&lt;/em&gt;&lt;/p&gt; &lt;p&gt;To me, the term 'facets of behaviour' reads that 'behaviour' has 'facets', and that private implementation makes up each facet.&amp;nbsp; So by testing the facets of behaviour, you are really testing units of private implementation (i.e. private methods).&amp;nbsp; This point may be worthy of a new post...&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;Point 4:&amp;nbsp; &lt;em&gt;The fat constructor argument list is a concession to the need for isolation and testing with mocks...&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Good comment.&amp;nbsp; I always refactor any code I see with a fat parameter list so it takes a 'property bag' instead.&amp;nbsp; In ReSharper, this refactoring is called 'ExtractClassFromParameters'.&amp;nbsp; The benefit of this is cleaner, more separate code, and also overcomes C#'s limitation of not having default parameters (i.e. you leave it null/default in the property bag).&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;Point 7:&amp;nbsp;&lt;em&gt; Hard to use class interfaces are now hard for you to use...&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Exactly.&amp;nbsp; Which is why I find TDD a great way to figure out 'how to design an API/Framework' rather than 'how to implement the API/Framework to achieve something'.&amp;nbsp; Something that made a lot of sense when reading the &lt;a href="http://stevedunns.blogspot.com/2007/04/framework-design-guidelines-is.html"&gt;Framework Design Guidelines&lt;/a&gt; is to forget OO when designing the public interface to an API - i.e. design it so it's easy to use for the most common scenario.&amp;nbsp; Exactly what is achieved by practicing TDD.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-4104996582307314106?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/4104996582307314106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=4104996582307314106&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4104996582307314106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4104996582307314106'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/07/challenging-conventions-with-test-first.html' title='Challenging Conventions with Test First Development'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-5924244619499286203</id><published>2007-07-05T10:15:00.001Z</published><updated>2007-07-05T10:15:19.901Z</updated><title type='text'>Handy .NET Cheat Sheets</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://john-sheehan.com/blog" target="_blank"&gt;John Sheehan&lt;/a&gt; has some great &lt;a href="http://john-sheehan.com/blog/index.php/net-cheat-sheets/" target="_blank"&gt;cheat sheets&lt;/a&gt; on string formatting, ASP.NET Page Lifecycle and Visual Studio code snippets.&amp;nbsp; Very handy.&amp;nbsp; I'm sure there's a medical&amp;nbsp;explanation as to why it's impossible to remember string formatting parameters for more than 1 minute after you've&amp;nbsp;discovered them!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-5924244619499286203?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/5924244619499286203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=5924244619499286203&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5924244619499286203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5924244619499286203'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/07/handy-net-cheat-sheets.html' title='Handy .NET Cheat Sheets'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-3224027422899205273</id><published>2007-07-04T17:02:00.001Z</published><updated>2007-07-04T17:04:20.037Z</updated><title type='text'>Getting 'code://' hyperlinks into FlexWiki</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;Reflector&lt;/a&gt;, when installed, adds a "&lt;em&gt;code://&lt;/em&gt;" protocol handler, enabling hyperlinks to specified types in assemblies.&amp;nbsp; This handler is similar to http:// or ftp://, but instead of taking you to a web site, it takes you to a type in an assembly!&lt;/p&gt; &lt;p&gt;For example, &lt;em&gt;code://System.Web/System.Web.UI.WebControls.WebControl &lt;/em&gt;will launch Reflector and navigate to the WebControl type in the System.Web.UI.WebControls namespace.&lt;/p&gt; &lt;p&gt;Custom types can also be navigated to, although the associated assembly must be loaded first. &lt;/p&gt; &lt;p&gt;By default, FlexWiki does not handle all protocol handlers. To get it to handle the code:// protocol, a recompile is needed.&amp;nbsp; I'm working with version &lt;a href="http://builds.flexwiki.com/download/FlexWikiCore-20/2.0.0.41/"&gt;2.0.0.41&lt;/a&gt;. &lt;a href="http://builds.flexwiki.com/download/FlexWikiCore-20/"&gt;Later versions&lt;/a&gt; are now available, but the code should be in a similar place.&amp;nbsp; So, for version 2.0.0.41, changes&amp;nbsp;are needed to&amp;nbsp;the file:&amp;nbsp;&lt;em&gt; FlexWikiCore-2.0.0.41-src\EngineSource\Formatter.cs&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;Change lines &lt;strong&gt;1706&lt;/strong&gt; and &lt;strong&gt;1707 &lt;/strong&gt;- adding the '&lt;strong&gt;code|&lt;/strong&gt;' segment next to the &lt;em&gt;https?|&lt;/em&gt; text:&lt;/p&gt; &lt;p&gt; &lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:36dcb062-d194-4ff1-9c35-dc7e1b8bbf1d" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF; "&gt;static&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt; urlPattern &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; 
  &lt;/span&gt;&lt;span style="color: #000000; "&gt;@&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;((https?|code|ftp|gopher...&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt; ) ;

&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;static&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt; urlPatternInBrackets &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; 
  &lt;/span&gt;&lt;span style="color: #000000; "&gt;@&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;((https?|code|ftp|gopher...&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt; ) ;
&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I must say, it's very handy for your team to be able to navigate directly to code from a Wiki entry.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-3224027422899205273?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/3224027422899205273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=3224027422899205273&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3224027422899205273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3224027422899205273'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/07/getting-hyperlinks-into-flexwiki.html' title='Getting &amp;#39;code://&amp;#39; hyperlinks into FlexWiki'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-1449968863275090637</id><published>2007-06-22T09:03:00.001Z</published><updated>2007-06-22T09:03:54.703Z</updated><title type='text'>ReSharper 3.0 released</title><content type='html'>&lt;p&gt;The new release of &lt;a href="http://www.jetbrains.com/resharper/"&gt;ReShaper&lt;/a&gt; has a great set of &lt;a href="http://www.jetbrains.com/resharper/features/newfeatures.html"&gt;new features&lt;/a&gt; and seems to be very stable.&amp;nbsp; The only downside:&amp;nbsp; it doesn't yet run in&amp;nbsp; Visual Studio 2008 (Orcas).&amp;nbsp; This is planned for version 4.0 which is planned for release at the end of the year.&amp;nbsp; The lack of ReSharper may just put off beta testing the new Visual Studio.&amp;nbsp; If I hear of how to get it to work, I'll post it here.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-1449968863275090637?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/1449968863275090637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=1449968863275090637&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/1449968863275090637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/1449968863275090637'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/06/resharper-30-released.html' title='ReSharper 3.0 released'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-2479346566812645339</id><published>2007-06-19T10:58:00.001Z</published><updated>2007-06-19T10:58:36.126Z</updated><title type='text'>Framework design lecture avaliable for download</title><content type='html'>&lt;p&gt;&lt;a href="http://blogs.msdn.com/kcwalina/default.aspx"&gt;Krzysztof Cwalina&lt;/a&gt;, co-author of the excellent &lt;a href="http://www.amazon.co.uk/Framework-Design-Guidelines-Conventions-Development/dp/0321246756"&gt;Framework Design Guidelines&lt;/a&gt; book,&amp;nbsp;did an API design lecture a little while back and it's now available for download &lt;a href="http://download.microsoft.com/download/8/0/8/808412ec-2561-413d-a9e3-5cd47d37d763/FDGNetCast.zip"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-2479346566812645339?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/2479346566812645339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=2479346566812645339&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/2479346566812645339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/2479346566812645339'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/06/framework-design-lecture-avaliable-for.html' title='Framework design lecture avaliable for download'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-7167082622153137664</id><published>2007-05-17T14:25:00.001Z</published><updated>2007-05-17T14:40:59.256Z</updated><title type='text'>Object Oriented vs Test Oriented</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://weblogs.asp.net/rosherove/default.aspx"&gt;Roy&lt;/a&gt; is debating &lt;a href="http://weblogs.asp.net/rosherove/archive/2007/02/25/fxcop-is-heading-in-the-wrong-direction-no-testability-whatsoever.aspx"&gt;this very topic&lt;/a&gt; - that is - for any API that needs to be unit-tested, do we forego OOD principles, such as hiding irrelevant stuff, in favour of testability?&amp;nbsp;  &lt;p&gt;To summarise Roy's case:&amp;nbsp; he's using public bits of the &lt;a href="http://www.gotdotnet.com/Team/FxCop/"&gt;FxCop&lt;/a&gt; API to automate (unit-test) his custom rules - but... the FxCop team have realised they've got a bunch of types that shouldn't be exposed and will be making them internal in the next 'Orcas' release.&amp;nbsp; This means that Roy's unit-tests will not compile against the new API.  &lt;p&gt;I think the issue here is Roy using something in the API that wasn't intended to be exposed&amp;nbsp;but is rather useful; that is, offering an API to automate custom rules. From what I can see, the FxCop team are quite correctly 'concealing' types that shouldn't be exposed; I for one would be glad of this decision if I were looking through their API &lt;a href="http://www.regdeveloper.co.uk/2005/12/29/first_among_equals/"&gt;'contracts'&lt;/a&gt; -&amp;nbsp;I wouldn't want to spend time creating and trying to use an exposed type if it weren't mean to be exposed.  &lt;p&gt;I do see the need to automate testing of custom rules, but I think this should be designed as appopriate additions to the API for that particular purpose (rather than relying on accidentally exposed types spread throughout the API to acheive the same thing).&amp;nbsp; This way, the API stays tight, and also enables a more succinct, targeted API for automating tests for&amp;nbsp;custom rules.&lt;/p&gt; &lt;p&gt;Of course, this doesn't anwser the more general question "&lt;strong&gt;How do I design an API that hides irrelevant stuff but also enables the irrelevant stuff to be tested?&lt;/strong&gt;" &lt;/p&gt; &lt;p&gt;In fact, in the paragraph above, I was going to use the term 'How &lt;strong&gt;do I design an API that is both OO and easily tested&lt;/strong&gt;', but, as &lt;a href="http://msdn2.microsoft.com/en-us/library/czefa0ke(vs.71).aspx"&gt;Framework Design Guidelines&lt;/a&gt; correctly states, API's are not meant to be Object Oriented (the implementation is OO, not the public API).  &lt;p&gt;So, I suppose the question really becomes &lt;strong&gt;'How do I hide my OO implementation but make it easily testable?&lt;/strong&gt;"  &lt;p&gt;One way is to have the unit tests in with the implementation. I'd prefer not to do this, but I've done it in the past. I've also taken the other route and made the odd type here and there public instead of internal so I can test externally. &lt;p&gt;I've been toying with the idea of having a &lt;em&gt;'Unit Test Facade'&lt;/em&gt; object in my OO code/API. Anyone use the 'API' can see my &lt;a href="http://www.jot.fm/issues/issue_2004_06/article2/article2.pdf"&gt;intent&lt;/a&gt; from what's exposed, and anyone running unit tests can exercise the implementation via the facade. Of course, this adds overhead, but does make the distinction between the API and implementation.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-7167082622153137664?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/7167082622153137664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=7167082622153137664&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/7167082622153137664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/7167082622153137664'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/05/object-oriented-vs-test-oriented.html' title='Object Oriented vs Test Oriented'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-832502870527983207</id><published>2007-05-09T16:26:00.001Z</published><updated>2007-05-09T16:27:11.706Z</updated><title type='text'>Uploading to an FTP server with parameters</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;p&gt;This post will have a limited audience (even more limited than my normal posts!), but if you're searching for a solution to this particular problem, I hope you'll be glad you found this.&lt;/p&gt; &lt;p&gt;I was recently tasked with uploading a file to an FTP server. I &lt;a href="http://www.hanselman.com/blog/SoftwareEstimationRememberThatTargetsAreNotEstimates.aspx"&gt;optimistically estimated&lt;/a&gt; that it shouldn't take long as we're using .NET 2.0 and there's FTP stuff in 2.0. &lt;/p&gt; &lt;p&gt;But, the particular server I had to write to took parameters on the PUT command (something I'd never seen before). The put looked something like this:&lt;br&gt;&lt;em&gt;PUT&amp;nbsp;thefile.txt %destinationFilename.txt%param2%%param4&lt;/em&gt; &lt;/p&gt; &lt;p&gt;The parameters tell the server things like what 'mailbox' to use, what account to use to write the file, etc. etc.  &lt;p&gt;A&amp;nbsp;quick bit of info on FTP:&amp;nbsp; you first send&amp;nbsp;the &lt;strong&gt;PUT&lt;/strong&gt; &lt;em&gt;request&lt;/em&gt;, and get&amp;nbsp;a &lt;em&gt;response&lt;/em&gt;, followed by other &lt;em&gt;requests &lt;/em&gt;(for things like credentials), followed ultimately by sending a &lt;strong&gt;STOR&lt;/strong&gt; &lt;em&gt;command&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;The .NET 2.0 implementation of FtpWebRequest does not take into account differences between the &lt;em&gt;'request&lt;/em&gt; (PUT)' parameters and the '&lt;em&gt;command &lt;/em&gt;(STOR) parameters'.&lt;/p&gt; &lt;p&gt;To get around this, one must use sockets directly.&amp;nbsp; I found a &lt;a href="http://support.microsoft.com/kb/812409"&gt;Microsoft KB article&lt;/a&gt; that contained just that.&amp;nbsp; The sample demonstrated using pluggable protocol handlers.&amp;nbsp; I removed the bits that weren't relevant and modified it to handle &lt;em&gt;command&lt;/em&gt; parameters.&lt;/p&gt; &lt;p&gt;I fronted all this with an &lt;strong&gt;FtpTransfer&lt;/strong&gt; class that deals with just uploading files.&amp;nbsp;Typical usage looks like this: &lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:fa12bdcc-e437-48b5-b8da-4a4fcf312e13" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000; "&gt;FtpTransfer ftpTransfer &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; FtpTransfer( 
    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; Uri( &lt;/span&gt;&lt;span style="color: #000000; "&gt;@&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;ftp://serverRequiringParameters&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt; ), 
    &lt;/span&gt;&lt;span style="color: #000000; "&gt;@&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;yourUsername&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;, 
    &lt;/span&gt;&lt;span style="color: #000000; "&gt;@&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;yourPassword&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt; );

ftpTransfer.UploadFileWithParameters( 
    &lt;/span&gt;&lt;span style="color: #000000; "&gt;@&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;c:\temp\ftptest.txt&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;, 
    &lt;/span&gt;&lt;span style="color: #000000; "&gt;@&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;destinationFilename.txt&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;, 
    &lt;/span&gt;&lt;span style="color: #000000; "&gt;@&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;%destinationFilename.txt%PARAM2%PARAM3&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt; );&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;The source (and a Visual Studio 2005 project) can be download &lt;a href="http://dunnhq.com/SimpleFtpWithParameterisedPut.zip"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-832502870527983207?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/832502870527983207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=832502870527983207&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/832502870527983207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/832502870527983207'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/05/uploading-to-ftp-server-with-parameters.html' title='Uploading to an FTP server with parameters'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-5292469224293365465</id><published>2007-04-18T20:15:00.001Z</published><updated>2007-04-18T20:15:32.732Z</updated><title type='text'>Beta Testing Windows Home Server</title><content type='html'>&lt;p&gt;Time to try another beta OS from Microsoft. This time, &lt;strong&gt;Windows Homer Server&lt;/strong&gt;.&amp;nbsp; Thirty seconds in and I'm getting my first error (well, it's better than&amp;nbsp;waiting 30+ minutes like back in the days of the Windows 2000 beta!)&lt;br&gt;The error was "&lt;strong&gt;Could not initialize UI subsystem&lt;/strong&gt;". I looked around the forums and found suggestions to try and set the DVD&lt;br&gt;as the first boot device. Mine already was. I then found a suggestion to use different DVD burning software. Rubbish I thought and carried on searching.&lt;br&gt;Having come to a dead-end, I tried what was suggested and downloaded the free 'ImgBurn' utility. This software is great. Not only did it fix the installation problem, but it's also a light-weight utility to burn stuff to CD's and DVD's (190mb for Nero 7, 1.5mb for ImgBurn!).&amp;nbsp; Sold!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-5292469224293365465?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/5292469224293365465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=5292469224293365465&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5292469224293365465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5292469224293365465'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/04/beta-testing-windows-home-server.html' title='Beta Testing Windows Home Server'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-62028936361783045</id><published>2007-04-02T14:17:00.000Z</published><updated>2007-05-12T19:11:10.784Z</updated><title type='text'>Framework Design Guidelines</title><content type='html'>Framework Design Guidelines is a fantastic book about er, guidelines for designing frameworks (API's). Krzyztof, one of the authors, has now &lt;a href="http://www.researchchannel.org/prog/displayevent.aspx?rID=11087&amp;amp;fID=2740"&gt;posted a video of a talk &lt;/a&gt;he did about this very subject.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-62028936361783045?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/62028936361783045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=62028936361783045&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/62028936361783045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/62028936361783045'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/04/framework-design-guidelines-is.html' title='Framework Design Guidelines'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-194124793454938226</id><published>2007-03-19T20:43:00.001Z</published><updated>2007-05-09T14:59:11.013Z</updated><title type='text'>Running unit tests in Visual Studio Express</title><content type='html'>&lt;p&gt;The brilliant &lt;a href="http://testdriven.net/"&gt;TestDriven.net&lt;/a&gt;&amp;nbsp;can't run in Visual Studio Express (well, from what I've heard, it &lt;strong&gt;can&lt;/strong&gt;, but &lt;a href="http://weblogs.asp.net/nunitaddin/archive/2006/10/16/What-happened-to-TestDriven.NET-1.0_3F00_.aspx"&gt;Microsoft asked for it to be removed&lt;/a&gt;).&lt;/p&gt; &lt;p&gt;Therefore, to run unit tests in Visual Studio Express, you must set your debugger application to point to NUnit.exe (or the brilliant &lt;a href="http://www.mbunit.com/"&gt;MBUnit&lt;/a&gt;).&amp;nbsp; This isn't straightforward in Express and means editing the .csproj file by hand and telling it to run the NUnit exe.&lt;/p&gt; &lt;p&gt;Today, I wanted to run and debug some unit tests I'd written in the &lt;a href="http://msdn2.microsoft.com/en-us/xna/default.aspx"&gt;XNA&lt;/a&gt; &lt;a href="http://msdn2.microsoft.com/en-us/xna/aa937795.aspx"&gt;Game Studio Express&lt;/a&gt; (Visual Studio Express with some XNA bits bolted on).&amp;nbsp; I couldn't have the excellent right click/run unit test feature and I thought there's got to be a better way than editing the .csproj file manually.&lt;/p&gt; &lt;p&gt;So I changed the unit test project to be a console application and added this to the Main method.&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:a40dc957-9ca6-4345-b34f-ae444823fb7c" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="overflow: auto; background-color: white"&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style="color: #000000"&gt;    &lt;/span&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;static&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt;&lt;span style="color: #000000"&gt; Main( )&lt;br&gt;    {&lt;br&gt;      AppDomain.CurrentDomain.ExecuteAssembly( &lt;br&gt;        &lt;/span&gt;&lt;span style="color: #000000"&gt;@"&lt;/span&gt;&lt;span style="color: #000000"&gt;C:\Program Files\NUnit-Net-2.0 2.2.9\bin\NUnit-console.exe&lt;/span&gt;&lt;span style="color: #000000"&gt;"&lt;/span&gt;&lt;span style="color: #000000"&gt;,&lt;br&gt;        &lt;/span&gt;&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;&lt;span style="color: #000000"&gt;,&lt;br&gt;        &lt;/span&gt;&lt;span style="color: #0000ff"&gt;new&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&lt;span style="color: #000000"&gt;[ ] { Assembly.GetExecutingAssembly( ).Location } );&lt;br&gt;    }&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;&lt;br&gt;
&lt;p&gt;And it worked.&amp;nbsp; Which was nice.&lt;/p&gt;
&lt;h1&gt;Update:&lt;/h1&gt;
&lt;p&gt;Jamie recently left a message saying that the new Beta version DOES support Express editions!&amp;nbsp; Read his post &lt;a href="http://weblogs.asp.net/nunitaddin/archive/2007/04/02/express-sku-support.aspx"&gt;here&lt;/a&gt; and get &lt;a href="http://www.testdriven.net/download.aspx"&gt;downloading&lt;/a&gt; straight away!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-194124793454938226?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/194124793454938226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=194124793454938226&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/194124793454938226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/194124793454938226'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/03/running-unit-tests-in-visual-studio.html' title='Running unit tests in Visual Studio Express'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-3223891746282861535</id><published>2007-02-25T17:48:00.001Z</published><updated>2007-02-25T17:48:27.011Z</updated><title type='text'>Email certificate popups</title><content type='html'>&lt;p&gt;I recently switched to Vista and&amp;nbsp;Office 2007.&amp;nbsp; I set-up Outlook with the details of my email certificate.&amp;nbsp; The trouble is, whenever sending a message, Vista pops up a dialog asking whether to grant or deny permission to the certificate.&amp;nbsp; The exact text is:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;"Grant or Deny this application permission to use this key".&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The way around this is to not use Outlook to install the certificate but to right click on the certificate in Explorer and let Vista install it.&amp;nbsp; Another important thing when doing this is to NOT click the Strong option -&amp;nbsp;this is what causes the prompting - leave it as Medium.&lt;/p&gt; &lt;p&gt;To reinstall the certificate:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Go to Internet Explorer/Tools/Option/Content/Certificates then Export your certificate (checking the box to delete it after export).&amp;nbsp; &lt;/li&gt; &lt;li&gt;Then, right click from Explorer and select Install.&amp;nbsp; &lt;/li&gt; &lt;li&gt;When this is done, reselect the certificate from Outlook - Tools/Trust Center/E_mail Security.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-3223891746282861535?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/3223891746282861535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=3223891746282861535&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3223891746282861535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3223891746282861535'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/02/email-certificate-popups.html' title='Email certificate popups'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-3597345955261188335</id><published>2007-02-11T18:29:00.005Z</published><updated>2010-12-13T08:57:24.056Z</updated><title type='text'>A tool for converting animated GIFS to spritemaps</title><content type='html'>&lt;p&gt;I'm having a lot of fun playing around with the XNA development kit.  One day I'll get around to learning 3D but for now I'm still having too much fun with sprites!  I wanted a tool that took an animated GIF and produced a spritesheet (a bitmap with each frame of the GIF).  &lt;/p&gt; &lt;p&gt;From this:&lt;/p&gt; &lt;p&gt;&lt;img src="http://1006942498667707091-a-1802744773732722657-s-sites.googlegroups.com/site/stevedunns/TestImage2.gif?attachauth=ANoY7crAPox1-gfdl8n5YTrpiuspOYKA8vYDRwytIDkAppW-d4UN7Dt3JSmEPQYtivw6-cNfkbMTfW7qjUoLFlrV_-l7JDcRX3cezrS1_epq5X2pnefaYOych9BAyhKplfW_PPhwIlxWXAxP4hjNfi6PVqOCA574xHluTp0dzTUr7YfiVZpixvRkEUdji0TRW8NguYDxcycK&amp;attredirects=0" /&gt; &lt;/p&gt; &lt;p&gt;... to this:&lt;/p&gt; &lt;p&gt;&lt;img src="http://sites.google.com/site/stevedunns/prisoner-full.jpg" /&gt; &lt;/p&gt; &lt;p&gt;I couldn't find a tool forthis (although I'm sure they exist), so I did my own and uploaded it to my &lt;a title="Steve Dunn's Tools" href="http://dunnhq.com/tools" target="_blank"&gt;tools page&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;img src="http://sites.google.com/site/stevedunns/GifToSpriteMapShot-full.jpg" /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-3597345955261188335?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/3597345955261188335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=3597345955261188335&amp;isPopup=true' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3597345955261188335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3597345955261188335'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/02/tool-for-converting-animated-gifs-to.html' title='A tool for converting animated GIFS to spritemaps'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-5238191919836920610</id><published>2007-02-03T20:00:00.001Z</published><updated>2007-02-03T20:00:44.570Z</updated><title type='text'>New version of the Code Formatter Plugin for Windows Live Writer</title><content type='html'>&lt;p&gt;Version 1.0.0.2 can be found &lt;a title="Steve Dunn's Code Formatter Plugin for Windows Live Writer" href="http://dunnhq.com/codeformatterforwindowslivewriter" target="_blank"&gt;here&lt;/a&gt;.&amp;nbsp; This update adds the ability to change the font - including the font name, size, style, and weight.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-5238191919836920610?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/5238191919836920610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=5238191919836920610&amp;isPopup=true' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5238191919836920610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5238191919836920610'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/02/new-version-of-code-formatter-plugin.html' title='New version of the Code Formatter Plugin for Windows Live Writer'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-3850944769837210959</id><published>2007-01-18T08:15:00.000Z</published><updated>2007-01-18T08:30:03.214Z</updated><title type='text'></title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;strong&gt;A New Version of Microsoft Terminal Services Client (Remote Desktop)&lt;/strong&gt;&lt;/span&gt;

Version 6 of MSTSC now supports &lt;strong&gt;&lt;u&gt;multiple monitors(!)&lt;/u&gt;&lt;/strong&gt; as well as wide-screen resolutions and other features that I haven't yet tried.  This is the version that comes with Vista but it's worth noting that there is a &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=26f11f0c-0d18-4306-abcf-d4f18c8f5df9&amp;DisplayLang=en"&gt;download for Windows XP SP2&lt;/a&gt; and &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=CC148041-577F-4201-B62C-D71ADC98ADB1&amp;displaylang=en"&gt;Windows Server 2003&lt;/a&gt;.  It's also worth noting that the new features are only available &lt;strong&gt;if the machine you're connecting &lt;u&gt;to&lt;/u&gt; is Vista or Longhorn Server&lt;/strong&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-3850944769837210959?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/3850944769837210959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=3850944769837210959&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3850944769837210959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3850944769837210959'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/01/new-version-of-microsoft-terminal.html' title=''/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-4981670039336400735</id><published>2007-01-17T13:03:00.000Z</published><updated>2009-03-06T20:56:21.358Z</updated><title type='text'>FluentInterface</title><content type='html'>&lt;p&gt;I've &lt;a href="http://stevedunns.blogspot.com/2006/08/quicky-stringbuilder-tip.html"&gt;posted before&lt;/a&gt; about the StringBuilder tip in .NET. &lt;/p&gt;  &lt;p&gt;Martin Fowler describes this as an &lt;a href="http://www.martinfowler.com/bliki/ExpressionBuilder.html"&gt;ExpressionBuilder &lt;/a&gt;pattern. &lt;/p&gt;  &lt;p&gt;More formal terms are described in his post, for instance, a &lt;a href="http://www.martinfowler.com/bliki/FluentInterface.html"&gt;FluentInterface&lt;/a&gt; which allows code like this: &lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:8a3aefcf-ccd5-4207-a534-5feaefc60bc0" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush: csharp;"&gt;customer.newOrder() 
	.with(6, &amp;quot;TAL&amp;quot;) 
	.with(5, &amp;quot;HPK&amp;quot;).skippable() 
	.with(3, &amp;quot;LGV&amp;quot;).priorityRush();&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt; I personally like this style but agree that if every object had these strange looking methods it would certainly pollute an API. &lt;/p&gt;

&lt;p&gt;Another formal term describing how not to pollute an API is &lt;a href="http://www.martinfowler.com/bliki/CommandQuerySeparation.html"&gt;CommandQuerySeparation&lt;/a&gt;.&amp;#160; Basically, this means that a method that changes the observable state of an object shouldn't have a return value.&amp;#160; &lt;/p&gt;

&lt;p&gt;The ExpressionBuilder pattern is the solution to this:&amp;#160; it is a seperate object that defines the FluentInterface and yet doesn't pollute the API.&amp;#160; &lt;/p&gt;

&lt;p&gt;I'm glad that I now know more than 3 patterns, the &lt;a href="http://en.wikipedia.org/wiki/Factory_pattern"&gt;Factory pattern&lt;/a&gt;, the &lt;a href="http://en.wikipedia.org/wiki/Visitor_pattern"&gt;Visitor pattern&lt;/a&gt;, and the &lt;a href="http://dunnhq.com/SubmarinePattern"&gt;Submarine pattern&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-4981670039336400735?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/4981670039336400735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=4981670039336400735&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4981670039336400735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4981670039336400735'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2007/01/ive-posted-before-about-stringbuilder.html' title='FluentInterface'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-2516789294226008018</id><published>2006-12-22T11:21:00.001Z</published><updated>2006-12-22T11:21:06.144Z</updated><title type='text'>Settling into my XNA Development Environment</title><content type='html'>&lt;p&gt;Microsoft recently released the &lt;a title="MSDN XNA Site" href="http://msdn.com/xna" target="_blank"&gt;XNA&lt;/a&gt; toolkit for XBox 360 and PC games development.&amp;nbsp; The supported IDE for this is &lt;a title="Visual C# Express" href="http://msdn.microsoft.com/vstudio/express/visualcsharp/" target="_blank"&gt;Visual C# Express&lt;/a&gt;.&amp;nbsp;&lt;/p&gt; &lt;p&gt;I am quite picky about my development environment, for instance: I like the Consolas 12pt font;&amp;nbsp; I like 2 tab spaces instead of 4;&amp;nbsp; I like virtual space in the editor; etc. etc.&lt;/p&gt; &lt;p&gt;Visual Studio Express does not give the option to change tab size and virtual space settings so I immediately jumped into regedit and edited the values.&amp;nbsp; Then I thought that maybe I could export my settings from Visual Studio 2005 Professional and import them into Express.&lt;/p&gt; &lt;p&gt;This worked, with the exception of some command bar stuff that isn't supported in Express.&amp;nbsp; The added bonus was that the Options screen now displays more settings that before:&lt;/p&gt; &lt;h3&gt;Options screen before import:&lt;/h3&gt; &lt;p&gt;&lt;a href="http://stevedunns.googlepages.com/VsExpressSettingsBefore.jpg" target="_new" atomicselection="true"&gt;&lt;img height="260" src="http://stevedunns.googlepages.com/VsExpressSettingsBefore.jpg" width="450"&gt;&lt;/a&gt; &lt;/p&gt; &lt;h3&gt;Options screen after import:&lt;/h3&gt; &lt;p&gt;&lt;a href="http://stevedunns.googlepages.com/VsExpressSettingsAfter.jpg" target="_new" atomicselection="true"&gt;&lt;img height="260" src="http://stevedunns.googlepages.com/VsExpressSettingsAfter.jpg" width="450"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Very nice.&amp;nbsp; It's just a shame that Express doesn't support plug-ins as I really miss &lt;a title="ReSharper 2.5 Released" href="http://stevedunns.blogspot.com/2006/12/resharper-25-released.html"&gt;ReSharper&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-2516789294226008018?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/2516789294226008018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=2516789294226008018&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/2516789294226008018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/2516789294226008018'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/12/settling-into-my-xna-development.html' title='Settling into my XNA Development Environment'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-5896043098831642334</id><published>2006-12-12T11:00:00.001Z</published><updated>2006-12-12T11:00:54.210Z</updated><title type='text'>ReSharper 2.5 Released</title><content type='html'>&lt;p&gt;The download links don't seem to work at the moment (they're still pointing to version 2.0.2).&amp;nbsp; The link to the direct download is &lt;a title="http://download.jetbrains.com/resharper/ReSharper-2.5-setup.exe" href="http://download.jetbrains.com/resharper/ReSharper-2.5-setup.exe"&gt;http://download.jetbrains.com/resharper/ReSharper-2.5-setup.exe&lt;/a&gt;&amp;nbsp; (which I rather cleverly deduced from the existing broken link of &lt;a title="http://download.jetbrains.com/resharper/ReSharper-2.0.2-setup.exe" href="http://download.jetbrains.com/resharper/ReSharper-2.0.2-setup.exe"&gt;http://download.jetbrains.com/resharper/ReSharper-2.0.2-setup.exe&lt;/a&gt;)&lt;/p&gt; &lt;p&gt;Remember though, this is Visual Studio 2005 only.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-5896043098831642334?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/5896043098831642334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=5896043098831642334&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5896043098831642334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5896043098831642334'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/12/resharper-25-released.html' title='ReSharper 2.5 Released'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-4106990427647593098</id><published>2006-11-30T12:10:00.001Z</published><updated>2006-11-30T12:10:44.649Z</updated><title type='text'>In the name of science</title><content type='html'>&lt;blockquote&gt; &lt;p&gt;What is the speed of meme?&amp;nbsp; People write in general (typically truimphant) terms about how swiftly a single voice can travel from one side of the internet to the other and back again, but how often does that actually happen?&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;If you have a blog, please read &lt;a href="http://acephalous.typepad.com/acephalous/2006/11/measuring_the_s.html"&gt;this&lt;/a&gt; and follow the instructions.&amp;nbsp; I'm supposed to beg you to do this, but the title of this post is "In the name of science" and not "In the name of science and commision" !&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-4106990427647593098?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/4106990427647593098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=4106990427647593098&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4106990427647593098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4106990427647593098'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/11/in-name-of-science.html' title='In the name of science'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-4409386521654960093</id><published>2006-11-30T11:09:00.001Z</published><updated>2006-11-30T11:09:22.399Z</updated><title type='text'>FAJAX - Fake AJAX!</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;p&gt;AJAX is great for reducing page flicker when posting back to the same page (for instance, updating a listbox or a textbox), but a lot of a web-site navigation involves clicking around to different pages. &lt;p&gt;DHTML behaviour has been around a good few years allowing page developers to have page transitions (such as wipe, chequerboard etc.) when the page loads and unloads. None of these transitions were that great and a certain amount of flicker was still present.  &lt;p&gt;I’ve seen a few sites recently that have a nice fade transition that is much smoother than DHTML behaviours. I’ve just discovered from this &lt;a href="http://www.nikhilk.net/Fajax.aspx"&gt;blog&lt;/a&gt;, how it’s done. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-4409386521654960093?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/4409386521654960093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=4409386521654960093&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4409386521654960093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/4409386521654960093'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/11/fajax-fake-ajax.html' title='FAJAX - Fake AJAX!'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-863661899858205259</id><published>2006-11-21T10:53:00.001Z</published><updated>2006-11-21T10:53:35.139Z</updated><title type='text'>I Hate ClearCase Part II - When a text file isn't a text file!</title><content type='html'>&lt;p&gt;Here's a question:&amp;nbsp; If you have a text file that contains a very long line of text (&amp;gt;8000 characters), is it still a text file?&lt;/p&gt; &lt;p&gt;I'd say Yes. But &lt;strike&gt;Computer&lt;/strike&gt;ClearCase says No. Or at least hinted it meant No via several obscure error messages. &lt;/p&gt; &lt;p&gt;The file in question is a whole bunch of JavaScript code (part of the Microsoft AJAX release) that is not intended to be read by anyone viewing a web page, and hence is sensibly put on one line (albeit 69168 bytes in length).&amp;nbsp;&lt;/p&gt; &lt;p&gt;Firstly, I was getting a strange error when adding them to ClearCase.&amp;nbsp; Apparently, despite of the error, they were being added – I found them in a checked-out state.&amp;nbsp; Upon trying to check them in, I got:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Error checking in '...MicrosoftAjax.js'.&amp;nbsp; Type manager "text_file_delta" failed create_version operation.&lt;br&gt;Unable to check in '...MicrosoftAjax.js'&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;...followed by OK and Cancel buttons (quite how one can Cancel an operation that can't be done anyway is beyond me!)&lt;/p&gt; &lt;p&gt;I then thought I’d take a look at the file and did a ‘diff’ with the previous version.&amp;nbsp; I got this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Error encountered doing compare operation.&lt;br&gt;"c:\temp\ccdm02327" is not a 'text file':&amp;nbsp; it contains a line exceeding 8000 bytes.&lt;br&gt;Use a different type manager (such as a compressed file).&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;So, according to ClearCase, a text file is not a text file if it has lines of over 8000 characters!&lt;/p&gt; &lt;p&gt;Anyway, the solution was to use the cleartool command line tool to add the file using a different 'type' - a compressed text file type.&amp;nbsp; Note that this doesn't actually change the contents of the file, nor the way it's handled (thankfully!).&amp;nbsp; Of course, once the solution was presented to me...&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;C:\folder\ScriptLibrary\Release&amp;gt;&lt;/em&gt;cleartool mkelem -nc -eltype compressed_text_file MicrosoftAjax.js&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;...everything became perfectly clear!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-863661899858205259?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/863661899858205259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=863661899858205259&amp;isPopup=true' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/863661899858205259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/863661899858205259'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/11/i-hate-clearcase-part-ii-when-text-file.html' title='I Hate ClearCase Part II - When a text file isn&apos;t a text file!'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-6437066127456269112</id><published>2006-10-30T13:18:00.001Z</published><updated>2006-10-30T13:22:39.219Z</updated><title type='text'>I Hate ClearCase - Part I</title><content type='html'>&lt;p&gt;ClearCase isn't my favourite source control system.&amp;nbsp; I find the UI clunky and for the most part, it's way over engineered.&lt;/p&gt; &lt;p&gt;I've just tried deleting a file and I'm getting an error message that says:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Trigger "NO_RMNAME" has refused to let rmname proceed.&amp;nbsp; &lt;br&gt;Unable to remove "[file]".&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;WHAT DOES THIS MEAN AND HOW DO I DELETE A FILE?!&lt;/p&gt; &lt;p&gt;My 20+ years of working with software - coupled with my powers of deduction, have led me to "guess" that this means I don't have the permission to delete a file! (I could be wrong;&amp;nbsp; I'm waiting for the in-house ClearCase administrator to advise!)&lt;/p&gt; &lt;p&gt;I'm going to stop using the advanced features of this software and continue with the basics...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-6437066127456269112?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/6437066127456269112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=6437066127456269112&amp;isPopup=true' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/6437066127456269112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/6437066127456269112'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/10/i-hate-clearcase-part-i.html' title='I Hate ClearCase - Part I'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-3630799249245541494</id><published>2006-10-24T13:36:00.001Z</published><updated>2006-10-24T13:36:46.576Z</updated><title type='text'>Cassini and assembly loading problems</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;p&gt;Cassini&amp;nbsp;is the Visual Studio development web server. Generally, Cassini is great;&amp;nbsp; you give it a port number and a path and off it goes - hosting ASP.NET pages in a similar fashion to ISS but much quicker.&amp;nbsp; Plus, it's unloaded when you stop debugging. &lt;p&gt;One issue I came across today was with Cassini and the loading of assemblies.&amp;nbsp; During development of .NET applications, I like to use project references rather than binary references (whether those references are in our out of the GAC). &lt;p&gt;The problem lies with the fact that Cassini occasinally switches app domains, forcing objects to be serialised across.&amp;nbsp; This serialisation was failing as one of our serialisable objects were in an assembly that wasn't in the GAC and wasn't available anywhere for the Cassini process to load.&amp;nbsp; The exact error was: &lt;p&gt;&lt;i&gt;Type is not resolved for member 'Company.Product.Type,Company.Product.dll, Version=1.0.0.0, Culture=neutral, PublicKeyToken=blah'&lt;/i&gt; &lt;p&gt;Investigation led to the &lt;a href="http://blogs.msdn.com/junfeng/archive/2005/12/13/503059.aspx"&gt;suggestion to use DEVPATH&lt;/a&gt;.&amp;nbsp; Basically, this means adding the following entry to the ‘runtime’ section of the machine.config file: &lt;p&gt; &lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:bc0bb605-2294-4343-9643-4bee7793cc70" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; width: 282px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;developmentMode &lt;/span&gt;&lt;span style="color: #FF0000; "&gt;developerInstallation&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;… and setting the &lt;strong&gt;DEVPATH&lt;/strong&gt; environment variable to the directory where your private copies of assemblies are located.&amp;nbsp; This is &lt;i&gt;supposed&lt;/i&gt; to load a matching assembly regardless of version.&amp;nbsp; Unfortunately, this didn’t work and for whatever reason, a ComException was being thrown very early on when Cassini started.
&lt;p&gt;Although this didn't work, there was a link in the page to another &lt;a href="http://msdn2.microsoft.com/en-US/library/efs781xb.aspx"&gt;MSDN&amp;nbsp;article&lt;/a&gt; describing a way to redirect assembly loading. This again used the runtime section of the machine.config file, but this time using:
&lt;p&gt;
&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:83ce6c2b-5b01-40ee-94c9-e1a7fed0a0df" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;assemblyBinding &lt;/span&gt;&lt;span style="color: #FF0000; "&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;=&amp;quot;urn:schemas-microsoft-com:asm.v1&amp;quot;&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;dependentAssembly&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
        &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;assemblyIdentity &lt;/span&gt;&lt;span style="color: #FF0000; "&gt;name&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;=&amp;quot;Company.Product&amp;quot;&lt;/span&gt;&lt;span style="color: #FF0000; "&gt; publicKeyToken&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;=&amp;quot;blah&amp;quot;&lt;/span&gt;&lt;span style="color: #FF0000; "&gt; culture&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;=&amp;quot;neutral&amp;quot;&lt;/span&gt;&lt;span style="color: #FF0000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
        &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000; "&gt;codeBase &lt;/span&gt;&lt;span style="color: #FF0000; "&gt;version&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;=&amp;quot;1.0.0.0&amp;quot;&lt;/span&gt;&lt;span style="color: #FF0000; "&gt; href&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;=&amp;quot;file://C:/Blah/Company.Product.dll&amp;quot;&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;dependentAssembly&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000; "&gt;
    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000; "&gt;assemblyBinding&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This worked great and saved me having to use IIS or copying my assemblies all over the place so Cassini can load them.
&lt;p&gt;I hope this post proves useful to anyone having a similar problem.&amp;nbsp; It will probably prove useful to me when I come across the problem again in the far future having forgotten how I got around it the first time!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-3630799249245541494?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/3630799249245541494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=3630799249245541494&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3630799249245541494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3630799249245541494'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/10/cassini-and-assembly-loading-problems.html' title='Cassini and assembly loading problems'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-7128654571628577152</id><published>2006-10-23T15:27:00.001Z</published><updated>2006-10-23T15:27:27.777Z</updated><title type='text'>What to expose in a framework</title><content type='html'>&lt;p&gt;&lt;a href="http://www.hanselman.com/"&gt;Scott Hanselman&lt;/a&gt;&amp;nbsp; &lt;a href="http://www.hanselman.com/blog/IsThereAGoodReasonToMarkAClassPublic.aspx"&gt;blogged&lt;/a&gt; recently on reasons to make a class public in a framework.&amp;nbsp; One reason was that a developer may want the functionality offered by a particular class, either to be used as-is or to be extended.&lt;/p&gt; &lt;p&gt;Normally, frameworks are quite specific in what they do and what they provide.&amp;nbsp; If a whole 'chunk' (class) is required to be made public, then it may be the case that this functionality isn't in the realm of what the Framework was designed to offer. For example, should a class that lists the zipped files in a directory be exposed from a compression framework?&amp;nbsp; Or, should a regular expression helper class be exposed from a logging/tracing framework?&lt;/p&gt; &lt;p&gt;Opening up large chunks of code because someone wants the functionality can dilute the Framework and make the API harder to understand because it offers so much functionality. With this in mind, if the framework you've given them doesn't do what they want, then maybe rethink ways of incorporating the functionality into the Framework rather than opening up a chunk of code.&lt;/p&gt; &lt;p&gt;You might be thinking that it'd be difficult incorporating all the functionality of a particular class into other parts of&amp;nbsp;the framework;&amp;nbsp; classes, whether internal or exposed, should be succint (following the &lt;a href="http://en.wikipedia.org/wiki/Single_responsibility_principle"&gt;Single Responsibility Principle&lt;/a&gt;) - so there shouldn't be too much to move around to give them the features they require.&lt;/p&gt; &lt;p&gt;When we start talking about frameworks and OO concepts such as SRP, it brings to mind&amp;nbsp;a very&amp;nbsp;valid point&amp;nbsp;raised in&amp;nbsp;the excellent &lt;a href="http://www.amazon.com/Framework-Design-Guidelines-Conventions-Development/dp/0321246756"&gt;Framework Design Guidelines&lt;/a&gt;&amp;nbsp;book - something along the lines that OO should play a part in the implementation of a framework but not in the API of the framework (I think the example of Streams/TextReaders was used as a very good example).&amp;nbsp; The .NET Framework now seems to have more and more utility classes that help to flatten the heirarchy and (in my opinion) increase usability/memorability.&lt;/p&gt; &lt;p&gt;Some examples would be a good way of testing our arguments.&amp;nbsp; Perhaps examples based on the .NET Framework wouldn't be the best to use as this is a lot more generic than say,&amp;nbsp;frameworks for logging/tracing or compression.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-7128654571628577152?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/7128654571628577152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=7128654571628577152&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/7128654571628577152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/7128654571628577152'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/10/what-to-expose-in-framework.html' title='What to expose in a framework'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-5481022870983252552</id><published>2006-10-22T08:50:00.001Z</published><updated>2007-05-12T19:10:01.105Z</updated><title type='text'>Retrieve your Windows OS Product Keys</title><content type='html'>&lt;p&gt;Today I needed to get the Windows XP Product Key but didn't have the neccessary information to hand. I did a search and found the &lt;a href="http://www.magicaljellybean.com/"&gt;MagicJellyBean&lt;/a&gt; utility. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;This worked but I was curious how it worked. I read around a little bit and discovered a snippet of &lt;a href="http://geekswithblogs.net/willemf/archive/2006/04/23/76125.aspx"&gt;C# code&lt;/a&gt; from &lt;a href="http://geekswithblogs.net/willemf/"&gt;Willem's blog&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I then modified it a bit and created my own C# WinForm application. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;a href="http://2.bp.blogspot.com/_bIhihWOyLpw/RkX7c_97lUI/AAAAAAAAAAU/g_hQBEnxBsI/s1600-h/prodkey2.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5063729831674090818" style="CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_bIhihWOyLpw/RkX7c_97lUI/AAAAAAAAAAU/g_hQBEnxBsI/s400/prodkey2.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;The application lists the most common product keys (Windows XP and Office) and has a button to search for more keys that look like product ID's. It searches all keys in HKEY_LOCAL_MACHINE.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Here's the &lt;a href="http://files.dunnhq.com/KeyFinderSource.zip"&gt;source code&lt;/a&gt; and here's the &lt;a href="http://files.dunnhq.com/KeyFinder.exe"&gt;binary&lt;/a&gt;. Note, the application depends on the .NET Framework 2.0. Also, save the binary before running it otherwise it'll run with restricted permissions and won't be able to probe the registry.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-5481022870983252552?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/5481022870983252552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=5481022870983252552&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5481022870983252552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/5481022870983252552'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/10/retrieving-windows-product-keys.html' title='Retrieve your Windows OS Product Keys'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_bIhihWOyLpw/RkX7c_97lUI/AAAAAAAAAAU/g_hQBEnxBsI/s72-c/prodkey2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-3303971775142593148</id><published>2006-10-21T21:32:00.001Z</published><updated>2006-10-21T21:32:57.216Z</updated><title type='text'>Visual Studio Orphaned Project Items Finder</title><content type='html'>&lt;p&gt;The name is a bit of a mouthful, but sums up what it's all about.&amp;nbsp; It finds orphaned items in a Visual Studio project.&amp;nbsp; Inspired by &lt;a href="http://www.codinghorror.com/blog/archives/000368.html"&gt;Clean Source Plus&lt;/a&gt;, this utility is a stand-alone application and also a right-click Explorer menu item.&lt;/p&gt; &lt;p&gt;Recently I came across several dozen projects that had been worked on by dozens of people for several years.&amp;nbsp; Inevitably, there were files present in the source tree that were not part of the project.&lt;/p&gt; &lt;p&gt;This is a tool to find those files.&amp;nbsp; Please feel free to download it from &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=VSOrphan"&gt;CodePlex&lt;/a&gt;.&amp;nbsp; There&amp;nbsp;is an &lt;a href="http://www.codeplex.com/Project/FileDownload.aspx?ProjectName=VSOrphan&amp;amp;DownloadId=3350"&gt;installer file&lt;/a&gt;&amp;nbsp;and the &lt;a href="http://www.codeplex.com/Project/FileDownload.aspx?ProjectName=VSOrphan&amp;amp;DownloadId=3351"&gt;source code&lt;/a&gt; is also available.&amp;nbsp;If you'd like to contribute to the project, please let me know.&lt;/p&gt; &lt;p&gt;To use it is very simple.&amp;nbsp; Download it and run it, or right click a Visual Studio project in Explorer and 'Find Orphaned Items...'.&lt;/p&gt; &lt;h2&gt;Warning!&lt;/h2&gt; &lt;p&gt;I've tested this project on Visual Studio 2003 and 2005 projects.&amp;nbsp; &lt;strong&gt;I haven't tested this on Web Projects or Web Application Projects (in Visual Studio 2005)&lt;/strong&gt;.&amp;nbsp; I would recommend verifying what the application thinks are orhpaned items.&amp;nbsp; If it continually gets it right, you can trust it more and check it less.&amp;nbsp; If it continually gets it wrong, then please let me know!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-3303971775142593148?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/3303971775142593148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=3303971775142593148&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3303971775142593148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3303971775142593148'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/10/visual-studio-orphaned-project-items.html' title='Visual Studio Orphaned Project Items Finder'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-7016856304778492200</id><published>2006-10-20T18:58:00.001Z</published><updated>2009-03-06T21:05:21.841Z</updated><title type='text'>Problems with Forms Authentication and ASP.NET Themes</title><content type='html'>&lt;a href="http://dunnhq.com/formsauth2.png"&gt;&lt;/a&gt;  &lt;p&gt;It's sometimes the strangest (and seemingly irrelevant) combinations of technology that give you the most problems. For a good few hours I've been wondering why my web site, which uses &lt;a href="http://msdn2.microsoft.com/en-us/library/ykzx33wh.aspx"&gt;Forms Authentication&lt;/a&gt; and Themes, was not displaying any formatting or images. &lt;/p&gt;  &lt;p&gt;It turns out that the URLs specified in the authentication section in web.config are used for ALL resources. So, in my case, the page was trying to load a .css file but ASP.NET was redirecting the request to default.aspx, which of course, is not a style-sheet and has a different MIME type. Here's the section of my web.config file:&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:ac13a806-2a40-4f93-a39a-48fe83aa8d3d" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;authentication &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;mode&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="Forms"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;forms  &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;loginUrl&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="Default.aspx"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
        defaultUrl&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="Default.aspx"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
        protection&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="All"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
        timeout&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="30"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
        path&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="/"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
        requireSSL&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="false"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
        slidingExpiration&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="true"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
        cookieless&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="UseDeviceProfile"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
        domain&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;=""&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
        enableCrossAppRedirects&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="false"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;authentication&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;p&gt;To fix this, I allow unauthenticated access to the resources, which was straight-forward. I added the following to the web.config file:&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:15dc4128-3ae9-4c70-bfad-ca2141f20ca4" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;;overflow: auto;"&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;location &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;path&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="App_Themes"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;authorization&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;allow &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;users&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="*"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
      &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;authorization&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;system.web&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;location&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;br /&gt;The tricky part in finding this was that the page's HTML looked fine, there were no errors, and saving the resulting HTML to a file and viewing it produced the right results. 

&lt;br /&gt;

&lt;br /&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Firefox's JavaScript Console proved incredibly helpful in finding the problem:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://2.bp.blogspot.com/_bIhihWOyLpw/RkX8P_97lVI/AAAAAAAAAAc/6DtARTWtex4/s1600-h/formsauth2.png"&gt;&lt;img style="cursor: hand" id="BLOGGER_PHOTO_ID_5063730707847419218" border="0" alt="" src="http://2.bp.blogspot.com/_bIhihWOyLpw/RkX8P_97lVI/AAAAAAAAAAc/6DtARTWtex4/s400/formsauth2.png" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;Once I saw this, it all fell into place!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-7016856304778492200?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/7016856304778492200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=7016856304778492200&amp;isPopup=true' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/7016856304778492200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/7016856304778492200'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/10/forms-authentication-and-stylesheet.html' title='Problems with Forms Authentication and ASP.NET Themes'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_bIhihWOyLpw/RkX8P_97lVI/AAAAAAAAAAc/6DtARTWtex4/s72-c/formsauth2.png' height='72' width='72'/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-8032375236534897037</id><published>2006-10-19T06:39:00.001Z</published><updated>2007-05-12T19:07:38.575Z</updated><title type='text'>BackgroundWorker - automating this handy class</title><content type='html'>&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx" target="_blank"&gt;BackgroundWorker&lt;/a&gt; objects are an addition to .NET 2.0 to simplify asynchronous programming and are very useful in (but not restricted to) Windows Forms. &lt;/p&gt;&lt;p&gt;The basic idea is:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Create a BackgroundWorker object &lt;li&gt;Set-up various events on it, like DoWork, RunWorkerCompleted, and ProgressChanged &lt;li&gt;Set-up various properties, like WorkerReportsProgress and WorkerSupportCancellation &lt;li&gt;Call RunWorkerAysnc&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;...then, in your form you get notified of progress and can cancel the operation at any time.&lt;/p&gt;&lt;p&gt;I've created a &lt;a href="http://www.jetbrains.com/resharper/"&gt;ReSharper&lt;/a&gt; Live Template that will help you create and set-up the BackgroundWorker object. You can download it &lt;a href="http://files.dunnhq.com/backgroundWorkerLiveTemplate.xml"&gt;here&lt;/a&gt;. For instructions on importing the Live Template into ReSharper, see my previous post &lt;a href="http://stevedunns.blogspot.com/2006/10/resharper-live-templates-for-validating.html"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-8032375236534897037?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/8032375236534897037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=8032375236534897037&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/8032375236534897037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/8032375236534897037'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/10/resharper-live-template-for-creating.html' title='BackgroundWorker - automating this handy class'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-1348535320739378504</id><published>2006-10-18T07:18:00.003Z</published><updated>2011-03-24T15:10:31.593Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><title type='text'>Visual Studio Build Tip</title><content type='html'>&lt;p&gt;By default, Visual Studio will build all of the projects in your solution regardless of any errors.  &lt;/p&gt;&lt;p&gt;The problem with this is that if the first project it builds contains an error, the resulting binary will not get generated.  If any other projects depend on this (which is normally the case, as it was the first to be built) then they'll fail too, and so on to the end of the project heirarchy. &lt;/p&gt;&lt;p&gt;Pointless;  you'll spend ages sitting around in a locked IDE unable to edit the error until the build finishes.  &lt;/p&gt;&lt;p&gt;You might as well stop at the first error.  You could of press Ctrl+Break (several times) and hope that VS will eventually stop.  But, there's a better way: get Visual Studio to stop automatically after an error.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Go to Tools/Macros/Macro Explorer&lt;/li&gt;&lt;li&gt;Expand MyMacros&lt;/li&gt;&lt;li&gt;Double click Module1&lt;/li&gt;&lt;li&gt;This will bring up the macro in a new window.  In that window, double click the EnvironmentEvents entry.&lt;/li&gt;&lt;li&gt;From the drop-down (currently 'General', select 'Build Events')&lt;/li&gt;&lt;li&gt;Select 'OnBuildProjConfigDone' and paste this in:&lt;/li&gt;&lt;/ol&gt;&lt;span class="Apple-style-span"&gt;&lt;span&gt;&lt;span class="Apple-style-span"&gt;&lt;pre class="brush: csharp"&gt;If Success = False Then 'The build failed...cancel any further builds.
DTE.ExecuteCommand("Build.Cancel")
End If&lt;div&gt;&lt;p&gt;The whole method should look like this:&lt;/p&gt;
&lt;pre class="brush: csharp"&gt;
Private Sub BuildEvents_OnBuildProjConfigDone( _  &lt;/pre&gt;&lt;pre class="brush: csharp"&gt;ByVal Project As String, _ &lt;/pre&gt;&lt;pre class="brush: csharp"&gt;ByVal ProjectConfig As String, _ &lt;/pre&gt;&lt;pre class="brush: csharp"&gt;ByVal Platform As String, _ &lt;/pre&gt;&lt;pre class="brush: csharp"&gt;ByVal SolutionConfig As String, _ &lt;/pre&gt;&lt;pre class="brush: csharp"&gt;ByVal Success As Boolean) Handles BuildEvents.OnBuildProjConfigDone   &lt;/pre&gt;&lt;pre class="brush: csharp"&gt;    If Success = False Then 'The build failed...cancel any further builds.     &lt;/pre&gt;&lt;pre class="brush: csharp"&gt;        DTE.ExecuteCommand("Build.Cancel")   &lt;/pre&gt;&lt;pre class="brush: csharp"&gt;    End If &lt;/pre&gt;&lt;pre class="brush: csharp"&gt;End Sub&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-1348535320739378504?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/1348535320739378504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=1348535320739378504&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/1348535320739378504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/1348535320739378504'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/10/visual-studio-build-tip.html' title='Visual Studio Build Tip'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-3052416656173580755</id><published>2006-10-04T06:21:00.001Z</published><updated>2007-05-12T19:14:42.475Z</updated><title type='text'>ReSharper Live Templates for validating parameters of public C# methods.</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;p&gt;ReSharper Live Templates are smart shortcuts you can type and have filled in automatically. For instance, typing 'foreach' and pressing tab produces:&lt;pre&gt;      foreach ( object o in something )
      {
      }&lt;/pre&gt;
&lt;p&gt;I've created 3 Live Templates for validating arguments in public methods (C#). Here's a short &lt;a title="Video demonstration of what I'm talking about" href="http://files.dunnhq.com/ReSharperLiveTemplateDemo.avi" target="_blank"&gt;video demonstration&lt;/a&gt;. I've &lt;a href="http://stevedunns.blogspot.com/2006/08/reshaper-live-templates-for-validating.html"&gt;blogged about these before&lt;/a&gt; for ReSharper 1.5 and said that there's no way to export/import the templates. But in ReSharper 2.0, there is! You can get them &lt;a href="http://files.dunnhq.com/ArgCheckLiveTemplatesForResharper.xml"&gt;here&lt;/a&gt;. Go to ReSharper/Options/Templates/LiveTemplates and click the 'Import templates from file' button.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-3052416656173580755?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/3052416656173580755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=3052416656173580755&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3052416656173580755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/3052416656173580755'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/10/resharper-live-templates-for-validating.html' title='ReSharper Live Templates for validating parameters of public C# methods.'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115952886100266203</id><published>2006-09-29T11:21:00.000Z</published><updated>2006-09-29T11:21:01.156Z</updated><title type='text'>MbUnit and null parameters</title><content type='html'>&lt;p&gt;I've recently moved from NUnit to MbUnit.&amp;nbsp; I like the extra features it offers, in particular, the RowTest feature.&amp;nbsp; This allows a single test to take different parameters - the parameters of which are specified in the attributes.&amp;nbsp; Here's an example:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt; &lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:e33fcb5a-340c-49b0-9492-26c4ea626e4e" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000FF; "&gt;class&lt;/span&gt;&lt;span style="color: #000000; "&gt; Test
{
    &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;internal&lt;/span&gt;&lt;span style="color: #000000; "&gt; Test( &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt; s )
    {
        &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;if&lt;/span&gt;&lt;span style="color: #000000; "&gt;( &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt;.IsNullOrEmpty( s ) )
            &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;throw&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; ArgumentNullException( ) ;
    }
}

[ RowTest ]
[ Row( &lt;/span&gt;&lt;span style="color: #000000; "&gt;@&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;Hello World!&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt; )]
[ Row( &lt;/span&gt;&lt;span style="color: #000000; "&gt;@&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;Another string&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt; )]
&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;public&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;void&lt;/span&gt;&lt;span style="color: #000000; "&gt; Test1( &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt; val )
{
    Test t &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; Test( val );
}
&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here, Test1 is being given the parameters from the attributes on the test.&amp;nbsp; Previously, say, in NUnit, I'd have written a couple of unit tests that create this Test object and give it different values.&amp;nbsp; Normally, I'd also write a couple that would try and create one with a null string and an empty string and assert that it throws an ArgumentNullException.&lt;/p&gt;
&lt;p&gt;Now, in MbUnit, I went to write the test like so:&lt;/p&gt;
&lt;p&gt;
&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:ee4bd5ac-6a1c-461a-be2d-60642878f98a" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000; "&gt;        [ RowTest ]
        [ Row( &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;null&lt;/span&gt;&lt;span style="color: #000000; "&gt; , ExpectedException &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;typeof&lt;/span&gt;&lt;span style="color: #000000; "&gt;( ArgumentNullException ) ) ]
        [ Row( &lt;/span&gt;&lt;span style="color: #000000; "&gt;@&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;Hello World!&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt; )]
        &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;public&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;void&lt;/span&gt;&lt;span style="color: #000000; "&gt; Test1( &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt; val )
        {
            Test t &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; Test( val );
        }
&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Strangely, this caused an internal error in MbUnit.&amp;nbsp; Reading around, It looks like MbUnit is taking the first parameter of Row and treating it as an array rather than a single parameter.&amp;nbsp; The complete non-obvious way around this is to cast the null to a string:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:cbcbe70a-573f-4c5d-90e7-7986dd5d82dd" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #000000; "&gt;        [ RowTest ]
        [ Row( (&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt;)&lt;/span&gt;&lt;span style="color: #0000FF; "&gt;null&lt;/span&gt;&lt;span style="color: #000000; "&gt; , ExpectedException &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;typeof&lt;/span&gt;&lt;span style="color: #000000; "&gt;( ArgumentNullException ) ) ]
        [ Row( &lt;/span&gt;&lt;span style="color: #000000; "&gt;@&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt;Hello World!&lt;/span&gt;&lt;span style="color: #000000; "&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000; "&gt; )]
        &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;public&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;void&lt;/span&gt;&lt;span style="color: #000000; "&gt; Test1( &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;string&lt;/span&gt;&lt;span style="color: #000000; "&gt; val )
        {
            Test t &lt;/span&gt;&lt;span style="color: #000000; "&gt;=&lt;/span&gt;&lt;span style="color: #000000; "&gt; &lt;/span&gt;&lt;span style="color: #0000FF; "&gt;new&lt;/span&gt;&lt;span style="color: #000000; "&gt; Test( val );
        }
&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;This now works.&amp;nbsp; Which is nice!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115952886100266203?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115952886100266203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115952886100266203&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115952886100266203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115952886100266203'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/09/mbunit-and-null-parameters.html' title='MbUnit and null parameters'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115757200069659253</id><published>2006-09-06T19:46:00.000Z</published><updated>2006-09-06T19:46:40.700Z</updated><title type='text'>.NET Memory usage - A restaurant analogy</title><content type='html'>&lt;p&gt;Tess uses a great analogy of&amp;nbsp;restaurant bookings to describe .NET&amp;nbsp;memory usage.&amp;nbsp; The rest of the posts in this blog are also very interesting.&amp;nbsp; Thanks Tess.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/tess/archive/2006/09/06/742568.aspx"&gt;Link to If broken it is, fix it you should : .NET Memory usage - A restaurant analogy&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115757200069659253?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115757200069659253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115757200069659253&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115757200069659253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115757200069659253'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/09/net-memory-usage-restaurant-analogy.html' title='.NET Memory usage - A restaurant analogy'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115757111267012209</id><published>2006-09-06T19:31:00.000Z</published><updated>2006-09-06T19:31:52.676Z</updated><title type='text'>Thanks for the feedback on the CodeFormatter plugin</title><content type='html'>&lt;p&gt;I'd like to thank everyone for their feedback on the CodeFormatter plugin.&amp;nbsp; I've had some great suggestions and fixed a few bugs.&amp;nbsp; Keep them coming!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115757111267012209?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115757111267012209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115757111267012209&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115757111267012209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115757111267012209'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/09/thanks-for-feedback-on-codeformatter.html' title='Thanks for the feedback on the CodeFormatter plugin'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115654414390666848</id><published>2006-08-25T22:15:00.000Z</published><updated>2006-08-25T22:15:46.263Z</updated><title type='text'>ReSharper 2.0.1 Maintenance Release Now Available</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;blockquote&gt; &lt;h5&gt;&lt;a href="http://blogs.jetbrains.com/dotnet/2006/08/resharper-201-maintenance-release-now-available/"&gt;ReSharper 2.0.1 Maintenance Release Now Available&lt;/a&gt;&lt;/h5&gt; &lt;p&gt;JetBrains ReSharper version 2.0.1 is now available for download at &lt;a href="http://www.jetbrains.com/resharper/download/"&gt;http://www.jetbrains.com/resharper/download/&lt;/a&gt;.&lt;br&gt;This release fixes a number of bugs and usability issues, in addition to substantial performance improvements. For more information, please see &lt;a href="http://www.jetbrains.com/resharper/releaseNotes201.html"&gt;online Release Notes&lt;/a&gt;.&lt;br&gt;The update is a free maintenance release for all licensed users of previous ReSharper versions. All current users are highly encouraged to upgrade, due to the transition of the ReSharper development project to a new issue tracking system. So, the new release automatically sends bugs and exceptions to this new system.&lt;br&gt;Keep developing with pleasure!&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Source: &lt;a href="http://blogs.jetbrains.com/dotnet/2006/08/resharper-201-maintenance-release-now-available/"&gt;JetBrains .NET Tools Blog » Blog Archive » ReSharper 2.0.1 Maintenance Release Now Available&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115654414390666848?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115654414390666848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115654414390666848&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115654414390666848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115654414390666848'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/08/resharper-201-maintenance-release-now.html' title='ReSharper 2.0.1 Maintenance Release Now Available'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115636884133954447</id><published>2006-08-23T21:34:00.000Z</published><updated>2006-08-23T21:34:01.420Z</updated><title type='text'>Code Formatter Plugin now on Codeplex</title><content type='html'>&lt;p&gt;Check it out on &lt;a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=WlwCodeFormatter"&gt;Codeplex&lt;/a&gt;.&amp;nbsp; Please leave feedback on anything you'd like see.&amp;nbsp; The source code is there if you want to look around.&amp;nbsp; Let me know if you'd like to contribute.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115636884133954447?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115636884133954447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115636884133954447&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115636884133954447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115636884133954447'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/08/code-formatter-plugin-now-on-codeplex.html' title='Code Formatter Plugin now on Codeplex'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115628159687444567</id><published>2006-08-22T21:19:00.000Z</published><updated>2006-08-22T21:19:56.880Z</updated><title type='text'>Resharper 2.0.1 RC2 is now available.</title><content type='html'>&lt;p&gt;One of the best &lt;a href="http://www.jetbrains.com/resharper/"&gt;tools&lt;/a&gt; ever just keeps getting better and better! Get RC2 &lt;a href="http://www.jetbrains.net/confluence/display/ReSharper/Download"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115628159687444567?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115628159687444567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115628159687444567&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115628159687444567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115628159687444567'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/08/resharper-201-rc2-is-now-available.html' title='Resharper 2.0.1 RC2 is now available.'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115628126282218097</id><published>2006-08-22T21:14:00.000Z</published><updated>2007-05-12T19:03:47.721Z</updated><title type='text'>New version of the Code Formatter plugin for Windows Live Writer now available.</title><content type='html'>&lt;p&gt;The new &lt;a href="http://files.dunnhq.com/CodeFormatterPluginBinaries.zip"&gt;binaries&lt;/a&gt; are here. One small bug fixed in the form where you edit the code:  pressing return caused the OK button to fire.  Doh!  Thanks to &lt;a href="http://jtbworld.blogspot.com/2006/08/filedependancy-object-in-autocad.html"&gt;JTB World&lt;/a&gt; for spotting it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115628126282218097?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115628126282218097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115628126282218097&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115628126282218097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115628126282218097'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/08/new-version-of-code-formatter-plugin.html' title='New version of the Code Formatter plugin for Windows Live Writer now available.'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115628082166555860</id><published>2006-08-22T21:07:00.000Z</published><updated>2006-08-22T21:07:01.670Z</updated><title type='text'>Windows Live Writer - Bug</title><content type='html'>When content in a smart plugin exceeds the height of the canvas area, dragging on the size points on the surrounding rectangle causes strange behaviour.&amp;nbsp; Is anyone else seeing this or is it just me?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115628082166555860?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115628082166555860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115628082166555860&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115628082166555860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115628082166555860'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/08/windows-live-writer-bug.html' title='Windows Live Writer - Bug'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115628049571663431</id><published>2006-08-22T21:01:00.000Z</published><updated>2006-08-22T21:01:35.803Z</updated><title type='text'>Windows Live Writer - Additions to API</title><content type='html'>&lt;p&gt;Maybe this already exists, but it's not immediately obviose.&amp;nbsp; When developing a plugin, the component that sits along the right side of the screen is the Content Editor.&amp;nbsp; WLW has its own color scheme and to intermingle* nicely with it, it'd be nice if the color(s) used were available.&lt;/p&gt; &lt;p&gt;*is that a word?!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115628049571663431?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115628049571663431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115628049571663431&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115628049571663431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115628049571663431'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/08/windows-live-writer-additions-to-api.html' title='Windows Live Writer - Additions to API'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115611127632181467</id><published>2006-08-20T22:01:00.000Z</published><updated>2007-05-12T18:59:13.660Z</updated><title type='text'>Code Formatter Plugin for Windows Live Writer</title><content type='html'>&lt;p&gt;I'm quite new to blogging and have recently discovered Windows Live Writer. I've downloaded various plugins for code formatting but none provided me with what I wanted:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The ability to format the code 'live' &lt;li&gt;The ability to wrap lines &lt;li&gt;The ability to change the background color &lt;li&gt;The ability to just quickly paste what's in the clipboard as code&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The plugin I implemented formats and highlights code and also does all the above. Here's a screen shot of it in use:&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_bIhihWOyLpw/RkYMJf97lWI/AAAAAAAAAAk/hCF-Iu8bOhA/s1600-h/codeFormatterPlugin.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5063748188364313954" style="CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_bIhihWOyLpw/RkYMJf97lWI/AAAAAAAAAAk/hCF-Iu8bOhA/s400/codeFormatterPlugin.png" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://homepage.ntlworld.com/steve_dunn/blogpics/CodeFormatterPluginforWindowsLiveWriter_14207/image04.png" atomicselection="true"&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Here you can see that the content editor on the right can change the tab width, background color, language, and line numbers.&lt;/p&gt;&lt;p&gt;Below are some sample of code used with the plugin.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Here's some C# code:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:b5de4e6d-bd2e-40eb-a901-f475e170aef8" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;&lt;pre style="BACKGROUND-COLOR: white; WORD-WRAP: break-word"&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; TabWidth&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;return&lt;/span&gt;&lt;span style="color:#000000;"&gt; _content.Properties.GetInt( &lt;/span&gt;&lt;span style="color:#000000;"&gt;@"&lt;/span&gt;&lt;span style="color:#000000;"&gt;TabWidth&lt;/span&gt;&lt;span style="color:#000000;"&gt;"&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#000000;"&gt;4&lt;/span&gt;&lt;span style="color:#000000;"&gt; );&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;_content.Properties.SetInt( &lt;/span&gt;&lt;span style="color:#000000;"&gt;@"&lt;/span&gt;&lt;span style="color:#000000;"&gt;TabWidth&lt;/span&gt;&lt;span style="color:#000000;"&gt;"&lt;/span&gt;&lt;span style="color:#000000;"&gt;, value );&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;and some XML markup...&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:563d5edd-0aae-405e-9e51-d5a966d04b8c" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;&lt;pre style="BACKGROUND-COLOR: white"&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Triggers&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;KeyPressTrigger &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;="PropertyListTrigger"&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Character&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=" "&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;KeyPressTriggerValidStates&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;KeyPressTriggerValidState &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;State&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;="PropertyState"&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;KeyPressTriggerValidStates&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;KeyPressTrigger&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;KeyPressTrigger &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Key&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;="ValueListTrigger"&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; Character&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=" "&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;KeyPressTriggerValidStates&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;KeyPressTriggerValidState &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;State&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;="ValueState"&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;KeyPressTriggerValidStates&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;KeyPressTrigger&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;Triggers&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I've made available the &lt;a href="http://files.dunnhq.com/CodeFormatterPluginSource.zip"&gt;source&lt;/a&gt; and the &lt;a href="http://files.dunnhq.com/CodeFormatterPluginBinaries.zip"&gt;binaries&lt;/a&gt; for this plugin.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To use it, extract the binaries to \Windows Live Writer\Plugins and run WLW. The source is in C# 2.0 and comes with a Visual Studio 2005 solution.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Note that the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&amp;amp;displaylang=en"&gt;.NET 2.0 Framework&lt;/a&gt; must be installed before this plugin will work.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Going forward&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I plan to put this plugin onto &lt;a href="http://codeplex.com/"&gt;CodePlex&lt;/a&gt; (if they let me!). I also plan on making a few additions to the defaults via the Options screen. New languages can easily be added too thanks to the great &lt;a href="http://www.actiprosoftware.com/Products/DotNet/Default.aspx"&gt;ActiPro Code Highlighter&lt;/a&gt;. I'd also like to thank Christophe De Baene for his syntax highlighting tool. It's a great plugin and also helped me understand how to use the ActiPro control.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Please let me know if you'd like to contribute on CodePlex or if there are any features you'd like to see at steve at dunnhq d.o.t. com&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115611127632181467?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115611127632181467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115611127632181467&amp;isPopup=true' title='104 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115611127632181467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115611127632181467'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/08/code-formatter-plugin-for-windows-live.html' title='Code Formatter Plugin for Windows Live Writer'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_bIhihWOyLpw/RkYMJf97lWI/AAAAAAAAAAk/hCF-Iu8bOhA/s72-c/codeFormatterPlugin.png' height='72' width='72'/><thr:total>104</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115593693877402278</id><published>2006-08-18T21:35:00.000Z</published><updated>2006-08-18T21:41:09.136Z</updated><title type='text'>Converting System.Drawing.Color to HTML color (and vice-versa)</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;h5&gt;&amp;nbsp;&lt;/h5&gt; &lt;p&gt;This is something I&amp;nbsp;need very rarely.&amp;nbsp; So rare in fact that in-between uses it is completely removed from my memory, leaving just the fact that I&amp;nbsp;know I've searched for it before! &lt;p&gt;To convert a .NET Color object to an HTML RGB or named color,&amp;nbsp;use  &lt;p&gt;&amp;nbsp; &lt;style&gt;
&lt;!--
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }

--&gt;
&lt;/style&gt;  &lt;div class="CodeFormatContainer"&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;string&lt;/span&gt; colorAsString = ColorTranslator.ToHtml( _backgroundColor ) ;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and vice-versa&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="CodeFormatContainer"&gt;
&lt;style&gt;
&lt;!--
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }

--&gt;
&lt;/style&gt;
&lt;pre class="csharpcode"&gt;Color c= ColorTranslator.FromHtml( &lt;span class="str"&gt;@"#RRGGBB"&lt;/span&gt; ) ;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115593693877402278?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115593693877402278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115593693877402278&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115593693877402278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115593693877402278'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/08/converting-systemdrawingcolor-to-html.html' title='Converting System.Drawing.Color to HTML color (and vice-versa)'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115575572596927769</id><published>2006-08-16T19:15:00.000Z</published><updated>2006-08-16T19:15:25.973Z</updated><title type='text'>Reshaper Live Templates for validating arguments</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;p&gt;I strongly agree with the&amp;nbsp;&lt;a href="http://www.regdeveloper.co.uk/2005/12/29/first_among_equals/"&gt;'contract&lt;/a&gt;' mataphor in API design, hence my interest in &lt;a href="http://research.microsoft.com/specsharp/"&gt;Spec#&lt;/a&gt; (that I've &lt;a href="http://stevedunns.blogspot.com/2006/08/spec.html"&gt;blogged about before&lt;/a&gt;).&amp;nbsp;&amp;nbsp;&lt;/p&gt; &lt;p&gt;To assist in this and to eliminate the tedium of writing argument checks, I've created 3 Resharper Live Templates.&amp;nbsp; These check for &lt;ul&gt; &lt;li&gt;null parameters for any object passed&lt;/li&gt; &lt;li&gt;invalid parameters for any object passed&lt;/li&gt; &lt;li&gt;null or empty check for any String passed.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;These templates are called &lt;strong&gt;'arg'&lt;/strong&gt;, &lt;strong&gt;'argnull'&lt;/strong&gt; and &lt;strong&gt;'argempty'&lt;/strong&gt; respectivly. &lt;p&gt;Resharper 1.5 doesn't allow importing or exporting of Live Templates from the GUI.&amp;nbsp; They are however stored in an XML file at %userprofile%\Application Data\JetBrains\ReSharper\UserSettings.xml.&amp;nbsp;&amp;nbsp; Below is a chunk of XML that must be placed under the TemplateManager\Templates node.&amp;nbsp; If you have any others, please let me know! &lt;p&gt;&amp;nbsp; &lt;blockquote&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;Template text="if( $TYPE$$EXPRESSION$ )&amp;amp;#xA; throw new ArgumentException( @&amp;amp;quot;Cannot $ACTION$ as the value passed was invalid. Please provide a valid value.&amp;amp;quot;, @&amp;amp;quot;$TYPE$&amp;amp;quot; ) ;&amp;amp;#xA;" shortcut="arg" description="Throws an ArgumentException" kind="livetemplate" reformat="false" fileMask="" context="Everywhere" fileContext="CSharp" enabled="False" id="1723695683"&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;Variables&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;Variable name="TYPE" expression="variableOfType(&amp;amp;quot;System.Object&amp;amp;quot;)" initialRange="0" /&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;Variable name="EXPRESSION" expression="constant(&amp;amp;quot; != 1&amp;amp;quot;)" initialRange="0" /&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;Variable name="ACTION" expression="constant(&amp;amp;quot;PERFORM AN ACTION&amp;amp;quot;)" initialRange="0" /&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;/Variables&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;/Template&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;Template text="if( $TYPE$ == null || $TYPE$.Length == 0 )&amp;amp;#xA;throw new ArgumentNullException( @&amp;amp;quot;$TYPE$&amp;amp;quot;, @&amp;amp;quot;Cannot $ACTION$ as the value passed was null or empty. Please provide a valid non null value.&amp;amp;quot; ) ;&amp;amp;#xA;" shortcut="argempty" description="Throws an ArgumentNullException when a string is null or empty" kind="livetemplate" reformat="true" fileMask="" context="Everywhere" fileContext="CSharp" enabled="False" id="1705884294"&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;Variables&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;Variable name="TYPE" expression="variableOfType(&amp;amp;quot;System.String&amp;amp;quot;)" initialRange="0" /&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;Variable name="ACTION" expression="constant(&amp;amp;quot;PERFORM AN ACTION&amp;amp;quot;)" initialRange="0" /&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;/Variables&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;/Template&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;Template text="if( $TYPE$ == null )&amp;amp;#xA;throw new ArgumentNullException( @&amp;amp;quot;$TYPE$&amp;amp;quot;, @&amp;amp;quot;Cannot $ACTION$ as the value passed was null. Please provide a valid non-null value.&amp;amp;quot; ) ;&amp;amp;#xA;" shortcut="argnull" description="Throws an ArgumentNullException" kind="livetemplate" reformat="true" fileMask="" context="Everywhere" fileContext="CSharp" enabled="False" id="1497171628"&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;Variables&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;Variable name="TYPE" expression="variableOfType(&amp;amp;quot;System.Object&amp;amp;quot;)" initialRange="0" /&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;Variable name="ACTION" expression="constant(&amp;amp;quot;PERFORM AN ACTION&amp;amp;quot;)" initialRange="0" /&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;/Variables&amp;gt;&lt;/font&gt; &lt;p&gt;&lt;font size="1"&gt;&amp;lt;/Template&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115575572596927769?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115575572596927769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115575572596927769&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115575572596927769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115575572596927769'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/08/reshaper-live-templates-for-validating.html' title='Reshaper Live Templates for validating arguments'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115575524640482865</id><published>2006-08-16T19:07:00.000Z</published><updated>2006-08-16T19:07:26.406Z</updated><title type='text'>Spec#</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;p&gt;Spec# is&amp;nbsp;an addition to C# to allow specifications to be explicitly added to methods. Specifications can state that a method takes a string (which must be non-nul), an integer (which must be between 0 and n), or an array (of which all entries must be non null).&amp;nbsp; Previously in C#, this would have meant a fair few lines of code that manually checked parameters and threw the respective exceptions.&amp;nbsp; Furthermore, without specifications, you cannot force any over-ridden method to comply to the same specification.&lt;/p&gt; &lt;p&gt;Spec#&amp;nbsp;is currently a research project and can be downloaded at &lt;a href="http://research.microsoft.com/specsharp/"&gt;http://research.microsoft.com/specsharp/&lt;/a&gt; &lt;p&gt;It can be installed to run in Visual Studio 2003 and 2005.&amp;nbsp; For both systems, it requires an application called Simplify.&amp;nbsp; This is a java application that can be downloaded at HP Labs Java Programming Toolkit page.&amp;nbsp; The zipped file that contains Simplify.exe can be found at &lt;a href="http://www.hpl.hp.com/downloads/crl/jtk/download-escjava.html"&gt;http://www.hpl.hp.com/downloads/crl/jtk/download-escjava.html&lt;/a&gt;, but don't forget to first read the licence at &lt;a href="http://www.hpl.hp.com/downloads/crl/jtk/agreement.html"&gt;http://www.hpl.hp.com/downloads/crl/jtk/agreement.html&lt;/a&gt; ;)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115575524640482865?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115575524640482865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115575524640482865&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115575524640482865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115575524640482865'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/08/spec.html' title='Spec#'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115575441960442137</id><published>2006-08-16T18:53:00.000Z</published><updated>2006-08-16T18:53:39.610Z</updated><title type='text'>Quicky StringBuilder Tip</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;p&gt;StringBuilder has an Append method that returns a reference to itself. This is useful for when you want to append several items in one go. The following code is an example. Obviously, you'll get more benefit the more items you add:  &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StringBuilder sb = new StringBuilder( ) ;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string s = sb.Append( @"Hello " )&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Append( @"World" )&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .ToString( ) ; &lt;p&gt;If you've been forced into programming in VB, then check out the original text of this tip at devx.com: &lt;p&gt;&lt;a href="http://www.devx.com/tips/Tip/28152"&gt;http://www.devx.com/tips/Tip/28152&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115575441960442137?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115575441960442137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115575441960442137&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115575441960442137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115575441960442137'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/08/quicky-stringbuilder-tip.html' title='Quicky StringBuilder Tip'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32841709.post-115575427054276813</id><published>2006-08-16T18:51:00.000Z</published><updated>2006-08-16T18:51:10.546Z</updated><title type='text'>Quicker loading of the Visual Studio .NET IDE</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;h6&gt;A handy tip from the &lt;a href="http://msdn.microsoft.com/msdnmag/issues/03/11/Bugslayer/"&gt;Bug Slayer&lt;/a&gt; MSDN column: &lt;/h6&gt; &lt;p&gt;Tip 57 - To hasten the startup of the Visual Studio .NET IDE, get rid of the Start Page. Because the Start Page requires all Web-browsing components to be loaded, you can chop off a considerable amount of startup time by skipping it. To turn off the Start Page, select Options from the Tools menu to bring up the Options dialog. In the Environment/General property page, select "Show empty environment" in the "at Startup" combobox.  &lt;p&gt;Of course, with &lt;a href="http://www.jetbrains.com/resharper/"&gt;Resharper&lt;/a&gt; installed, this causes the the IDE's start-up time to become terribly slow.&amp;nbsp; But it's worth it!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32841709-115575427054276813?l=stevedunns.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stevedunns.blogspot.com/feeds/115575427054276813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32841709&amp;postID=115575427054276813&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115575427054276813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32841709/posts/default/115575427054276813'/><link rel='alternate' type='text/html' href='http://stevedunns.blogspot.com/2006/08/quicker-loading-of-visual-studio-net.html' title='Quicker loading of the Visual Studio .NET IDE'/><author><name>Steve Dunn</name><uri>http://www.blogger.com/profile/07148684574958879519</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
