<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Tim McCarthy's Blog</title><link>http://blogs.interknowlogy.com/timmccarthy/</link><description>Stuff I think about...</description><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.111</generator><item><dc:creator>Tim McCarthy</dc:creator><title>My 11/27/2007 San Diego .NET User Group Presentation</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/11/27/22760.aspx</link><pubDate>Tue, 27 Nov 2007 22:27:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/11/27/22760.aspx</guid><description>&lt;p&gt;Here are the &lt;a href="http://blogs.interknowlogy.com/downloads/timmccarthy/itarc2007/Building%20an%20Offline%20Smart%20Client%20using%20Domain-Driven%20Design%20Principles.zip" target="_blank"&gt;slides&lt;/a&gt; and here is the &lt;a href="http://www.codeplex.com/dddpds/SourceControl/ListDownloadableCommits.aspx" target="_blank"&gt;code&lt;/a&gt; from my presentation yesterday.&amp;nbsp; A big thank you&amp;nbsp;to everyone who attended, I thoroughly I enjoyed discussing DDD with you guys!&lt;/p&gt;
&lt;p&gt;By the way, here is the link to my book on the Wiley web site:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470147563.html"&gt;http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470147563.html&lt;/a&gt;&lt;/p&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/22760.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>My 11/6/2007 .NET Developers Group Presentation</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/11/07/22445.aspx</link><pubDate>Wed, 07 Nov 2007 12:50:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/11/07/22445.aspx</guid><description>&lt;p&gt;Here are the &lt;A href="http://blogs.interknowlogy.com/downloads/timmccarthy/itarc2007/Building%20an%20Offline%20Smart%20Client%20using%20Domain-Driven%20Design%20Principles.zip" target="_blank"&gt;slides&lt;/a&gt; and here is the &lt;a href="http://www.codeplex.com/dddpds/SourceControl/ListDownloadableCommits.aspx" target="_blank"&gt;code&lt;/a&gt; from my presentation yesterday.  Thanks to everyone who attended, I thoroughly I enjoyed discussing my upcoming book with you guys!&lt;/p&gt;
&lt;p&gt;By the way, here is the link to my book on the Wiley web site:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470147563.html"&gt;http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470147563.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/22445.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>Slides and Code from my ITARC 2007 Presentation</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/10/16/22277.aspx</link><pubDate>Tue, 16 Oct 2007 21:25:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/10/16/22277.aspx</guid><description>&lt;P&gt;Here are the &lt;A href="http://blogs.interknowlogy.com/downloads/timmccarthy/itarc2007/Building%20an%20Offline%20Smart%20Client%20using%20Domain-Driven%20Design%20Principles.zip" target=_blank&gt;slides&lt;/A&gt; and here is the &lt;A href="http://www.codeplex.com/dddpds/SourceControl/ListDownloadableCommits.aspx" target=_blank&gt;code&lt;/A&gt; from my presentation today.&amp;nbsp; Once again, a big thank you to all who attended, you were all very helpful to me!&lt;/P&gt;
&lt;P&gt;As&amp;nbsp;I said before my book should be out in April of 2008&amp;#8230;it sure is a lot of work doing a book all by myself&amp;nbsp; :)&lt;/P&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/22277.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>Issue #1:  What data type to use for my domain object keys</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/04/27/13046.aspx</link><pubDate>Fri, 27 Apr 2007 21:36:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/04/27/13046.aspx</guid><description>&lt;p&gt;In &lt;a href="http://blogs.interknowlogy.com/timmccarthy/archive/2007/03/06/12180.aspx" target="_blank"&gt;my book&lt;/a&gt;, one of the first issues that I am running into is trying to determine what data type to use for the domain object keys in my application.&amp;nbsp; I am using a SQL Server database, and I am not sure if I will be using guids or integer keys yet, so I think I will just use a data type of System.Object (a la &lt;a href="http://www.lhotka.net/Area.aspx?id=4#" target="_blank"&gt;Rocky&amp;rsquo;s CSLA&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Later on I might refactor this into a Key [Fowler PoEAA p 224] class if I need to.&lt;/p&gt;
&lt;p&gt;I am putting this Key property in my domain model&amp;rsquo;s &lt;a href="http://martinfowler.com/eaaCatalog/layerSupertype.html" target="_blank"&gt;Layer Supertype&lt;/a&gt; class.&lt;/p&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/13046.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>The source code for my book's case study application now has a home</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/04/26/13024.aspx</link><pubDate>Thu, 26 Apr 2007 17:34:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/04/26/13024.aspx</guid><description>&lt;p&gt;I now have a &lt;a href="http://www.codeplex.com/" target="_blank"&gt;CodePlex&lt;/a&gt; project set up for the case study code for the &lt;a href="http://blogs.interknowlogy.com/timmccarthy/archive/2007/03/06/12180.aspx"&gt;book&lt;/a&gt;.&amp;nbsp; I love CodePlex, it is the great TFS in the sky!&lt;/p&gt;
&lt;p&gt;Here is the link to my CodePlex project:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.codeplex.com/dddpds"&gt;http://www.codeplex.com/dddpds&lt;/a&gt;&lt;/p&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/13024.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>Code and Slides from my 4/19/2007 IASA SoCal presentation</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/04/20/12763.aspx</link><pubDate>Fri, 20 Apr 2007 00:15:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/04/20/12763.aspx</guid><description>&lt;p&gt;This was for my talk titled &amp;ldquo;Domain-Driven Design using the ADO.NET Entity Framework.&amp;rdquo;&amp;nbsp; First of all, a big thank you to Mike Vincent for allowing me to speak at this great group, and also a big thank you to &lt;a href="http://blog.pewitt.org/" target="_blank"&gt;Woody Pewitt&lt;/a&gt; for being a great host and friend.&lt;/p&gt;
&lt;p&gt;As promised, here are the &lt;a href="http://blogs.interknowlogy.com/downloads/timmccarthy/iasaapr2007/DDD_EF.zip" target="_blank"&gt;slides&lt;/a&gt; and &lt;a href="http://blogs.interknowlogy.com/downloads/timmccarthy/iasaapr2007/DDD_Samples.zip" target="_blank"&gt;code &lt;/a&gt;from the presentation.&amp;nbsp; I also need to send a thank you out to Mike Pizzo for answering all of my Entity Framework questions&amp;hellip;Thanks Mike!&lt;/p&gt;
&lt;p&gt;Like I promised in the presentation, for my DDD book I am going to use the Entity Framework from my repositories, even though there is a lot of pain right now without the designer not being available and the lack of persistence ignorance in the EF.&amp;nbsp; I really believe in this technology and the team developing it, and I know they will eventually succeed in getting a product out there that us DDD&amp;rsquo;ers will like and use.&lt;/p&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/12763.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>I am writing a book on Domain-Driven Design</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/03/06/12180.aspx</link><pubDate>Tue, 06 Mar 2007 23:07:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/03/06/12180.aspx</guid><description>&lt;p&gt;I have been talking to people about this for a while, so I figured I&amp;#8217;d blog about it too.  Actually, I promised my friends over at the &lt;a href="http://tech.groups.yahoo.com/group/domaindrivendesign/" target="_blank"&gt;Domain-Driven Design Yahoo group&lt;/a&gt; that I would!  The full title of the book is .NET Domain-Driven Design with C#: Problem-Design-Solution, and it will be published by Wiley Publishing, Inc.&lt;/p&gt;
&lt;p&gt;The idea behind the book is that it will be a case-study book&amp;#8230;a real-world application that uses Domain-Driven Design (DDD) concepts.  After reading other bloggers&amp;#8217; posts, and hearing people ask for real-world examples on the DDD Yahoo group, I have decided to write a book that addresses this exact topic.  The book is due to be completed at the end of the year, and will probably be out in early 2008.&lt;/p&gt;
&lt;p&gt;My plan is to put some of the issues I run into on this blog and/or the DDD Yahoo group and see what other people have to say about their solutions to similar problems.&lt;/p&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/12180.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>Code and slides from my Enterprise Library 3.0 Webcast today</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/03/02/12124.aspx</link><pubDate>Fri, 02 Mar 2007 14:29:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/03/02/12124.aspx</guid><description>&lt;p&gt;Thank you everyone for attending!&amp;nbsp; Sorry I forgot to do the ASP.NET validation demo, but it&amp;rsquo;s in the code in the List.aspx page of the sample application.&amp;nbsp; Oh yeah, and here is the link to &lt;a href="http://www.davidhayden.com/davidhayden/articles.aspx#EL3" target="_blank"&gt;David Hayden&amp;rsquo;s excellent tutorials on Enterprise Library 3.0&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As promised, here is the &lt;a href="http://blogs.interknowlogy.com/downloads/timmccarthy/entlib_webcast/3.0/Code.zip" target="_blank"&gt;code &lt;/a&gt;and here are my &lt;a href="http://blogs.interknowlogy.com/downloads/timmccarthy/entlib_webcast/3.0/Slides.zip" target="_blank"&gt;slides&lt;/a&gt;.&lt;/p&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/12124.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>My talk on Static Code Analysis for the Southern California .NET Developers Group</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/02/14/11550.aspx</link><pubDate>Wed, 14 Feb 2007 10:07:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/02/14/11550.aspx</guid><description>&lt;p&gt;First of all, I&amp;rsquo;d like to say thank you to the group for having me speak at the meeting last night.&amp;nbsp; The audience was very knowledgeable and asked great questions!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.interknowlogy.com/downloads/timmccarthy/StaticCodeAnalysisSlides.zip" target="_blank"&gt;Here&lt;/a&gt; are the slides for the presentation (sorry about the dark fonts).&amp;nbsp; To get the code, I suggest reading &lt;a href="http://blogs.interknowlogy.com/timmccarthy/archive/2007/02/13/11543.aspx" target="_blank"&gt;this post&lt;/a&gt;, which contains the code and explanation for the code.&lt;/p&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/11550.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Tim McCarthy</dc:creator><title>How to Create Custom Code Analysis Rules for VSTS 2005</title><link>http://blogs.interknowlogy.com/timmccarthy/archive/2007/02/13/11543.aspx</link><pubDate>Tue, 13 Feb 2007 13:38:00 GMT</pubDate><guid>http://blogs.interknowlogy.com/timmccarthy/archive/2007/02/13/11543.aspx</guid><description>&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;EM&gt;Building New Rules&lt;/EM&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;The first step is to make sure there is not an already existing rule that is doing what you are trying to do!&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Use the &lt;A href="http://blogs.interknowlogy.com/downloads/timmccarthy/IK.CodeAnalysis.Rules.zip" target=_blank&gt;IK.CodeAnalysis.Rules solution&lt;/A&gt; to add new classes to the IK.CodeAnalysis.Rules project inside of the solution.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Each new class will correspond to a new rule.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Add a new rule element to the Rules.xml file.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Follow the examples from the rules that are already there.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;IMG alt="" hspace=0 src="/downloads/timmccarthy/images/CodeAnalysis/figure_1.jpg" border=0&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = v /&gt;&lt;v:shapetype id=_x0000_t75 path="m@4@5l@4@11@9@11@9@5xe" stroked="f" filled="f" o:preferrelative="t" o:spt="75" coordsize="21600,21600"&gt;&lt;v:stroke joinstyle="miter"&gt;&lt;/v:stroke&gt;&lt;v:formulas&gt;&lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 1 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum 0 0 @1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @2 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 0 1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @6 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @8 21600 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @10 21600 0"&gt;&lt;/v:f&gt;&lt;/v:formulas&gt;&lt;v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"&gt;&lt;/v:path&gt;&lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;/o:lock&gt;&lt;/v:shapetype&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;FONT face="Times New Roman"&gt;Figure 1.1&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Rules.xml file&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;All new classes must inherit from the BaseRule class.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Make sure to add a private static class called &amp;#8220;Constants&amp;#8221; in the new Rule class.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This is where the name of your rule as well as its resolution name will go.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;See the example rule classes in the project for reference.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Make sure that the Resolution element&amp;#8217;s Name attribute is what you reference in the new Rule class as well as the Rule element&amp;#8217;s TypeName attribute.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;These values should correspond to what both of the values are in the RuleName and ResolutionName constants in the private static Constants class of the new Rule.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Feel free to put any other string literals into the Constants class.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;IMG alt="" hspace=0 src="/downloads/timmccarthy/images/CodeAnalysis/figure_2.jpg"  border=0&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;FONT face="Times New Roman"&gt;Figure 1.2&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The Constants class&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Next, figure out what scope the new rule applies to; it may apply at several levels, such as Field, Property, Parameter, Method, etc.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;For whatever levels your rule applies, override the appropriate Visit methods from the BaseIntrospectionRule class.&lt;/P&gt;
&lt;H3 style="MARGIN: 12pt 0in 3pt"&gt;The &amp;#8220;Visit&amp;#8221; Methods&lt;/H3&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;The BaseRule class extends the BaseIntrospectionRule class, which in turn extends the StandardVisitor class.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;There are over 140 Visit methods that the StandardVisitor class calls during a rule check operation.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;What this means is that any Visit methods that are implemented in the new Rule class will be called by the rule framework.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This is great because it allows rule developers to only focus on the parts of an assembly&amp;#8217;s IL that they care about, such as all methods, or all private fields, etc.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In order to trigger an error or warning to appear from a rule that has been broken, a call must be made to the BaseRule.AddProblem method.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;In Figure 1.3, a call to AddProblem is made when a private field has been flagged as having a prefix in front of it.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;IMG alt="" hspace=0 src="/downloads/timmccarthy/images/CodeAnalysis/figure_3.jpg"  border=0&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;FONT face="Times New Roman"&gt;Figure 1.3&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;An example of overriding the VisitField method&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;EM&gt;Debugging Rules&lt;/EM&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Follow the instructions outlined in #13 of the Resources section.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In the IK.CodeAnalysis.Rules solution, there is a file named CommandLine.txt which contains a sample command line for debugging the custom rules in the solution.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;There is also an FxCop project file in the solution, fxcoptest.fxcop, which is necessary for debugging.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In order to get debugging working, the rule developer will need to modify the paths referenced in both of these files to point to the correct locations on their machine.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Once everything has been modified correctly, copy and paste the text from the CommandLine.txt file into a command-prompt window, and then run it.&lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;EM&gt;Deploying Rules&lt;/EM&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;In order to deploy the IK rules, the IK.CodeAnalysis.Rules.dll assembly file must be copied to the C:\Program Files\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\Rules directory on each machine where the rules are to be run.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;That&amp;#8217;s it, Visual Studio will load up and process all of the assemblies in this directory.&lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;EM&gt;Suppressing Rules&lt;/EM&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;There are some cases where it will be necessary to allow a rule violation in your code.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;A typical example might be a rule violation that is more of a design suggestion, instead of an actual violation, such as having a &amp;#8220;GetXYZ&amp;#8221; method that returns a certain type.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This will result in a rule violation stating that the method be changed to a property, but you may have a very good reason to keep it as a method.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In those types of cases the rules can be suppressed, but should be suppressed in code using the System.Diagnostics.CodeAnalysis.SuppressMessageAttribute attribute.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Here is an example of what this looks like in code:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&lt;/FONT&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;IMG alt="" hspace=0 src="/downloads/timmccarthy/images/CodeAnalysis/figure_4.jpg" border=0&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;FONT face="Times New Roman"&gt;Figure 1.4 Suppressing a Rule&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;More information about this attribute can be found &lt;A href="http://msdn2.microsoft.com/en-us/library/ms182068(VS.80).aspx"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;EM&gt;Resources:&lt;/EM&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;The very first resource any new rule developer should look at is #6 (Writing Custom FxCop Rules by Guy Smith-Ferrier) in the list below.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;This is a pdf version of a PowerPoint presentation that explains the process of building rules very well.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;1.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/fxcop/archive/2006/11/16/faq-how-do-i-share-managed-code-analysis-rule-settings-over-multiple-projects-david-kean.aspx"&gt;&lt;FONT face="Times New Roman"&gt;http://blogs.msdn.com/fxcop/archive/2006/11/16/faq-how-do-i-share-managed-code-analysis-rule-settings-over-multiple-projects-david-kean.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;2.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/fxcop/"&gt;&lt;FONT face="Times New Roman"&gt;http://blogs.msdn.com/fxcop/&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;3.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;A href="http://www.gotdotnet.com/community/usersamples/default.aspx?ProductDropDownList=FxCop&amp;amp;SortDirection=Desc&amp;amp;SortColumnName=CreationDate"&gt;&lt;FONT face="Times New Roman"&gt;http://www.gotdotnet.com/community/usersamples/default.aspx?ProductDropDownList=FxCop&amp;amp;SortDirection=Desc&amp;amp;SortColumnName=CreationDate&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;4.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;A href="http://www.gotdotnet.com/team/fxcop/"&gt;&lt;FONT face="Times New Roman"&gt;http://www.gotdotnet.com/team/fxcop/&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;5.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/fxcop/archive/2007/01/22/faq-what-exception-should-i-throw-instead-of-the-reserved-exceptions-found-by-donotraisereservedexceptiontypes.aspx"&gt;&lt;FONT face="Times New Roman"&gt;http://blogs.msdn.com/fxcop/archive/2007/01/22/faq-what-exception-should-i-throw-instead-of-the-reserved-exceptions-found-by-donotraisereservedexceptiontypes.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;6.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;A href="http://www.guysmithferrier.com/downloads/FxCop.pdf"&gt;&lt;FONT face="Times New Roman"&gt;http://www.guysmithferrier.com/downloads/FxCop.pdf&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;7.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;A href="http://davidkean.net/archive/2004/08/09/145.aspx"&gt;&lt;FONT face="Times New Roman"&gt;http://davidkean.net/archive/2004/08/09/145.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;8.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/msdnmag/issues/04/06/Bugslayer/"&gt;&lt;FONT face="Times New Roman"&gt;http://msdn.microsoft.com/msdnmag/issues/04/06/Bugslayer/&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;9.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1090172&amp;amp;SiteID=1"&gt;&lt;FONT face="Times New Roman"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1090172&amp;amp;SiteID=1&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;10.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;A href="http://davidkean.net/articles/BaseRule.aspx"&gt;&lt;FONT face="Times New Roman"&gt;http://davidkean.net/articles/BaseRule.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;11.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;A href="http://www.codeproject.com/cs/algorithms/Not_Used_Analysis.asp?df=100&amp;amp;forumid=332089&amp;amp;exp=0&amp;amp;select=1783417"&gt;&lt;FONT face="Times New Roman"&gt;http://www.codeproject.com/cs/algorithms/Not_Used_Analysis.asp?df=100&amp;amp;forumid=332089&amp;amp;exp=0&amp;amp;select=1783417&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;12.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;A href="http://dotnetjunkies.com/WebLog/tim.weaver/archive/2005/01/12/43651.aspx"&gt;&lt;FONT face="Times New Roman"&gt;http://dotnetjunkies.com/WebLog/tim.weaver/archive/2005/01/12/43651.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman"&gt;13.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1090172&amp;amp;SiteID=1"&gt;&lt;FONT face="Times New Roman"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1090172&amp;amp;SiteID=1&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src ="http://blogs.interknowlogy.com/timmccarthy/aggbug/11543.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>