<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>PK Software Blog (old)</title>
    <link>http://www.pksoftware.net/blog/</link>
    <description>My blog has moved!!</description>
    <language>en-us</language>
    <copyright>Paul Kohler</copyright>
    <lastBuildDate>Tue, 11 Mar 2008 12:10:58 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>paul@pksoftware.net</managingEditor>
    <webMaster>paul@pksoftware.net</webMaster>
    <item>
      <trackback:ping>http://www.pksoftware.net/blog/Trackback.aspx?guid=f08b331c-885c-4c65-a641-f1fa85daf4ce</trackback:ping>
      <pingback:server>http://www.pksoftware.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.pksoftware.net/blog/PermaLink,guid,f08b331c-885c-4c65-a641-f1fa85daf4ce.aspx</pingback:target>
      <dc:creator>Paul Kohler</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
My blog has moved... to <a href="http://www.pksoftware.net/devblog/">http://www.pksoftware.net/devblog/</a> and
the RSS feed is now <a href="http://www.pksoftware.net/devblog/syndication.axd">http://www.pksoftware.net/devblog/syndication.axd</a></p>
        <p>
 
</p>
        <img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=f08b331c-885c-4c65-a641-f1fa85daf4ce" />
      </body>
      <title>Blog has moved - but not far!</title>
      <guid isPermaLink="false">http://www.pksoftware.net/blog/PermaLink,guid,f08b331c-885c-4c65-a641-f1fa85daf4ce.aspx</guid>
      <link>http://www.pksoftware.net/blog/2008/03/11/Blog+Has+Moved+But+Not+Far.aspx</link>
      <pubDate>Tue, 11 Mar 2008 12:10:58 GMT</pubDate>
      <description>&lt;p&gt;
My blog has moved... to &lt;a href="http://www.pksoftware.net/devblog/"&gt;http://www.pksoftware.net/devblog/&lt;/a&gt;&amp;nbsp;and
the RSS feed is now &lt;a href="http://www.pksoftware.net/devblog/syndication.axd"&gt;http://www.pksoftware.net/devblog/syndication.axd&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=f08b331c-885c-4c65-a641-f1fa85daf4ce" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.pksoftware.net/blog/Trackback.aspx?guid=8e67288a-52f3-414c-9a6f-ed41a1117dab</trackback:ping>
      <pingback:server>http://www.pksoftware.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.pksoftware.net/blog/PermaLink,guid,8e67288a-52f3-414c-9a6f-ed41a1117dab.aspx</pingback:target>
      <dc:creator>Paul Kohler</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">Last week I slipped an update in to <b><a href="http://www.pksoftware.net/MiniSqlQuery/">Mini
SQL Query</a></b> - version 0.9.37.<br />
Just minor fixes, updates, a <a href="http://www.pksoftware.net/MiniSqlQuery/Help/">quick
start help page</a> and I added a "Templates" tool window plugin...<br /><p></p><img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=8e67288a-52f3-414c-9a6f-ed41a1117dab" /></body>
      <title>Slight upgrade to Mini SQL Query</title>
      <guid isPermaLink="false">http://www.pksoftware.net/blog/PermaLink,guid,8e67288a-52f3-414c-9a6f-ed41a1117dab.aspx</guid>
      <link>http://www.pksoftware.net/blog/2008/03/03/Slight+Upgrade+To+Mini+SQL+Query.aspx</link>
      <pubDate>Mon, 03 Mar 2008 10:30:11 GMT</pubDate>
      <description>Last week I slipped an update in to &lt;b&gt;&lt;a href="http://www.pksoftware.net/MiniSqlQuery/"&gt;Mini
SQL Query&lt;/a&gt;&lt;/b&gt; - version 0.9.37.&lt;br&gt;
Just minor fixes, updates, a &lt;a href="http://www.pksoftware.net/MiniSqlQuery/Help/"&gt;quick
start help page&lt;/a&gt; and I added a "Templates" tool window plugin...&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=8e67288a-52f3-414c-9a6f-ed41a1117dab" /&gt;</description>
      <category>Products;Products/Mini SQL Query</category>
    </item>
    <item>
      <trackback:ping>http://www.pksoftware.net/blog/Trackback.aspx?guid=13c6f6d8-20cc-458a-a254-ff50355e0685</trackback:ping>
      <pingback:server>http://www.pksoftware.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.pksoftware.net/blog/PermaLink,guid,13c6f6d8-20cc-458a-a254-ff50355e0685.aspx</pingback:target>
      <dc:creator>Paul Kohler</dc:creator>
      <title>Beta Release of Mini SQL Query</title>
      <guid isPermaLink="false">http://www.pksoftware.net/blog/PermaLink,guid,13c6f6d8-20cc-458a-a254-ff50355e0685.aspx</guid>
      <link>http://www.pksoftware.net/blog/2008/02/01/Beta+Release+Of+Mini+SQL+Query.aspx</link>
      <pubDate>Fri, 01 Feb 2008 02:43:45 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Arial&gt;&lt;strong&gt;Mini
SQL Query&lt;/strong&gt; is one of those tools that I have had in my &lt;em&gt;self coded toolbox&lt;/em&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt; for
a long time now. Last year I almost released it to the public but a few things happened
and the release sadly didn't. My apologies to those that were waiting, I had plenty
of emails in the months to follow asking where the editor was!&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;
&lt;o:p&gt;
&lt;font face=Arial color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Arial&gt;Well,
I finally uploaded the beta - see &lt;/font&gt;&lt;a href="http://www.pksoftware.net/MiniSqlQuery/"&gt;&lt;strong&gt;&lt;font face=Arial&gt;http://www.pksoftware.net/MiniSqlQuery/&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;font face=Arial&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font size=3&gt;&lt;font face=Arial color=#000000&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=center&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font face=Arial&gt;&amp;nbsp;&lt;img title="Mini SQL Query hitting an MSSQL database" src="http://www.pksoftware.net/blog/content/binary/msq-view-table.png" border=0&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=center&gt;
&lt;strong&gt;Mini SQL Query&lt;/strong&gt; hitting an MSSQL database.
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;font face=Arial&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Arial&gt;Make
sure you register so that when fixes or major releases are made you know – there is
also the &lt;/font&gt;&lt;a href="http://www.pksoftware.net/blog/SyndicationService.asmx/GetRssCategory?categoryName=Products%7CMini%20SQL%20Query"&gt;&lt;font face=Arial&gt;Mini
SQL Query product RSS feed&lt;/font&gt;&lt;/a&gt;&lt;font face=Arial&gt;). Keep in mind its &lt;em&gt;in no
way&lt;/em&gt;&amp;nbsp;intended as a replacement for Microsoft's "SQL Server Management Studio".
I use it for making quick queries or updates to my databases. I find it particularly
good for managing a remotely hosted database. I don't use it for modeling databases
etc but I do plan on making a bunch of plugins to help with quickly putting together
a &lt;strong&gt;NetTiers&lt;/strong&gt; focused database model.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;
&lt;o:p&gt;
&lt;font face=Arial color=#000000 size=3&gt;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face=Arial&gt;&lt;img title="Mini SQL Query hitting an MS Access database with a table window floating" src="http://www.pksoftware.net/blog/content/binary/msq-dockable-windows.PNG" border=0&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=center&gt;
&lt;strong&gt;Mini SQL Query&lt;/strong&gt; hitting an MS Access database with a table window
floating.
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=center&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Arial&gt;The
application itself it an exercise in &lt;strong&gt;minimalist coding&lt;/strong&gt;. I made use
of open source libraries such as the &lt;strong&gt;ICSharpTextEditor&lt;/strong&gt; giving lots
of edit functionality with little effort. I used &lt;strong&gt;Weifen Luo’s docking library&lt;/strong&gt; which
has been great (I need to track down the correct links etc will post later). The design
employs a &lt;em&gt;service model&lt;/em&gt; with &lt;em&gt;commands &lt;/em&gt;which keeps code nicely separated
and easily extendable (see the &lt;/font&gt;&lt;a href="http://www.pksoftware.net/MiniSqlQuery/Help/api/" target=_blank&gt;&lt;font face=Arial&gt;API
docs&lt;/font&gt;&lt;/a&gt;&lt;font face=Arial&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;on making
plugins if you have the geekish urge to!) The testing is done with a combination of
stubs and mocks (I use &lt;strong&gt;Rhino Mocks&lt;/strong&gt;, just love the style...)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;The whole
application was actually coded with &lt;strong&gt;Microsoft Visual C# Express Edition&lt;/strong&gt;.
I wanted to see what a hobby developer IDE could come up with.&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;strong&gt;&lt;em&gt;Some
notes...&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;strong&gt;Multiple
Connection Types&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;One of
the main features is the fact that you can connect to pretty much any database so
long as you know the Provider type and connection string. I have only had MSSQL and
Access databases to test against so far but I might try and ressurect my Oracle instance
just to check out the schema details.&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;Probaby
the main usability thing to keep in mind is that if you change the provider type and/or
the connection string you should hit the 'Refresh Database Connection' button/menu
item. The 'Database Inspector' gets reloaded at this point too.&amp;nbsp;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;&lt;strong&gt;Database
Inspector&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial color=#000000 size=3&gt;The inspector
window shows basic details that are taken from the DBConnection.GetSchema output.
I have noticed that some of the types for the access databases are not actually defined
and so come though as a number with a question mark (e.g. 130? with is actually a
variable string) .&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial size=3&gt;&lt;strong&gt;Settings Persistance&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial size=3&gt;There is none! I have
not worried about it to date but that will turn up in time.&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial size=3&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"&gt;
&lt;span style="mso-ansi-language: EN-US"&gt;&lt;font face=Arial size=3&gt;Let me know what you
think, PK&amp;nbsp; :-)&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=13c6f6d8-20cc-458a-a254-ff50355e0685" /&gt;</description>
      <category>Products;Products/Mini SQL Query</category>
    </item>
    <item>
      <trackback:ping>http://www.pksoftware.net/blog/Trackback.aspx?guid=321d2fd6-bec9-4de2-9501-d34115e7bd6a</trackback:ping>
      <pingback:server>http://www.pksoftware.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.pksoftware.net/blog/PermaLink,guid,321d2fd6-bec9-4de2-9501-d34115e7bd6a.aspx</pingback:target>
      <dc:creator>Paul Kohler</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I was working with the new MS MVC framework but with express, I used <a href="http://www.lazycoder.com/weblog/index.php/archives/2007/12/10/using-the-aspnet-mvc-framework-with-visual-web-developer-express" target="_blank">Lazycoders
post</a> as a helper to what lead to this template. I have put together a simple C#
project template for Visual Web Developer 2008 Express Edition. Just dump it into
your 
</p>
        <p>
  "(my docs)\Visual Studio 2008\Templates\<strong>ProjectTemplates</strong>\Visual
Web Developer"
</p>
        <p>
folder and choose “new website” etc (may need to restart the IDE to pick up the files).
</p>
        <p>
          <img src="http://www.pksoftware.net/blog/content/binary/mvc-1.Png" border="0" />
        </p>
        <p>
It puts together the basic structure using the "App_Code" restriction in the express
edition of the IDE (well, and some others...)
</p>
        <p>
          <img src="http://www.pksoftware.net/blog/content/binary/mvc-2.Png" border="0" />
        </p>
        <p>
 
</p>
        <p>
There is also a simple “view page” item template, drop this into 
</p>
        <p>
  "(my docs)\Visual Studio 2008\Templates\<strong>ItemTemplates</strong>\Visual
Web Developer"
</p>
        <p>
I did not worry about the controller (simgle page + simple change etc)...
</p>
        <p>
Merry Christmas! PK :-)
</p>
        <p>
 
</p>
        <p>
          <strong>Files:</strong>
        </p>
        <p>
        </p>
        <ul>
          <li>
            <a href="http://www.pksoftware.net/blog/content/binary/WebDevMvcAspNetSite.zip">WebDevMvcAspNetSite.zip
(8.73 KB)</a> (C# project template) 
</li>
          <li>
            <a href="http://www.pksoftware.net/blog/content/binary/MvcViewPage.zip">MvcViewPage.zip
(2.27 KB)</a> (C# item template)</li>
        </ul>
        <img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=321d2fd6-bec9-4de2-9501-d34115e7bd6a" />
      </body>
      <title>An MVC Project Template for Visual Web Developer 2008 Express</title>
      <guid isPermaLink="false">http://www.pksoftware.net/blog/PermaLink,guid,321d2fd6-bec9-4de2-9501-d34115e7bd6a.aspx</guid>
      <link>http://www.pksoftware.net/blog/2007/12/24/An+MVC+Project+Template+For+Visual+Web+Developer+2008+Express.aspx</link>
      <pubDate>Mon, 24 Dec 2007 03:09:14 GMT</pubDate>
      <description>&lt;p&gt;
I was working with the new MS MVC framework but with express, I used &lt;a href="http://www.lazycoder.com/weblog/index.php/archives/2007/12/10/using-the-aspnet-mvc-framework-with-visual-web-developer-express" target=_blank&gt;Lazycoders
post&lt;/a&gt; as a helper to what lead to this template. I have put together a simple C#
project template for Visual Web Developer 2008 Express Edition. Just dump it into
your 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; "(my docs)\Visual Studio 2008\Templates\&lt;strong&gt;ProjectTemplates&lt;/strong&gt;\Visual
Web Developer"
&lt;/p&gt;
&lt;p&gt;
folder and choose “new website” etc (may need to restart the IDE to pick up the files).
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.pksoftware.net/blog/content/binary/mvc-1.Png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
It puts together the basic structure using the "App_Code" restriction in the express
edition of the IDE (well, and some others...)
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.pksoftware.net/blog/content/binary/mvc-2.Png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
There is also a simple “view page” item template, drop this into 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; "(my docs)\Visual Studio 2008\Templates\&lt;strong&gt;ItemTemplates&lt;/strong&gt;\Visual
Web Developer"
&lt;/p&gt;
&lt;p&gt;
I did not worry about the controller (simgle page + simple change etc)...
&lt;/p&gt;
&lt;p&gt;
Merry Christmas! PK :-)
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Files:&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.pksoftware.net/blog/content/binary/WebDevMvcAspNetSite.zip"&gt;WebDevMvcAspNetSite.zip
(8.73 KB)&lt;/a&gt; (C# project template) 
&lt;li&gt;
&lt;a href="http://www.pksoftware.net/blog/content/binary/MvcViewPage.zip"&gt;MvcViewPage.zip
(2.27 KB)&lt;/a&gt;&amp;nbsp;(C# item template)&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=321d2fd6-bec9-4de2-9501-d34115e7bd6a" /&gt;</description>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.pksoftware.net/blog/Trackback.aspx?guid=5e2051cc-df44-415d-ac7f-4d027416e414</trackback:ping>
      <pingback:server>http://www.pksoftware.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.pksoftware.net/blog/PermaLink,guid,5e2051cc-df44-415d-ac7f-4d027416e414.aspx</pingback:target>
      <dc:creator>Paul Kohler</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">It's common practice for developers to
make small "TODO" notes in code as they work for themselves or others to clarify at
some time...<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
TODO: confirm this business requirement...</span><br /><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
TODO: make this better!</span><br /><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
TODO: bread, butter, eggs and milk...</span><br /></span></p>
Issues can arise when the TODO's are not taken care of for whatever reason or get
lost in the mayhem of meeting deadlines. A worst case scenario could arise when there
is a production defect for an obscure situation and the maintenance programmer finds
something like this:<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
TODO: Not sure if there are any more response codes for this one, check before release.</span></span></p>
Opps! Now that's expensive.<br />
Now I am not saying this is good or bad (!) practice - but what I have started to
do within my team is create either a <b>failing </b>or <b>ignored unit test</b> (depending
on the importance) marking what would normally be an innocent "TODO" item. The unit
test stays in the build as either a fail or ignore and does not drop off the radar. 
<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;">[Test]<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> Need_to_confirm_foo()<br />
{<br />
  Assert.Fail();<br />
}</span></p>
Or...<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;">[Test]<br />
[Ignore(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Confirmation
required from the business"</span>)]<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> A_foo_only_has_a_bla()<br />
{<br />
}</span></p>
It's much harder to miss a bunch of ignored or failing unit tests before that production
release than some well hidden TODO comments!<br /><br /><p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.pksoftware.net%2fblog%2f2007%2f10%2f31%2fTip%2bUse%2bFailing%2bUnit%2bTests%2bTo%2bMark%2bYour%2bTODO%2bItems.aspx"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.pksoftware.net%2fblog%2f2007%2f10%2f31%2fTip%2bUse%2bFailing%2bUnit%2bTests%2bTo%2bMark%2bYour%2bTODO%2bItems.aspx&amp;bgcolor=0099FF" alt="kick it on DotNetKicks.com" border="0" /></a></p><img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=5e2051cc-df44-415d-ac7f-4d027416e414" /></body>
      <title>Tip - Use failing Unit Tests to mark your TODO Items</title>
      <guid isPermaLink="false">http://www.pksoftware.net/blog/PermaLink,guid,5e2051cc-df44-415d-ac7f-4d027416e414.aspx</guid>
      <link>http://www.pksoftware.net/blog/2007/10/31/Tip+Use+Failing+Unit+Tests+To+Mark+Your+TODO+Items.aspx</link>
      <pubDate>Wed, 31 Oct 2007 09:40:05 GMT</pubDate>
      <description>It's common practice for developers to make small "TODO" notes in code as they work for themselves or others to clarify at some time...&lt;br&gt;
&lt;p&gt;
&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt; &lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;//
TODO: confirm this business requirement...&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;//
TODO: make this better!&lt;/span&gt;
&lt;br&gt;
&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;//
TODO: bread, butter, eggs and milk...&lt;/span&gt;
&lt;br&gt;
&lt;/span&gt;
&lt;/p&gt;
Issues can arise when the TODO's are not taken care of for whatever reason or get
lost in the mayhem of meeting deadlines. A worst case scenario could arise when there
is a production defect for an obscure situation and the maintenance programmer finds
something like this:&lt;br&gt;
&lt;p&gt;
&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt; &lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;//
TODO: Not sure if there are any more response codes for this one, check before release.&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
Opps! Now that's expensive.&lt;br&gt;
Now I am not saying this is good or bad (!) practice - but what I have started to
do within my team is create either a &lt;b&gt;failing &lt;/b&gt;or &lt;b&gt;ignored unit test&lt;/b&gt; (depending
on the importance) marking what would normally be an innocent "TODO" item. The unit
test stays in the build as either a fail or ignore and does not drop off the radar. 
&lt;br&gt;
&lt;p&gt;
&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;[Test]&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; Need_to_confirm_foo()&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; Assert.Fail();&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
Or...&lt;br&gt;
&lt;p&gt;
&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;[Test]&lt;br&gt;
[Ignore(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"Confirmation
required from the business"&lt;/span&gt;)]&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; A_foo_only_has_a_bla()&lt;br&gt;
{&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
It's much harder to miss a bunch of ignored or failing unit tests before that production
release than some well hidden TODO comments!&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.pksoftware.net%2fblog%2f2007%2f10%2f31%2fTip%2bUse%2bFailing%2bUnit%2bTests%2bTo%2bMark%2bYour%2bTODO%2bItems.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.pksoftware.net%2fblog%2f2007%2f10%2f31%2fTip%2bUse%2bFailing%2bUnit%2bTests%2bTo%2bMark%2bYour%2bTODO%2bItems.aspx&amp;amp;bgcolor=0099FF" alt="kick it on DotNetKicks.com" border="0"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=5e2051cc-df44-415d-ac7f-4d027416e414" /&gt;</description>
      <category>Coding;TDD;Testing</category>
    </item>
    <item>
      <trackback:ping>http://www.pksoftware.net/blog/Trackback.aspx?guid=01dbfdf0-aa7e-4827-b4fa-2723dec9adb2</trackback:ping>
      <pingback:server>http://www.pksoftware.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.pksoftware.net/blog/PermaLink,guid,01dbfdf0-aa7e-4827-b4fa-2723dec9adb2.aspx</pingback:target>
      <dc:creator>Paul Kohler</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Scott Guthrie talks about Microsoft releasing the .Net framework source code later
this year.<br />
A very good move by Microsoft I think :-)
</p>
        <p>
          <a href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx">http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx</a>
        </p>
        <img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=01dbfdf0-aa7e-4827-b4fa-2723dec9adb2" />
      </body>
      <title>Microsoft to Release the Source Code for the .NET Framework Libraries</title>
      <guid isPermaLink="false">http://www.pksoftware.net/blog/PermaLink,guid,01dbfdf0-aa7e-4827-b4fa-2723dec9adb2.aspx</guid>
      <link>http://www.pksoftware.net/blog/2007/10/04/Microsoft+To+Release+The+Source+Code+For+The+NET+Framework+Libraries.aspx</link>
      <pubDate>Thu, 04 Oct 2007 02:22:05 GMT</pubDate>
      <description>&lt;p&gt;
Scott Guthrie talks about Microsoft releasing the .Net framework source code later
this year.&lt;br&gt;
A very good move by Microsoft I think :-)
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=01dbfdf0-aa7e-4827-b4fa-2723dec9adb2" /&gt;</description>
      <category>Coding;Links</category>
    </item>
    <item>
      <trackback:ping>http://www.pksoftware.net/blog/Trackback.aspx?guid=74e669ee-3ef9-4348-8996-8b16b866aad1</trackback:ping>
      <pingback:server>http://www.pksoftware.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.pksoftware.net/blog/PermaLink,guid,74e669ee-3ef9-4348-8996-8b16b866aad1.aspx</pingback:target>
      <dc:creator>Paul Kohler</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Make that version 1.0.0.3!<br /></p>
        <p>
I did not quite get this feature into the previous version and just posted the updates
in case I got busy.
</p>
        <p>
The big (and very useful) change for <em>build 3</em> is that you can "paste" <em>unit
test code</em> into the tool and the phrases will be extracted - if they use
underscores and the code is C# (sorry, minor bug, I'll fix that shortly!) In practice
I have found the underscore styke far more readable.
</p>
        <p>
For example, if you have the following unit test code, copy it to the clipboard...
</p>
        <p>
        </p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> Tests<br />
{<br />
    [TestFixture]<br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> PersonEntityTests<br />
    {<br />
        [SetUp]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> TestSetUp()<br />
        {<br />
            <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//
...</span><br />
        }<br />
        <br />
        [Test]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span><strong>A_method_will_be_extracted_from_the_clipboard()</strong><br />
        {<br />
            <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//
asserts etc</span><br />
        }<br />
    }<br />
}<br /></span>
        </p>
...and use the new "<strong>Paste beaviours from clipboard</strong>" menu option (or <strong>ALT+F5</strong>)
and you get the method name extracted.<br /><p></p><p><img src="http://www.pksoftware.net/blog/content/binary/btut-past-code.png" border="0" /></p><p>
The full round trip. Whe you want to continue working on a unit test class you can
use this feature to get the current context of the testing... have fun! PK :-)
</p><p>
  <a href="http://www.pksoftware.net/BehaviourToUnitTest/"><strong>http://www.pksoftware.net/BehaviourToUnitTest/</strong></a></p><hr width="100%" size="2" /><i>Quick note - now at v1.0.0.2 - the main changes are:</i><ul><li><i>The use of the ICSharp.TextEditor for better editing</i></li><li><i>The defaults are C# with the underscore style</i></li><li><i>A few more word substitutions by default</i></li></ul><p><i>Enjoy!</i></p><img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=74e669ee-3ef9-4348-8996-8b16b866aad1" /></body>
      <title>Behaviour Driven Unit Test Design Tool Updated</title>
      <guid isPermaLink="false">http://www.pksoftware.net/blog/PermaLink,guid,74e669ee-3ef9-4348-8996-8b16b866aad1.aspx</guid>
      <link>http://www.pksoftware.net/blog/2007/09/04/Behaviour+Driven+Unit+Test+Design+Tool+Updated.aspx</link>
      <pubDate>Tue, 04 Sep 2007 10:49:31 GMT</pubDate>
      <description>&lt;p&gt;
Make that version 1.0.0.3!&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
I did not quite get this feature into the previous version and just posted the updates
in case I got busy.
&lt;/p&gt;
&lt;p&gt;
The big (and very useful) change for &lt;em&gt;build 3&lt;/em&gt; is that you can "paste" &lt;em&gt;unit
test code&lt;/em&gt; into the tool&amp;nbsp;and the phrases will be extracted - if they use
underscores and the code is C# (sorry, minor bug, I'll fix that shortly!) In practice
I have found the underscore styke far more readable.
&lt;/p&gt;
&lt;p&gt;
For example, if you have the following unit test code, copy it to the clipboard...
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;namespace&lt;/span&gt; Tests&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[TestFixture]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;class&lt;/span&gt; PersonEntityTests&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[SetUp]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; TestSetUp()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//
...&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Test]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; &lt;strong&gt;A_method_will_be_extracted_from_the_clipboard()&lt;/strong&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//
asserts etc&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
}&lt;br&gt;
&lt;/span&gt;
&lt;/p&gt;
...and use the new "&lt;strong&gt;Paste beaviours from clipboard&lt;/strong&gt;" menu option (or &lt;strong&gt;ALT+F5&lt;/strong&gt;)
and you get the method name extracted.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.pksoftware.net/blog/content/binary/btut-past-code.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
The full round trip. Whe you want to continue working on a unit test class you can
use this feature to get the current context of the testing... have fun! PK :-)
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &lt;a href="http://www.pksoftware.net/BehaviourToUnitTest/"&gt;&lt;strong&gt;http://www.pksoftware.net/BehaviourToUnitTest/&lt;/strong&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;hr width="100%" size=2&gt;
&lt;i&gt;Quick note - now at v1.0.0.2 - the main changes are:&lt;/i&gt; 
&lt;ul&gt;
&lt;li&gt;
&lt;i&gt;The use of the ICSharp.TextEditor for better editing&lt;/i&gt; 
&lt;li&gt;
&lt;i&gt;The defaults are C# with the underscore style&lt;/i&gt; 
&lt;li&gt;
&lt;i&gt;A few more word substitutions by default&lt;/i&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;i&gt;Enjoy!&lt;/i&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=74e669ee-3ef9-4348-8996-8b16b866aad1" /&gt;</description>
      <category>Products;Products/Behaviour to Unit Test;TDD;Testing</category>
    </item>
    <item>
      <trackback:ping>http://www.pksoftware.net/blog/Trackback.aspx?guid=e73cf1a0-95a9-4947-ac47-057b30b7f95a</trackback:ping>
      <pingback:server>http://www.pksoftware.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.pksoftware.net/blog/PermaLink,guid,e73cf1a0-95a9-4947-ac47-057b30b7f95a.aspx</pingback:target>
      <dc:creator>Paul Kohler</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have uploaded a small development tool that I put together recently, its called
"Behaviour to Unit Test". Basically it converts code functionality from <em>plain
sentences</em> (or stories) into <em>unit test stub code</em>. You could also think
of it as a cure for TDD writers block!
</p>
        <p>
For an example of the usage, use the <strong>Generation</strong> -&gt; <strong>Fill
out example</strong> menu option and hit <strong>Convert</strong>. Basically it takes
a set of plain language behaviours for an object such as "person":
</p>
        <ul>
          <li>
Check that the default values of all string properties are empty 
</li>
          <li>
The ToString method renders the first and last names 
</li>
          <li>
If the date of birth is null, calculate age will return -1 
</li>
          <li>
If the date of birth is not null, calculate age will return a value</li>
        </ul>
        <p>
...and converts them into something like:
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> NUnit.Framework;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> NUnit.Framework.SyntaxHelpers;<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> Tests<br />
{<br />
    [TestFixture]<br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> PersonEntityTests<br />
    {<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span> PersonEntity
person;<br />
        <br />
        [SetUp]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> TestSetUp()<br />
        {<br />
            person <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> PersonEntity();<br />
        }<br />
        <br />
        [Test]<br />
        [Ignore(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Currently
only a unit test stub"</span>)]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> CheckThatTheDefaultValuesOfAllStringPropertiesAreEmpty()<br />
        {<br />
        }<br />
        <br />
        [Test]<br />
        [Ignore(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Currently
only a unit test stub"</span>)]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> TheToStringMethodRendersTheFirstAndLastNames()<br />
        {<br />
        }<br />
        <br />
        [Test]<br />
        [Ignore(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Currently
only a unit test stub"</span>)]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> IfTheDateOfBirthIsNullCalculateAgeWillReturnMinus1()<br />
        {<br />
        }<br />
        <br />
        [Test]<br />
        [Ignore(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Currently
only a unit test stub"</span>)]<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> IfTheDateOfBirthIsNotNullCalculateAgeWillReturnAValue()<br />
        {<br />
        }<br />
    }<br />
}<br /></span>
        </p>
        <p>
There are C# and VB.NET templates for now. Check it out:
</p>
        <p>
  <a href="http://www.pksoftware.net/BehaviourToUnitTest/"><strong>http://www.pksoftware.net/BehaviourToUnitTest/</strong></a></p>
        <p>
My intention is to keep the tool small and simple. The main thing I want to add at
the moment is some load/save functionality and drop in the ICSharp.TextEditor for
more friendly editing...
</p>
        <p>
          <a href="http://www.dotnetkicks.com/kick/?url=http://www.pksoftware.net/blog/2007/08/27/New%2bTool%2bBehaviour%2bTo%2bUnit%2bTest.aspx">
            <img alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.pksoftware.net/blog/2007/08/27/New%2bTool%2bBehaviour%2bTo%2bUnit%2bTest.aspx" border="0" />
          </a>
        </p>
        <img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=e73cf1a0-95a9-4947-ac47-057b30b7f95a" />
      </body>
      <title>New Tool - Behaviour to Unit Test</title>
      <guid isPermaLink="false">http://www.pksoftware.net/blog/PermaLink,guid,e73cf1a0-95a9-4947-ac47-057b30b7f95a.aspx</guid>
      <link>http://www.pksoftware.net/blog/2007/08/27/New+Tool+Behaviour+To+Unit+Test.aspx</link>
      <pubDate>Mon, 27 Aug 2007 09:43:04 GMT</pubDate>
      <description>&lt;p&gt;
I have uploaded a small development tool that&amp;nbsp;I put together recently, its called
"Behaviour to Unit Test". Basically it converts code functionality from &lt;em&gt;plain
sentences&lt;/em&gt; (or stories) into &lt;em&gt;unit test stub code&lt;/em&gt;. You could also think
of it as a cure for TDD writers block!
&lt;/p&gt;
&lt;p&gt;
For an example of the usage, use the &lt;strong&gt;Generation&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Fill
out example&lt;/strong&gt; menu option and hit &lt;strong&gt;Convert&lt;/strong&gt;. Basically it takes
a set of plain language behaviours for an object such as "person":
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Check that the default values of all string properties are empty 
&lt;li&gt;
The ToString method renders the first and last names 
&lt;li&gt;
If the date of birth is null, calculate age will return -1 
&lt;li&gt;
If the date of birth is not null, calculate age will return a value&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
...and converts them into something like:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;using&lt;/span&gt; System;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;using&lt;/span&gt; NUnit.Framework;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;using&lt;/span&gt; NUnit.Framework.SyntaxHelpers;&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;namespace&lt;/span&gt; Tests&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[TestFixture]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;class&lt;/span&gt; PersonEntityTests&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;private&lt;/span&gt; PersonEntity
person;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[SetUp]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; TestSetUp()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;person &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; PersonEntity();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Test]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Ignore(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Currently
only a unit test stub"&lt;/span&gt;)]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; CheckThatTheDefaultValuesOfAllStringPropertiesAreEmpty()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Test]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Ignore(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Currently
only a unit test stub"&lt;/span&gt;)]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; TheToStringMethodRendersTheFirstAndLastNames()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Test]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Ignore(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Currently
only a unit test stub"&lt;/span&gt;)]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; IfTheDateOfBirthIsNullCalculateAgeWillReturnMinus1()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Test]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Ignore(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Currently
only a unit test stub"&lt;/span&gt;)]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; IfTheDateOfBirthIsNotNullCalculateAgeWillReturnAValue()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
}&lt;br&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
There are C# and VB.NET templates for now. Check it out:
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &lt;a href="http://www.pksoftware.net/BehaviourToUnitTest/"&gt;&lt;strong&gt;http://www.pksoftware.net/BehaviourToUnitTest/&lt;/strong&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
My intention is to keep the tool small and simple. The main thing I want to add at
the moment is some load/save functionality and drop in the ICSharp.TextEditor for
more friendly editing...
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http://www.pksoftware.net/blog/2007/08/27/New%2bTool%2bBehaviour%2bTo%2bUnit%2bTest.aspx"&gt;&lt;img alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.pksoftware.net/blog/2007/08/27/New%2bTool%2bBehaviour%2bTo%2bUnit%2bTest.aspx" border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=e73cf1a0-95a9-4947-ac47-057b30b7f95a" /&gt;</description>
      <category>Coding;Products;Products/Behaviour to Unit Test;TDD;Testing</category>
    </item>
    <item>
      <trackback:ping>http://www.pksoftware.net/blog/Trackback.aspx?guid=6e3c894e-5ba9-4971-9d1e-4f15846e87a9</trackback:ping>
      <pingback:server>http://www.pksoftware.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.pksoftware.net/blog/PermaLink,guid,6e3c894e-5ba9-4971-9d1e-4f15846e87a9.aspx</pingback:target>
      <dc:creator>Paul Kohler</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is just a quick heads up to say that I think the <a target="_blank" href="http://castleproject.org/">Castle
Project</a> rocks!
</p>
        <p>
I have been using it allot of late especially <a target="_blank" href="http://castleproject.org/activerecord/index.html">Active
Record</a>. I'll blog more detail later but it's what I have been looking for all
these years! Many time I have implemented simple subsets of the functionality that
Castle provides to help get the job done. Castle wraps up all those funky framework
fragments and more with a great "action pack" flavour to it in the form of <a target="_blank" href="http://castleproject.org/monorail/index.html">Mono
Rail</a> (i.e. 'ruby on rails' for .Net)
</p>
        <p>
Very cool  ;-)<br /></p>
        <img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=6e3c894e-5ba9-4971-9d1e-4f15846e87a9" />
      </body>
      <title>A quick plug for Castle</title>
      <guid isPermaLink="false">http://www.pksoftware.net/blog/PermaLink,guid,6e3c894e-5ba9-4971-9d1e-4f15846e87a9.aspx</guid>
      <link>http://www.pksoftware.net/blog/2007/07/19/A+Quick+Plug+For+Castle.aspx</link>
      <pubDate>Thu, 19 Jul 2007 11:21:35 GMT</pubDate>
      <description>&lt;p&gt;
This is just a quick heads up to say that I think the &lt;a target="_blank" href="http://castleproject.org/"&gt;Castle
Project&lt;/a&gt; rocks!
&lt;/p&gt;
&lt;p&gt;
I have been using it allot of late especially &lt;a target="_blank" href="http://castleproject.org/activerecord/index.html"&gt;Active
Record&lt;/a&gt;. I'll blog more detail later but it's what I have been looking for all
these years! Many time I have implemented simple subsets of the functionality that
Castle provides to help get the job done. Castle wraps up all those funky framework
fragments and more with a great "action pack" flavour to it in the form of &lt;a target="_blank" href="http://castleproject.org/monorail/index.html"&gt;Mono
Rail&lt;/a&gt; (i.e. 'ruby on rails' for .Net)
&lt;/p&gt;
&lt;p&gt;
Very cool&amp;nbsp; ;-)&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=6e3c894e-5ba9-4971-9d1e-4f15846e87a9" /&gt;</description>
      <category>Coding;TDD</category>
    </item>
    <item>
      <trackback:ping>http://www.pksoftware.net/blog/Trackback.aspx?guid=6af04fba-8fae-469a-b827-55b623fc0732</trackback:ping>
      <pingback:server>http://www.pksoftware.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.pksoftware.net/blog/PermaLink,guid,6af04fba-8fae-469a-b827-55b623fc0732.aspx</pingback:target>
      <dc:creator>Paul Kohler</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just a quick note that could drive you completely mad if you were not aware... 
</p>
        <p>
If you are using <b>NUnitForms </b>for testing your GUI and have code in the forms
"Shown" event, it will not run unless you follow the <b>Form.Show</b> call with <b>Application.DoEvents()</b>,
see sample code below
</p>
        <p>
This example is just a Label (label1) dumped on a Form with the <i>Load </i>and <i>Shown </i>events
updating the label with the respective event text:<br /></p>
        <p>
          <span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;">
            <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Collections.Generic;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.ComponentModel;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Data;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Drawing;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Text;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Windows.Forms;<br /><br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">namespace</span> NUnitFormsDemo1<br />
{<br />
    <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span> partial <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">class</span> ShownTestForm
: Form<br />
    {<br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span> ShownTestForm()<br />
        {<br />
            InitializeComponent();<br />
        }<br /><br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">private</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> ShownTestForm_Load(<span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">object</span> sender,
EventArgs e)<br />
        {<br />
            label1.Text <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Load"</span>;<br />
        }<br /><br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">private</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> ShownTestForm_Shown(<span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">object</span> sender,
EventArgs e)<br />
        {<br />
            label1.Text <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Shown"</span>;<br />
        }<br />
    }<br />
}<br /></span>
        </p>
Here is some sample NUnitForms test code, the first test asserts that after the <i>Form.Show</i> call
the label text is "Load" and the second test shows that the label text is "Shown".<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Windows.Forms;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> NUnit.Framework;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> NUnit.Extensions.Forms;<br /><br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">namespace</span> NUnitFormsDemo1.UnitTests<br />
{<br />
    [TestFixture]<br />
    <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">class</span> TestFormShownIssue
: NUnitFormTest<br />
    {<br />
        [Test]<br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> TestFormShow()<br />
        {<br />
            ShownTestForm
frm <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">new</span> ShownTestForm();<br />
            LabelTester
label1Tester <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">new</span> LabelTester(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"label1"</span>);<br />
            frm.Show();<br />
            Assert.AreEqual(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Load"</span>,
label1Tester.Text);<br />
        }<br /><br />
        [Test]<br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> TestFormShowWithDoEvents()<br />
        {<br />
            ShownTestForm
frm <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">new</span> ShownTestForm();<br />
            LabelTester
label1Tester <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">new</span> LabelTester(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"label1"</span>);<br />
            frm.Show();<br />
            Application.DoEvents(); <span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
allows the 'Shown' event to fire</span><br />
            Assert.AreEqual(<span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;">"Shown"</span>,
label1Tester.Text);<br />
        }<br />
    }<br />
}</span></p><p></p><p>
I will take an educated guess that this is due to the GUI message pump etc.
</p><p>
In general if I come across this any of this type of unexpected behavior with NUnitForms
I will try a DoEvents before tearing my hair out. 
</p><img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=6af04fba-8fae-469a-b827-55b623fc0732" /></body>
      <title>An NUnitForms Note for the Form Shown Event</title>
      <guid isPermaLink="false">http://www.pksoftware.net/blog/PermaLink,guid,6af04fba-8fae-469a-b827-55b623fc0732.aspx</guid>
      <link>http://www.pksoftware.net/blog/2007/06/13/An+NUnitForms+Note+For+The+Form+Shown+Event.aspx</link>
      <pubDate>Wed, 13 Jun 2007 09:30:07 GMT</pubDate>
      <description>&lt;p&gt;
Just a quick note that could drive you completely mad if you were not aware... 
&lt;/p&gt;
&lt;p&gt;
If you are using &lt;b&gt;NUnitForms &lt;/b&gt;for testing your GUI and have code in the forms
"Shown" event, it will not run unless you follow the &lt;b&gt;Form.Show&lt;/b&gt; call with &lt;b&gt;Application.DoEvents()&lt;/b&gt;,
see sample code below
&lt;/p&gt;
&lt;p&gt;
This example is just a Label (label1) dumped on a Form with the &lt;i&gt;Load &lt;/i&gt;and &lt;i&gt;Shown &lt;/i&gt;events
updating the label with the respective event text:&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System.ComponentModel;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System.Data;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System.Drawing;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System.Text;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System.Windows.Forms;&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;namespace&lt;/span&gt; NUnitFormsDemo1&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; partial &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;class&lt;/span&gt; ShownTestForm
: Form&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; ShownTestForm()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;InitializeComponent();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;private&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; ShownTestForm_Load(&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;object&lt;/span&gt; sender,
EventArgs e)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;label1.Text &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"Load"&lt;/span&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;private&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; ShownTestForm_Shown(&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;object&lt;/span&gt; sender,
EventArgs e)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;label1.Text &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"Shown"&lt;/span&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
}&lt;br&gt;
&lt;/span&gt;
&lt;/p&gt;
Here is some sample NUnitForms test code, the first test asserts that after the &lt;i&gt;Form.Show&lt;/i&gt; call
the label text is "Load" and the second test shows that the label text is "Shown".&lt;br&gt;
&lt;p&gt;
&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System.Windows.Forms;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; NUnit.Framework;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; NUnit.Extensions.Forms;&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;namespace&lt;/span&gt; NUnitFormsDemo1.UnitTests&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[TestFixture]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;class&lt;/span&gt; TestFormShownIssue
: NUnitFormTest&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Test]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; TestFormShow()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ShownTestForm
frm &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;new&lt;/span&gt; ShownTestForm();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LabelTester
label1Tester &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;new&lt;/span&gt; LabelTester(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"label1"&lt;/span&gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frm.Show();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Assert.AreEqual(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"Load"&lt;/span&gt;,
label1Tester.Text);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Test]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; TestFormShowWithDoEvents()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ShownTestForm
frm &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;new&lt;/span&gt; ShownTestForm();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LabelTester
label1Tester &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;new&lt;/span&gt; LabelTester(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"label1"&lt;/span&gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;frm.Show();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Application.DoEvents(); &lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;//
allows the 'Shown' event to fire&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Assert.AreEqual(&lt;span style="color: rgb(102, 102, 102); background-color: rgb(228, 228, 228); font-family: Courier New; font-size: 11px;"&gt;"Shown"&lt;/span&gt;,
label1Tester.Text);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
I will take an educated guess that this is due to the GUI message pump etc.
&lt;/p&gt;
&lt;p&gt;
In general if I come across this any of this type of unexpected behavior with NUnitForms
I will try a DoEvents before tearing my hair out. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=6af04fba-8fae-469a-b827-55b623fc0732" /&gt;</description>
      <category>Coding/Work Arrounds;NUnitForms;TDD;Testing</category>
    </item>
    <item>
      <trackback:ping>http://www.pksoftware.net/blog/Trackback.aspx?guid=5c82f81d-3ec9-4195-8477-55c78c067996</trackback:ping>
      <pingback:server>http://www.pksoftware.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.pksoftware.net/blog/PermaLink,guid,5c82f81d-3ec9-4195-8477-55c78c067996.aspx</pingback:target>
      <dc:creator>Paul Kohler</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have had some questions regarding the icons (or rather images) that I use in my
applications (such as the 'pending' <a target="miniSqlQuery" href="http://www.pksoftware.net/MiniSqlQuery/Default.aspx">Mini
SQL Query</a> tool)... 
</p>
        <p>
They are by <a target="famfamfam" href="http://famfamfam.com/about/">Mark James</a> -
he has a bunch of great free stuff available at:<br /><b><a target="famfamfam" href="http://famfamfam.com/">http://famfamfam.com/</a></b> -
more so the "Silk" set at <a target="famfamfam" href="http://famfamfam.com/lab/icons/silk/">http://famfamfam.com/lab/icons/silk/</a></p>
        <p>
The images are licensed under a <a target="license" href="http://creativecommons.org/licenses/by/2.5/">Creative
Commons Attribution 2.5 License</a>.<br /></p>
        <img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=5c82f81d-3ec9-4195-8477-55c78c067996" />
      </body>
      <title>Free Useful PNG Images for Windows and Web Applications - famfamfam.com</title>
      <guid isPermaLink="false">http://www.pksoftware.net/blog/PermaLink,guid,5c82f81d-3ec9-4195-8477-55c78c067996.aspx</guid>
      <link>http://www.pksoftware.net/blog/2007/06/07/Free+Useful+PNG+Images+For+Windows+And+Web+Applications+Famfamfamcom.aspx</link>
      <pubDate>Thu, 07 Jun 2007 10:05:56 GMT</pubDate>
      <description>&lt;p&gt;
I have had some questions regarding the icons (or rather images) that I use in my
applications (such as the 'pending' &lt;a target="miniSqlQuery" href="http://www.pksoftware.net/MiniSqlQuery/Default.aspx"&gt;Mini
SQL Query&lt;/a&gt; tool)... 
&lt;/p&gt;
&lt;p&gt;
They are by &lt;a target="famfamfam" href="http://famfamfam.com/about/"&gt;Mark James&lt;/a&gt; -
he has a bunch of great free stuff available at:&lt;br&gt;
&lt;b&gt;&lt;a target="famfamfam" href="http://famfamfam.com/"&gt;http://famfamfam.com/&lt;/a&gt;&lt;/b&gt; -
more so the "Silk" set at &lt;a target="famfamfam" href="http://famfamfam.com/lab/icons/silk/"&gt;http://famfamfam.com/lab/icons/silk/&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
The images are licensed under a &lt;a target="license" href="http://creativecommons.org/licenses/by/2.5/"&gt;Creative
Commons Attribution 2.5 License&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=5c82f81d-3ec9-4195-8477-55c78c067996" /&gt;</description>
      <category>Links;Products/Mini SQL Query</category>
    </item>
    <item>
      <trackback:ping>http://www.pksoftware.net/blog/Trackback.aspx?guid=1c20e079-491d-4995-baea-65bafd3dae98</trackback:ping>
      <pingback:server>http://www.pksoftware.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.pksoftware.net/blog/PermaLink,guid,1c20e079-491d-4995-baea-65bafd3dae98.aspx</pingback:target>
      <dc:creator>Paul Kohler</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">This is the line of code that I keep forgetting...<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;">AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);</span></p>
Use it in (for example) the Program.Main function when the application starts up and
the threads currrent principal is now the windows user. So... 
<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;">Thread.CurrentPrincipal.Identity.IsAuthenticated</span></p>
Will now be <b>true </b>and you can make use of the <b>Identity.Name</b> property
etc.<br /><br />
Self reminder over...<br /><br /><i>More Notes...</i><br /><br />
If for example you need to perform unit tests as a windows user (to access the username
or hit a resource) you can make use of the <b>AppDomain.CurrentDomain.SetPrincipalPolicy</b> method
in the test fixture setup/teardown methods - see example below. I put the UnauthenticatedPrincipal
setting in the teardown so that subsequent tests do not have their principal modified
by accident...<br /><p><span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Security.Principal;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> System.Threading;<br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">using</span> NUnit.Framework;<br /><br /><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">namespace</span> Tests.SetPrincipalPolicyExample<br />
{<br />
    [TestFixture]<br />
    <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">class</span> TestSomethingUsingCurrentWindowsPrincipal<br />
    {<br />
        <span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">///
&lt;summary&gt;Called once before all tests are run.&lt;/summary&gt;</span><br />
        [TestFixtureSetUp()]<br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> TestFixtureSetUp()<br />
        {<br />
            AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);<br />
        }<br /><br />
        <span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">///
&lt;summary&gt;Called once after all tests have run.&lt;/summary&gt;</span><br />
        [TestFixtureTearDown()]<br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> TestFixtureTearDown()<br />
        {<br />
            AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.UnauthenticatedPrincipal);<br />
        }<br /><br />
        [Test]<br />
        <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">public</span><span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">void</span> VerifySomething()<br />
        {<br />
            <span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;">string</span> expectedUsername <span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;">=</span> Thread.CurrentPrincipal.Identity.Name;<br />
            <span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;">//
more testing stuff</span><br />
        }<br />
    }<br />
}<br /></span></p><br /><img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=1c20e079-491d-4995-baea-65bafd3dae98" /></body>
      <title>Run a Windows Forms application as the Windows User - Integrated Security</title>
      <guid isPermaLink="false">http://www.pksoftware.net/blog/PermaLink,guid,1c20e079-491d-4995-baea-65bafd3dae98.aspx</guid>
      <link>http://www.pksoftware.net/blog/2007/05/17/Run+A+Windows+Forms+Application+As+The+Windows+User+Integrated+Security.aspx</link>
      <pubDate>Thu, 17 May 2007 13:32:42 GMT</pubDate>
      <description>This is the line of code that I keep forgetting...&lt;br&gt;
&lt;p&gt;
&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);&lt;/span&gt;
&lt;/p&gt;
Use it in (for example) the Program.Main function when the application starts up and
the threads currrent principal is now the windows user. So... 
&lt;br&gt;
&lt;p&gt;
&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;Thread.CurrentPrincipal.Identity.IsAuthenticated&lt;/span&gt;
&lt;/p&gt;
Will now be &lt;b&gt;true &lt;/b&gt;and you can make use of the &lt;b&gt;Identity.Name&lt;/b&gt; property
etc.&lt;br&gt;
&lt;br&gt;
Self reminder over...&lt;br&gt;
&lt;br&gt;
&lt;i&gt;More Notes...&lt;/i&gt;
&lt;br&gt;
&lt;br&gt;
If for example you need to perform unit tests as a windows user (to access the username
or hit a resource) you can make use of the &lt;b&gt;AppDomain.CurrentDomain.SetPrincipalPolicy&lt;/b&gt; method
in the test fixture setup/teardown methods - see example below. I put the UnauthenticatedPrincipal
setting in the teardown so that subsequent tests do not have their principal modified
by accident...&lt;br&gt;
&lt;p&gt;
&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System.Security.Principal;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; System.Threading;&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;using&lt;/span&gt; NUnit.Framework;&lt;br&gt;
&lt;br&gt;
&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;namespace&lt;/span&gt; Tests.SetPrincipalPolicyExample&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[TestFixture]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;class&lt;/span&gt; TestSomethingUsingCurrentWindowsPrincipal&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;///
&amp;lt;summary&amp;gt;Called once before all tests are run.&amp;lt;/summary&amp;gt;&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[TestFixtureSetUp()]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; TestFixtureSetUp()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;///
&amp;lt;summary&amp;gt;Called once after all tests have run.&amp;lt;/summary&amp;gt;&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[TestFixtureTearDown()]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; TestFixtureTearDown()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.UnauthenticatedPrincipal);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Test]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;public&lt;/span&gt; &lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;void&lt;/span&gt; VerifySomething()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Blue; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;string&lt;/span&gt; expectedUsername &lt;span style="color: Red; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;=&lt;/span&gt; Thread.CurrentPrincipal.Identity.Name;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: Green; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;//
more testing stuff&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
}&lt;br&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;br&gt;
&lt;img width="0" height="0" src="http://www.pksoftware.net/blog/aggbug.ashx?id=1c20e079-491d-4995-baea-65bafd3dae98" /&gt;</description>
      <category>Coding</category>
    </item>
    <item>
      <trackback:ping>http://www.pksoftware.net/blog/Trackback.aspx?guid=3d848b6c-f05d-400b-a580-9f5e274880bc</trackback:ping>
      <pingback:server>http://www.pksoftware.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.pksoftware.net/blog/PermaLink,guid,3d848b6c-f05d-400b-a580-9f5e274880bc.aspx</pingback:target>
      <dc:creator>Paul Kohler</dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>NOTE - Mini SQL Query has been released now - see </strong>
          <a href="http://www.pksoftware.net/blog/2008/02/01/Beta+Release+Of+Mini+SQL+Query.aspx">
            <strong>http://www.pksoftware.net/blog/2008/02/01/Beta+Release+Of+Mini+SQL+Query.aspx</strong>
          </a>
          <strong>.</strong>
        </p>
        <p>
 
</p>
        <p>
This is not a <i>product release</i>, but a <i>notice of release (!) </i>for my latest
pet project, "<b><a href="http://www.pksoftware.net/MiniSqlQuery/Default.aspx" target="miniSqlQuery">Mini
SQL Query</a></b>".<br /><br />
What is Mini SQL Query?...<br /></p>
        <blockquote>"Mini SQL Query from PK Software is a minimalist SQL query tool for multiple
providers (MSSQL, Oracle, OLEDB, MS Access files etc). The goal of the Mini SQL Query
tool is to allow a developer or trouble-shooter to quickly diagnose issues or make
changes to a database using a tool with a small footprint, that is fast, expandable
and easy to use."<br /></blockquote>
        <b>Some Features:</b>
        <br />
        <ul>
          <li>
Multiple database type connections (e.g. MSSQL, Oracle, Access etc) 
</li>
          <li>
Syntax Highlighting 
</li>
          <li>
Object Inspector (Browse the tables, columns etc for the connection) 
</li>
          <li>
Easy to utilize Plug-In system that has access to all the applications internals</li>
        </ul>
        <i>Sample Screenshot </i>- The Mini SQL Query tool in use against the Northwind Sample
DB:<br /><br /><img src="http://www.pksoftware.net/blog/content/binary/msq-shot1.png" border="0" /><br /><br />
I call it "mini" because I wanted to keep it simple and fast. I uses a straight forward
but powerful plugin architecture that makes adding menu or toolbar options as simple
as adding a reference in a DLL project and implementing a few functions from the <i>IPlugIn </i>interface.
I will be pushing out a few posts about the service and command style of coding soon
due to its implicit focus on issues such as dependency injection (DIP) and (dare I
say it) service-oriented architecture (and no I am not talking about web services!)
These techniques in turn improve code quality, testing and in turn maintenance (and
again in turn our sanity as programmers...)<br /><br />
I will publish a core product and then make other plugins available for download.<br /><br /><b>Plugin Example 1...</b><br /><br />
Here is a simple example - display connection...<br /><br /><img src="http://www.pksoftware.net/blog/content/binary/msq-shot-download-plugins.png" border="0" /><br /><br />
Below is the example C# plugin code that displays the <i>current connection string</i> in
the <i>editor </i>window.<br /><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> MiniSqlQuery.Plugin.Example<br />
{<br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">///
&lt;summary&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">///
This example command inserts the current connection string details into the editor
text.</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">///
&lt;/summary&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> DisplayConnectionCommand
: CommandBase<br />
    {<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> DisplayConnectionCommand(IServiceContainer
services)<br />
            : <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">base</span>(services, <span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"Display
Connection Example"</span>)<br />
        {<br />
        }<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">override</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Execute()<br />
        {<br />
            IEditor editorService <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>.ServiceManager.CurrentEditor;<br />
            editorService.Query <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span>.Format(<br />
                <span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"--
Connection: {0}\r\n\r\n{1}"</span>,<br />
                <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>.ServiceManager.DatabaseConfigurationManager.ConnectionString,<br />
                editorService.Query);<br />
        }<br />
    }<br />
}<br /></span></p>
Running the menu command:<br /><br /><img src="http://www.pksoftware.net/blog/content/binary/msq-shot-display-conn-plugin.png" border="0" /><br /><br />
Simple I know but I wanted to show the command execution approach using services.<b><br /><br />
Plugin Example 2...<br /></b><br />
OK - not that exciting! Here is another example where a business object is generated
from the result set...<br /><br /><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Class</span> MakeBusinessObjectFromResultsCommand<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"></span></span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">    </span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Inherits</span> CommandBase<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"></span></span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">    </span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Sub</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">New</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> services <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> IServiceContainer)<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"></span></span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">    </span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">    </span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">MyBase</span>.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">New</span>(services, <span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"Make
BO from Results"</span>)<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"></span></span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">    </span><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Sub</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Overrides</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Sub</span> Execute()<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Dim</span> editor <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> IEditor <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Me</span>.ServiceManager.CurrentEditor<br /><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">If</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Not</span> editor.Result <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Is</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Nothing</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">AndAlso</span> _<br />
         editor.Result.Tables.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Count</span> &gt;
0 <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Then</span><br />
            <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'
create some simple code gen using the results</span><br />
            editor.Messages <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> GenerateClass(editor.Result.Tables(0))<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Else</span><br />
            editor.Messages <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"No
results to generate code from."</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">If</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Sub</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'''
&lt;summary&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'''
Given a DataTable (&lt;paramref name="dt"/&gt;), a basic VB.NET class is generated.</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'''
&lt;/summary&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'''
&lt;param name="dt"&gt;A DataTabel to generate a class from.&lt;/param&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'''
&lt;returns&gt;&lt;/returns&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">'''
&lt;remarks&gt;&lt;/remarks&gt;</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Function</span> GenerateClass(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> dt <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> DataTable) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Dim</span> code <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">New</span> Text.StringBuilder()<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Dim</span> fieldName <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Dim</span><font color="#000000"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">typeName</span></font><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
        code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"Public
Class {0}{1}"</span>, dt.TableName, vbCrLf)<br />
        code.AppendLine()<br />
        code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
Public Sub New{0}"</span>, vbCrLf)<br />
        code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
End Sub{0}"</span>, vbCrLf)<br />
        code.AppendLine()<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">For</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Each</span> column <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> DataColumn <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">In</span> dt.Columns<br />
            fieldName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"_"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> column.ColumnName<br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">typeName</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> column.DataType.FullName<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
Private {0} As {1}{2}"</span>, fieldName, column.DataType.FullName, vbCrLf)<br />
            code.AppendLine()<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
Public Property {0}() As {1}{2}"</span>, column.ColumnName, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">typeName</span>,
vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
Get{0}"</span>, vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
Return {0}{1}"</span>, fieldName, vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
End Get{0}"</span>, vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
Set(ByVal value As {0}){1}"</span>, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">typeName</span>,
vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
{0} = value{1}"</span>, fieldName, vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
End Set{0}"</span>, vbCrLf)<br />
            code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"
End Property{0}"</span>, vbCrLf)<br />
            code.AppendLine()<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Next</span><br /><br />
        code.AppendFormat(<span style="FONT-SIZE: 11px; COLOR: rgb(102,102,102); FONT-FAMILY: Courier New; BACKGROUND-COLOR: rgb(228,228,228)">"End
Class"</span>)<br /><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> code.ToString()<br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Function</span><br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Class</span></span></p><br />
Running this command against the "select * from customers" query produces the following:<br /><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><p><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Class</span> Table<br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Sub</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">New</span>()<br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Sub</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _CustomerID <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> CustomerID() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _CustomerID<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _CustomerID <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _CompanyName <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> CompanyName() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _CompanyName<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _CompanyName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _ContactName <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> ContactName() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _ContactName<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _ContactName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _ContactTitle <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> ContactTitle() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _ContactTitle<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _ContactTitle <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _Address <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> Address() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _Address<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</span> value <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span>)<br />
            _Address <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> value<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Private</span> _City <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br /><br />
    <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Property</span> City() <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">As</span> System.<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">String</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Return</span> _City<br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">End</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Get</span><br />
        <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">Set</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ByVal</spa