<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://community.devexpress.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Mark Miller</title><link>http://community.devexpress.com/blogs/markmiller/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 SP1 (Build: 30415.43)</generator><item><title>Interesting CodeRush Blog Series</title><link>http://community.devexpress.com/blogs/markmiller/archive/2010/07/14/coderush-blog-series.aspx</link><pubDate>Wed, 14 Jul 2010 21:13:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:314326</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=314326</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2010/07/14/coderush-blog-series.aspx#comments</comments><description>&lt;p&gt;CodeRush user Jason Follas has started an &lt;a href="http://jasonfollas.com/blog/category/16.aspx"&gt;interesting blog series&lt;/a&gt; on CodeRush; interesting because Jason talks about essential and important&amp;nbsp;CodeRush features from &lt;i&gt;his&lt;/i&gt; perspective. So far in the series Jason discusses:&lt;/p&gt;
&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://jasonfollas.com/blog/archive/2010/07/09/coderush-the-refactor-key.aspx"&gt;The Refactor Key&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jasonfollas.com/blog/archive/2010/07/13/coderush-coderush-tool-window.aspx"&gt;The CodeRush Training Window&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jasonfollas.com/blog/archive/2010/07/12/coderush-property-templates.aspx"&gt;Property Templates&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jasonfollas.com/blog/archive/2010/07/14/coderush-markers.aspx"&gt;Markers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;Great work, Jason! Looking forward to see what else you have in store for us.&lt;/p&gt;
&lt;h5 style="margin-top:0px;margin-right:0px;margin-bottom:4px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-size:1.5em;"&gt;&lt;/h5&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=314326" width="1" height="1"&gt;</description></item><item><title>Working with Color in CodeRush</title><link>http://community.devexpress.com/blogs/markmiller/archive/2010/04/26/working-with-color-in-coderush.aspx</link><pubDate>Mon, 26 Apr 2010 18:37:42 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:303102</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=303102</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2010/04/26/working-with-color-in-coderush.aspx#comments</comments><description>&lt;p&gt;Working with color in source code has never been as easy or intuitive as it should be. Looking at hex values or a color name like &lt;strong&gt;Bisque&lt;/strong&gt; and then trying to imagine what that color looks like is a challenge. Finding the correct color to use in a new style in a CSS file is also challenging.&lt;/p&gt;  &lt;p&gt;Furthermore, going from color to code is rarely a picnic.&lt;/p&gt;  &lt;p&gt;Fortunately, CodeRush 10.1 brings developers much closer to the real colors with new Color features. In this post I’ll discuss CodeRush features for working with color, both new and old.&lt;/p&gt;  &lt;h2&gt;Generating Color Declarations from HTML&lt;/h2&gt;  &lt;p&gt;This Intelligent Paste feature has been around for years. Simply copy an HTML color declaration (e.g., “#4B70BC”) and paste that inside a C# or VB file inside a method, property accessor, or inside a type (but not in a member) on an empty line, and you’ll get something like this (C# example shown):&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="ShowColorSmartPaste" border="0" alt="ShowColorSmartPaste" src="http://community.devexpress.com/blogs/markmiller/ShowColorSmartPaste_160F46FB.png" width="854" height="54" /&gt;&lt;/p&gt;  &lt;p&gt;This intelligent paste will create a local variable or a field, depending upon where you paste. As with all Intelligent Paste operations, you can press Undo to get the literal contents of the clipboard if you don’t like the CodeRush version. All Intelligent Paste operations are defined on the Intelligent Paste options page. Follow these steps to get there if you want to see them all:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;From the &lt;strong&gt;DevExpress&lt;/strong&gt; menu, select &amp;quot;&lt;strong&gt;Options...&lt;/strong&gt;&amp;quot;. &lt;/li&gt;    &lt;li&gt;In the tree view on the left, navigate to this folder: &lt;strong&gt;Editor\Clipboard&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;Select the &amp;quot;&lt;strong&gt;Intelligent Paste&lt;/strong&gt;&amp;quot; options page. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Note: This page level is &lt;strong&gt;Advanced&lt;/strong&gt;, and will only be visible if the Level combo on the lower-left of the Options dialog is set to Advanced or Expert.&lt;/p&gt;  &lt;h2&gt;Working with Color Declarations from Templates&lt;/h2&gt;  &lt;p&gt;When working with color from templates, the mnemonic to remember is “&lt;strong&gt;CL&lt;/strong&gt;”. &lt;/p&gt;  &lt;p&gt;Normally (without CodeRush), if I want to bring up a list of named colors using Intellisense, I have to type in “&lt;strong&gt;Color.&lt;/strong&gt;”. With CodeRush installed, I can now simply type “CL” (lower case is fine) followed by the space bar to expand the template, and this is important: the caret must be at a location where a Color expression is valid (so not on an empty line but instead as a parameter to a method or an assignment to a variable or a property. Also, the active project must have a reference to System.Drawing or System.Windows.Media (CodeRush will add the appropriate namespace reference to the source file if needed).&lt;/p&gt;  &lt;p&gt;If you need a color from the SystemColors class, expand the “&lt;strong&gt;SYC&lt;/strong&gt;” template (again, lowercase is fine, but for clarity I like to specify templates using uppercase letters).&lt;/p&gt;  &lt;p&gt;Back to that &lt;strong&gt;CL &lt;/strong&gt;mnemonic. You can combine this shortcut with other CodeRush code templates that work with types. For example, &lt;strong&gt;MCL&lt;/strong&gt; will generate a method that returns a Color, &lt;strong&gt;VCL&lt;/strong&gt; will create a variable declaration (local, parameter, or field) of type Color, and &lt;strong&gt;ACL&lt;/strong&gt; will generate an auto-implemented property of type Color. There are also &lt;strong&gt;PCL&lt;/strong&gt; (for properties of type Color with backing store) and &lt;strong&gt;NCL&lt;/strong&gt; for newly-initialized variables of type Color.&amp;#160; And there is “&lt;strong&gt;CL.E&lt;/strong&gt;” for &lt;strong&gt;Color.Empty&lt;/strong&gt;. &lt;/p&gt;  &lt;p&gt;Try these in a project that references &lt;strong&gt;System.Drawing&lt;/strong&gt; or &lt;strong&gt;System.Windows.Media&lt;/strong&gt;.&lt;/p&gt;  &lt;h2&gt;Color Swatches in the Code&lt;/h2&gt;  &lt;p&gt;Remember that color declaration we generated at the top of this post when I pasted a color reference into the code? You probably noticed that bluish rectangle under the word Color. Here’s that screen shot again:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="ShowColorSmartPaste" border="0" alt="ShowColorSmartPaste" src="http://community.devexpress.com/blogs/markmiller/ShowColorSmartPaste_160F46FB.png" width="854" height="54" /&gt;&lt;/p&gt;  &lt;p&gt;And here’s a variation with different values:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="ColorSwatch" border="0" alt="ColorSwatch" src="http://community.devexpress.com/blogs/markmiller/ColorSwatch_63AB737B.png" width="854" height="52" /&gt; &lt;/p&gt;  &lt;p&gt;Those rectangles appearing below the Color type reference are &lt;strong&gt;color swatches&lt;/strong&gt;. These are very cool. Now you no longer have to reverse engineer RGB color values in your head to figure out exactly what color you’re looking at in the code. &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="NamedColorSwatches" border="0" alt="NamedColorSwatches" src="http://community.devexpress.com/blogs/markmiller/NamedColorSwatches_479AB490.png" width="167" height="289" /&gt; &lt;/p&gt;  &lt;h2&gt;The CodeRush Color Dialog&lt;/h2&gt;  &lt;p&gt;So what happens when you want to edit a color in the code? Good news: just click the color swatch with the mouse and up pops the &lt;strong&gt;CodeRush Color &lt;/strong&gt;dialog, which looks like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="ColorPickerAppears" border="0" alt="ColorPickerAppears" src="http://community.devexpress.com/blogs/markmiller/ColorPickerAppears_3551EDCE.png" width="765" height="473" /&gt; &lt;/p&gt;  &lt;p&gt;The CodeRush Color dialog consists of several pages, which we’ll examine in a moment. At the bottom of the CodeRush Color dialog is a sample color swatch which reveals the selected color, and to the right of the sample is a &lt;strong&gt;Favorites &lt;/strong&gt;button. &lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="FavoritesButton" border="0" alt="FavoritesButton" src="http://community.devexpress.com/blogs/markmiller/FavoritesButton_263B0EF4.png" width="28" height="23" /&gt; &lt;/p&gt;  &lt;p&gt;We’ll talk more about the cool things you can do with favorite colors in a moment. But first, let’s take a look at the pages.&lt;/p&gt;  &lt;h3&gt;The Color Picker&lt;/h3&gt;  &lt;p&gt;The “Picker” page, the one you see in the screen shot above, is perhaps the most weighty. If you need to pick a color based on hue, saturation, brightness, red, green, or blue, you can do it here. You can also set opacity, enter an HTML color (including shorthand for web-safe colors such as “369”), and change a selected color to it’s nearest web-safe neighbor. And you can select a color from an existing image or window appearing on your desktop by clicking the eye-dropper tool. &lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="EyeDropper" border="0" alt="EyeDropper" src="http://community.devexpress.com/blogs/markmiller/EyeDropper_7D707CF1.png" width="35" height="31" /&gt; &lt;/p&gt;  &lt;p&gt;When working with color, you can use one of two mechanisms: red, green, &amp;amp; blue or hue, saturation &amp;amp; brightness (&lt;strong&gt;RGB&lt;/strong&gt; and &lt;strong&gt;HSB&lt;/strong&gt;). You may prefer to work with HSB on the &lt;strong&gt;Picker&lt;/strong&gt; page since these attributes make it easy to change the brightness or the saturation without modifying the hue, which can produce nice color variations like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="Variations" border="0" alt="Variations" src="http://community.devexpress.com/blogs/markmiller/Variations_2CEE1877.png" width="526" height="225" /&gt;&lt;/p&gt;  &lt;p&gt;or this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="Variations2" border="0" alt="Variations2" src="http://community.devexpress.com/blogs/markmiller/Variations2_6CB7FEFC.png" width="526" height="225" /&gt; &lt;/p&gt;  &lt;p&gt;Keeping most of the UI colors in the same hue is useful for reducing visual noise in a user interface.&lt;/p&gt;  &lt;p&gt;Regardless of which of the two mechanisms you choose to work in, specifying a color on this page is always a convergence of three values. I like to visualize this as a cube which holds all colors. If I’m working in RGB, the dimensions of that cube are 256x256x256. &lt;/p&gt;  &lt;p&gt;Here’s an example of a three-dimensional arrangement of colors organized by saturation (width), brightness (height), and hue (depth): &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="ColorCube" border="0" alt="ColorCube" src="http://community.devexpress.com/blogs/markmiller/ColorCube_1386153D.png" width="391" height="388" /&gt; &lt;/p&gt;  &lt;p&gt;So to specify a color in this three-dimensional space the Picker page gives you a two-dimensional grid, like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="TwoDimensionalGrid" border="0" alt="TwoDimensionalGrid" src="http://community.devexpress.com/blogs/markmiller/TwoDimensionalGrid_4AEC266B.png" width="284" height="281" /&gt; &lt;/p&gt;  &lt;p&gt;and a one-dimensional vertical gradient, like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="OneDimensionalGrid" border="0" alt="OneDimensionalGrid" src="http://community.devexpress.com/blogs/markmiller/OneDimensionalGrid_42F48409.png" width="71" height="264" /&gt; &lt;/p&gt;  &lt;p&gt;These two controls work together to let you specify any color in this three-dimensional space. The vertical gradient allows you to select any plane in this space, and two-dimensional grid lets you select a color on that plane.&lt;/p&gt;  &lt;p&gt;The vertical gradient is useful when you want to isolate one of the three attributes of the cube you’re working with onto a single dimension, allowing adjustments to only one value while keeping the other two attributes static. &lt;/p&gt;  &lt;p&gt;To isolate an attribute just click its corresponding radio button on this page.&lt;/p&gt;  &lt;p&gt;For example, to isolate the &lt;strong&gt;Saturation&lt;/strong&gt; attribute, click the “&lt;strong&gt;Sat:&lt;/strong&gt;” radio button.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="BySaturation" border="0" alt="BySaturation" src="http://community.devexpress.com/blogs/markmiller/BySaturation_17AFED02.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;Notice the labels on the two-dimensional grid have changed to show &lt;strong&gt;Brightness&lt;/strong&gt; on the vertical axis and &lt;strong&gt;Hue&lt;/strong&gt; on the horizontal axis.&lt;/p&gt;  &lt;p&gt;Isolating the &lt;strong&gt;Brightness&lt;/strong&gt; attribute looks like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ByBrightness" border="0" alt="ByBrightness" src="http://community.devexpress.com/blogs/markmiller/ByBrightness_41AFEB2A.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;Things get interesting when you isolate one of the RGB channels. For example, here’s &lt;strong&gt;Red&lt;/strong&gt;:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ByRed" border="0" alt="ByRed" src="http://community.devexpress.com/blogs/markmiller/ByRed_20BC7883.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;Here you can see where the color will go as you increase or decrease the RGB values. &lt;/p&gt;  &lt;p&gt;Here’s what it looks like when you isolate the &lt;strong&gt;Green&lt;/strong&gt; channel:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ByGreen" border="0" alt="ByGreen" src="http://community.devexpress.com/blogs/markmiller/ByGreen_1F77DFA4.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;And for completeness, here’s what it looks like when you isolate the &lt;strong&gt;Blue&lt;/strong&gt; channel:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ByBlue" border="0" alt="ByBlue" src="http://community.devexpress.com/blogs/markmiller/ByBlue_1A28F8F3.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;If you need a color from the desktop, click the &lt;strong&gt;Eyedropper&lt;/strong&gt; button &lt;img style="border-bottom:0px;border-left:0px;margin:0px;display:inline;border-top:0px;border-right:0px;" title="EyeDropper" border="0" alt="EyeDropper" src="http://community.devexpress.com/blogs/markmiller/EyeDropper_1C46F0D0.png" width="35" height="31" /&gt; and then click on the color you want. A sample of the color under the eyedropper will appear below the button, and to the right you’ll see a magnified portion of the screen with a rectangle in the center representing the eyedropper position.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="PickColor" border="0" alt="PickColor" src="http://community.devexpress.com/blogs/markmiller/PickColor_71AA16DE.png" width="569" height="428" /&gt;&lt;/p&gt;  &lt;p&gt;If we’re working with a color that isn’t web safe, the “&lt;strong&gt;Make Web Safe&lt;/strong&gt;” button will be enabled. Clicking it will to take the selected color to its nearest web-safe neighbor, like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="WebSafeNow" border="0" alt="WebSafeNow" src="http://community.devexpress.com/blogs/markmiller/WebSafeNow_42782B47.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;Right above the &lt;strong&gt;Make Web Safe&lt;/strong&gt; button is the hex edit control, useful for copying or pasting hex triplet representations of color (for example, “B6005A”). You can also use a three-digit shorthand when representing web safe colors, for example enter “&lt;strong&gt;369&lt;/strong&gt;” in the hex edit control and you’ll get this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="WebSafeShorthand" border="0" alt="WebSafeShorthand" src="http://community.devexpress.com/blogs/markmiller/WebSafeShorthand_2837C223.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;Which is shorthand for #&lt;strong&gt;336699&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Web Colors&lt;/h3&gt;  &lt;p&gt;Speaking of web-safe colors, let’s switch to the &lt;strong&gt;Web &lt;/strong&gt;page, where you can select from all 216 web-safe colors:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="WebSafeColors" border="0" alt="WebSafeColors" src="http://community.devexpress.com/blogs/markmiller/WebSafeColors_5956FCC3.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;h3&gt;Named Colors&lt;/h3&gt;  &lt;p&gt;Here’s the &lt;strong&gt;Named&lt;/strong&gt; page for .NET colors based on the &lt;a href="http://en.wikipedia.org/wiki/Web_colors" target="_blank"&gt;X11 color names&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="NamedColors" border="0" alt="NamedColors" src="http://community.devexpress.com/blogs/markmiller/NamedColors_3FEEF989.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;h3&gt;System Colors&lt;/h3&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="SystemColors" border="0" alt="SystemColors" src="http://community.devexpress.com/blogs/markmiller/SystemColors_7899A396.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Document Colors&lt;/h3&gt;  &lt;p&gt;The &lt;strong&gt;Document &lt;/strong&gt;page shows all the colors defined in the active document (before taking this screen shot I opened a C# class which defined many colors):&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="DocumentColors" border="0" alt="DocumentColors" src="http://community.devexpress.com/blogs/markmiller/DocumentColors_5F31A05C.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Favorite Colors&lt;/h3&gt;  &lt;p&gt;And finally, we have the &lt;strong&gt;Favorites&lt;/strong&gt; page, which might initially look like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="Favorites" border="0" alt="Favorites" src="http://community.devexpress.com/blogs/markmiller/Favorites_57A630EF.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The favorites page holds favorite colors in groups called &lt;strong&gt;palettes&lt;/strong&gt;. &lt;/p&gt;  &lt;p&gt;There are three interesting buttons on the top row of this page:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="0"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;margin-left:0px;border-top:0px;margin-right:0px;border-right:0px;" title="DeleteSelectedColor" border="0" alt="DeleteSelectedColor" align="right" src="http://community.devexpress.com/blogs/markmiller/DeleteSelectedColor_371EF13D.png" width="27" height="23" /&gt; &lt;/td&gt;        &lt;td&gt; Delete Selected Color&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;margin-left:0px;border-top:0px;margin-right:0px;border-right:0px;" title="DeleteActivePalette" border="0" alt="DeleteActivePalette" align="right" src="http://community.devexpress.com/blogs/markmiller/DeleteActivePalette_0BDA5A36.png" width="27" height="23" /&gt; &lt;/td&gt;        &lt;td&gt; Delete Active Palette&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;margin-left:0px;border-top:0px;margin-right:0px;border-right:0px;" title="CreateNewPalette" border="0" alt="CreateNewPalette" align="right" src="http://community.devexpress.com/blogs/markmiller/CreateNewPalette_2A1936CB.png" width="27" height="23" /&gt; &lt;/td&gt;        &lt;td&gt; Create New Palette&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;You can &lt;strong&gt;rename &lt;/strong&gt;the active palette simply by typing in a new name in the combo box at the top of the dialog (press &lt;strong&gt;Enter &lt;/strong&gt;to commit the change or &lt;strong&gt;Escape &lt;/strong&gt;to cancel). For example, let’s rename this palette to “My Faves”, like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="MyFaves" border="0" alt="MyFaves" src="http://community.devexpress.com/blogs/markmiller/MyFaves_75A43EE3.png" width="611" height="190" /&gt; &lt;/p&gt;  &lt;p&gt;Press &lt;strong&gt;Enter&lt;/strong&gt; to commit the change, or you can commit the rename by simply moving focus away to another control.&lt;/p&gt;  &lt;p&gt;At the bottom of the CodeRush Color dialog, to the right of the color sample, sits the &lt;strong&gt;Favorites&lt;/strong&gt; button. &lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="FavoritesButton" border="0" alt="FavoritesButton" src="http://community.devexpress.com/blogs/markmiller/FavoritesButton_263B0EF4.png" width="28" height="23" /&gt; &lt;/p&gt;  &lt;p&gt;If you click the button, the sample color will be added to the active palette page.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="AddFavorite" border="0" alt="AddFavorite" src="http://community.devexpress.com/blogs/markmiller/AddFavorite_3501F274.png" width="568" height="428" /&gt;&lt;/p&gt;  &lt;p&gt;Let’s add another color to this page. Click on the Named color tab, select DarkOrange:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="DarkOrange" border="0" alt="DarkOrange" src="http://community.devexpress.com/blogs/markmiller/DarkOrange_6FE9253D.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;Then click the &lt;strong&gt;Favorite &lt;/strong&gt;button, and watch what happens under the mouse:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ReturnButtonBig" border="0" alt="ReturnButtonBig" src="http://community.devexpress.com/blogs/markmiller/ReturnButtonBig_404B06B1.png" width="568" height="436" /&gt;&lt;/p&gt;  &lt;p&gt;The Favorites button changes to a &lt;strong&gt;Return&lt;/strong&gt; button, so a single click on this can get you right back to the page you started from. This makes it easy to add several favorite colors from anywhere in the CodeRush Color window.&lt;/p&gt;  &lt;p&gt;There’s one more cool thing you can do with favorite colors. To demonstrate, let’s create a new palette page. Click the &lt;strong&gt;Create New Palette&lt;/strong&gt; button. &lt;img style="border-bottom:0px;border-left:0px;display:inline;margin-left:0px;border-top:0px;margin-right:0px;border-right:0px;" title="CreateNewPalette" border="0" alt="CreateNewPalette" src="http://community.devexpress.com/blogs/markmiller/CreateNewPalette_22F9FA53.png" width="27" height="23" /&gt; &lt;/p&gt;  &lt;p&gt;Now let’s go to the &lt;strong&gt;Picker&lt;/strong&gt; page and find a favorite color, like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="DevExpressBlue" border="0" alt="DevExpressBlue" src="http://community.devexpress.com/blogs/markmiller/DevExpressBlue_44E1116B.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;For this demo I’m grabbing the &lt;strong&gt;DevExpress blue&lt;/strong&gt; from the web site using the &lt;strong&gt;Eyedropper&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Now, &lt;strong&gt;right-click&lt;/strong&gt; the Favorite button and select Add Color Distribution, then click the number of colors of varying lightness you want to add in the same hue as this color. I’ll select 21.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="AddColorDistribution" border="0" alt="AddColorDistribution" src="http://community.devexpress.com/blogs/markmiller/AddColorDistribution_35CA3291.png" width="656" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;Which generates 21 colors based on the selected color, like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="DevExpressColorDistribution" border="0" alt="DevExpressColorDistribution" src="http://community.devexpress.com/blogs/markmiller/DevExpressColorDistribution_3BA4D62A.png" width="568" height="428" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Generating the Color Reference&lt;/h3&gt;  &lt;p&gt;Once you have the color you want, just click the &lt;strong&gt;OK&lt;/strong&gt; button and the active color reference will be replaced with a reference to the color selected. Here’s the DevExpress blue placed in a C# file after clicking OK:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="DevExpressColorInCode" border="0" alt="DevExpressColorInCode" src="http://community.devexpress.com/blogs/markmiller/DevExpressColorInCode_6DED6B22.png" width="860" height="52" /&gt; &lt;/p&gt;  &lt;p&gt;Oh, and if you’re still wondering what &lt;strong&gt;Bisque&lt;/strong&gt; looks like, here it is:&lt;/p&gt;  &lt;p&gt;&amp;#160; &lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ColorBisque" border="0" alt="ColorBisque" src="http://community.devexpress.com/blogs/markmiller/ColorBisque_14BB8163.png" width="490" height="45" /&gt; &lt;/p&gt;  &lt;p&gt;We hope you enjoy the CodeRush features that make working with color easier. As always, let us know what we can do to improve your development experience.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=303102" width="1" height="1"&gt;</description></item><item><title>CodeRush Xpress &amp; CodeRush Ready for Visual Studio 2010</title><link>http://community.devexpress.com/blogs/markmiller/archive/2010/04/13/coderush-xpress-amp-coderush-ready-for-visual-studio-2010.aspx</link><pubDate>Tue, 13 Apr 2010 18:29:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:301495</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>15</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=301495</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2010/04/13/coderush-xpress-amp-coderush-ready-for-visual-studio-2010.aspx#comments</comments><description>&lt;p&gt;Both CodeRush Xpress and CodeRush have been released this week.&amp;nbsp;CodeRush Xpress went final and became available only a few seconds after Visual Studio 2010 became officially released.&lt;/p&gt;
&lt;p&gt;The full version of CodeRush 10.1 is available on the Betas tab of your client center download page. &lt;/p&gt;
&lt;p&gt;While CodeRush Xpress is final, the full version of CodeRush 10.1 is expected to be final by the end of April when the rest of DXperience 10.1 ships.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=301495" width="1" height="1"&gt;</description><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/v2010.1/default.aspx">v2010.1</category></item><item><title>Spend a Day with Miller in Vegas! (Free CodeRush Training)</title><link>http://community.devexpress.com/blogs/markmiller/archive/2010/03/10/spend-a-day-with-miller-in-vegas-free-coderush-training.aspx</link><pubDate>Wed, 10 Mar 2010 22:43:11 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:297340</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>16</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=297340</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2010/03/10/spend-a-day-with-miller-in-vegas-free-coderush-training.aspx#comments</comments><description>&lt;p&gt;Hey kids,&lt;/p&gt;  &lt;p&gt;Ever wish you could spend the day with your good old buddy Mark Miller in a Las Vegas training room? &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="MillerHangingOut" border="0" alt="MillerHangingOut" src="http://community.devexpress.com/blogs/markmiller/MillerHangingOut_585B7748.jpg" width="600" height="324" /&gt; &lt;/p&gt;  &lt;p&gt;Just sitting back, shooting the breeze and talking about whatever CodeRush thing is on your mind? Well the good folks at DevExpress are working hard to make your dream come true. :-)&lt;/p&gt;  &lt;p&gt;That’s right, kids. DevExpress is putting together a full day’s worth of formal CodeRush training, tentatively scheduled for Thursday the 15th of April, the day after the DevConnections conference and the official launch of Visual Studio 2010 in Las Vegas. And like the title of this blog post reads, this training session will be &lt;strong&gt;100% free&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Not only will it be free, but DevExpress will also be giving away prizes, we’ll hear from a special guest speaker from the Visual Studio team at Microsoft, and there’ll be some yummy food to eat. All courtesy of DevExpress. It’s crazy I tell you. Absolutely crazy. :-)&lt;/p&gt;  &lt;p&gt;As for content, we’ll start off the morning talking about CodeRush Xpress, then we’ll move into the more powerful features of the full version of CodeRush, wrapping up with extensibility, showing how to radically customize your IDE. The course content will look something like this:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;CodeRush Xpress      &lt;ul&gt;       &lt;li&gt;Navigation &lt;/li&gt;        &lt;li&gt;Selection &lt;/li&gt;        &lt;li&gt;Clipboard Features&lt;/li&gt;        &lt;li&gt;Declaration from Usage &lt;/li&gt;        &lt;li&gt;Refactoring&lt;/li&gt;        &lt;li&gt;Performance/Memory Comparison &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;CodeRush &lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Selection Embedding &lt;/li&gt;      &lt;li&gt;Other Productivity Features        &lt;ul&gt;         &lt;li&gt;Intellassist &lt;/li&gt;          &lt;li&gt;Auto Declare &lt;/li&gt;          &lt;li&gt;Smart Semi-Colon &lt;/li&gt;          &lt;li&gt;Smart Parens &lt;/li&gt;       &lt;/ul&gt;     &lt;/li&gt;      &lt;li&gt;Templates &lt;/li&gt;      &lt;li&gt;Code Issues &lt;/li&gt;      &lt;li&gt;Test Runner&lt;/li&gt;      &lt;li&gt;More Code Providers &lt;/li&gt;      &lt;li&gt;More Clipboard Features &lt;/li&gt;      &lt;li&gt;More Refactorings &lt;/li&gt;      &lt;li&gt;Other Language Features &lt;/li&gt;      &lt;ul&gt;       &lt;li&gt;ASP.NET&lt;/li&gt;        &lt;li&gt;XAML&lt;/li&gt;        &lt;li&gt;JavaScript&lt;/li&gt;        &lt;li&gt;etc.&lt;/li&gt;     &lt;/ul&gt;      &lt;li&gt;Extensibility       &lt;ul&gt;         &lt;li&gt;Third Party Plug-ins &lt;/li&gt;          &lt;li&gt;Introduction – Creating a Simple Plug-in &lt;/li&gt;          &lt;li&gt;Creating Refactorings &lt;/li&gt;          &lt;li&gt;Creating Code Providers &lt;/li&gt;          &lt;li&gt;Creating Code Issues &lt;/li&gt;       &lt;/ul&gt;     &lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;So what’s the catch, you ask? It’s simple. We need to get a sense of how many people will show up, and we need to know very soon so we can book a room big enough to hold everyone. If this event sounds like your kind of fun and you can make it to Vegas in April, post a comment below to let us know of your intentions to be there. I expect that soon we’ll create a registration page so you can lock in your spot, and when that’s page is available we’ll let you know through blogs, tweeting, shouting and otherwise general mayhem.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=297340" width="1" height="1"&gt;</description></item><item><title>Slicing and Dicing Strings with CodeRush for Visual Studio</title><link>http://community.devexpress.com/blogs/markmiller/archive/2010/03/09/slicing-and-dicing-strings-with-coderush-for-visual-studio.aspx</link><pubDate>Tue, 09 Mar 2010 21:51:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:297211</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>13</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=297211</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2010/03/09/slicing-and-dicing-strings-with-coderush-for-visual-studio.aspx#comments</comments><description>&lt;p&gt;CodeRush brings powerful string manipulation features to Visual Studio. Here are a few of my favorites:&lt;/p&gt;  &lt;h3&gt;Splitting Strings&lt;/h3&gt;  &lt;p&gt;When you need to break a string literal into two or three pieces. For example, let’s start with the following text:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt; &lt;font color="#0000ff"&gt;string&lt;/font&gt; GetGreetingText(&lt;font color="#0000ff"&gt;int&lt;/font&gt; daysLeft)      &lt;br /&gt;{      &lt;br /&gt;&amp;#160; &lt;font color="#0000ff"&gt;return&lt;/font&gt; &lt;font color="#a31515"&gt;&amp;quot;Welcome back, customer. \nSo glad to see you. Days remaining on our special offer: &amp;quot;&lt;/font&gt; + daysLeft.ToString();      &lt;br /&gt;}&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I can place the caret (the flashing I-beam that marks the editor’s insertion point) right before “Days remaining” text and press the CodeRush/Refactor! key (Ctrl+` by default) and then choose Split String.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="SplitStringInto2" border="0" alt="SplitStringInto2" src="http://community.devexpress.com/blogs/markmiller/SplitStringInto2_6FA3EEE8.jpg" width="1081" height="302" /&gt; &lt;/p&gt;  &lt;p&gt;This will split the string into two pieces.&lt;/p&gt;  &lt;p&gt;Next, let’s select the last two expressions on this line:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="SelectLastExpression" border="0" alt="SelectLastExpression" src="http://community.devexpress.com/blogs/markmiller/SelectLastExpression_55CFB8B9.jpg" width="1122" height="203" /&gt; &lt;/p&gt;  &lt;p&gt;Press the CodeRush/Refactor! key, and choose Extract Method to create a new method called GetDaysRemaining, like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="GetDaysRemaining" border="0" alt="GetDaysRemaining" src="http://community.devexpress.com/blogs/markmiller/GetDaysRemaining_6335CBBF.jpg" width="806" height="240" /&gt; &lt;/p&gt;  &lt;h3&gt;Use String.Format&lt;/h3&gt;  &lt;p&gt;Next, move the caret down inside the string inside the GetDaysRemaining method. Press the CodeRush/Refactor! key and select &lt;strong&gt;Use String.Format&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="UseStringFormat" border="0" alt="UseStringFormat" src="http://community.devexpress.com/blogs/markmiller/UseStringFormat_2DBD099A.jpg" width="802" height="257" /&gt; &lt;/p&gt;  &lt;p&gt;This neatly combines the concatenation into a single string that is easy to read and so much easier to translate (translating string fragments is much harder to do when grammatical rearrangements are needed as part of the localization).&lt;/p&gt;  &lt;p&gt;Speaking of translation…&lt;/p&gt;  &lt;h3&gt;Extract String to Resource&lt;/h3&gt;  &lt;p&gt;Move the caret inside the “Days remaining…” string. Press the CodeRush/Refactor! key and select &lt;strong&gt;Extract String to Resource&lt;/strong&gt;, then select “&lt;strong&gt;Create new resource file&lt;/strong&gt;”.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ExtractStringToResource" border="0" alt="ExtractStringToResource" src="http://community.devexpress.com/blogs/markmiller/ExtractStringToResource_1B080FE3.jpg" width="899" height="280" /&gt; &lt;/p&gt;  &lt;p&gt;CodeRush will create a new resource file to hold this string, and highlight the resource identifier for an easy rename (tip: I like to use Camel Case Nav and Camel Case Select – Alt plus Left or Right arrow keys with Shift to select -- to quickly trim a long identifier down to a reasonable size). Let’s call this resource “DaysRemaining”.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="DaysRemainingResource" border="0" alt="DaysRemainingResource" src="http://community.devexpress.com/blogs/markmiller/DaysRemainingResource_736193B8.jpg" width="812" height="244" /&gt; &lt;/p&gt;  &lt;p&gt;Placing strings in resource files is a good first step to preparing your code for translation.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Splitting Strings, Revisited&lt;/h3&gt;  &lt;p&gt;The CodeRush Split String refactoring has a bonus feature built in: the ability to split a string into three pieces. Just select the portion of the string that you want to pull out and apply the refactoring. For example, in the code above, there is a “\n” appearing inside the string. This “\n” may be confusing to translators, it makes the string harder to read, and it may not be the most appropriate way to terminate lines on some platforms, so let’s take it out and replace it with the Environment.NewLine expression.&lt;/p&gt;  &lt;p&gt;First, select the “\n”:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="SelectSlashN" border="0" alt="SelectSlashN" src="http://community.devexpress.com/blogs/markmiller/SelectSlashN_67CBD679.jpg" width="809" height="80" /&gt; &lt;/p&gt;  &lt;p&gt;Press the CodeRush/Refactor! key and select &lt;strong&gt;Split String&lt;/strong&gt;…&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ApplySplitStringIntoThree" border="0" alt="ApplySplitStringIntoThree" src="http://community.devexpress.com/blogs/markmiller/ApplySplitStringIntoThree_675FA384.jpg" width="804" height="203" /&gt; &lt;/p&gt;  &lt;p&gt;Applying the refactoring will leave you with this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="SplitStringInto2Applied" border="0" alt="SplitStringInto2Applied" src="http://community.devexpress.com/blogs/markmiller/SplitStringInto2Applied_18EB111A.jpg" width="897" height="83" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Notice the “\n” string fragment is selected for easy editing. Now we can use CodeRush’s “&lt;strong&gt;enl&lt;/strong&gt;” template to replace the “\n” with a proper &lt;strong&gt;Environment.NewLine&lt;/strong&gt; expression.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="AfterEnvironmentNewLine" border="0" alt="AfterEnvironmentNewLine" src="http://community.devexpress.com/blogs/markmiller/AfterEnvironmentNewLine_66873D9A.jpg" width="575" height="102" /&gt; &lt;/p&gt;  &lt;h3&gt;Introduce Format Item&lt;/h3&gt;  &lt;p&gt;See that “Welcome back, customer.” string in the code above? It would be great if we could actually pass in the customer’s name in place of the text “customer”. That would make the greeting certainly more personal. It’s easy to do this with CodeRush. Just select the part of the string that you want to replace, and press the CodeRush/Refactor! key, like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="IntroduceFormatItemPreviewHint" border="0" alt="IntroduceFormatItemPreviewHint" src="http://community.devexpress.com/blogs/markmiller/IntroduceFormatItemPreviewHint_0A406535.jpg" width="640" height="254" /&gt; &lt;/p&gt;  &lt;p&gt;Apply the &lt;strong&gt;Introduce Format Item&lt;/strong&gt; refactoring to get this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="AppliedIntroduceFormatItem" border="0" alt="AppliedIntroduceFormatItem" src="http://community.devexpress.com/blogs/markmiller/AppliedIntroduceFormatItem_4593CAF3.jpg" width="755" height="103" /&gt; &lt;/p&gt;  &lt;p&gt;Notice that once again the extracted string is selected for easy editing. Now let’s promote this string to a parameter. Press the CodeRush/Refactor! key and select &lt;strong&gt;Promote to Parameter&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="PromoteToParameter" border="0" alt="PromoteToParameter" src="http://community.devexpress.com/blogs/markmiller/PromoteToParameter_452797FE.jpg" width="872" height="324" /&gt; &lt;/p&gt;  &lt;p&gt;And give the new parameter a meaningful name, like &lt;strong&gt;customerName&lt;/strong&gt;:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="PromoteToParameterAfterRename" border="0" alt="PromoteToParameterAfterRename" src="http://community.devexpress.com/blogs/markmiller/PromoteToParameterAfterRename_646A3ED1.jpg" width="766" height="109" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;Converting Text to Strings&lt;/h3&gt;  &lt;p&gt;Sometimes you need to work with a text coming from another environment, and that text span several lines or contain quote characters (that would need to be escaped). So in this example I used the “ms” template to create a method that returns a string, and I expanded the “r” template to get the return keyword and then I pasted in some XAML code that creates a TextBlock:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt; &lt;font color="#0000ff"&gt;string&lt;/font&gt; GetTextBlock()      &lt;br /&gt;{      &lt;br /&gt;&amp;#160; &lt;font color="#0000ff"&gt;return&lt;/font&gt; &amp;lt;TextBlock      &lt;br /&gt;&amp;#160; Canvas.Left=&lt;font color="#a31515"&gt;&amp;quot;25&amp;quot;&lt;/font&gt; Canvas.Top=&lt;font color="#a31515"&gt;&amp;quot;5&amp;quot;       &lt;br /&gt;&amp;#160; &lt;/font&gt;Foreground=&lt;font color="#a31515"&gt;&amp;quot;Teal&amp;quot;&lt;/font&gt; &lt;font color="#2b91af"&gt;FontFamily&lt;/font&gt;=&lt;font color="#a31515"&gt;&amp;quot;Verdana&amp;quot;&lt;/font&gt; FontSize=&lt;font color="#a31515"&gt;&amp;quot;18&amp;quot;&lt;/font&gt; FontWeight=&lt;font color="#a31515"&gt;&amp;quot;Bold&amp;quot;       &lt;br /&gt;&amp;#160; &lt;/font&gt;Text=&lt;font color="#a31515"&gt;&amp;quot;Sample Output&amp;quot;&lt;/font&gt; /&amp;gt;;      &lt;br /&gt;}&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Of course this code will not compile. Fortunately we have CodeRush installed so getting it into its desired shape is easy. Just select the text we want to convert, press the CodeRush/Refactor! key and select &lt;strong&gt;Embed Selection&lt;/strong&gt; | &lt;strong&gt;To string&lt;/strong&gt;, like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="EmbedString" border="0" alt="EmbedString" src="http://community.devexpress.com/blogs/markmiller/EmbedString_3610B924.jpg" width="698" height="502" /&gt; &lt;/p&gt;  &lt;p&gt;CodeRush will convert the text into a string, like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ConvertToString" border="0" alt="ConvertToString" src="http://community.devexpress.com/blogs/markmiller/ConvertToString_235BBF6D.jpg" width="796" height="142" /&gt; &lt;/p&gt;  &lt;p&gt;Nice. Notice how the quotes are properly escaped and the separate lines are now concatenated together.&lt;/p&gt;  &lt;p&gt;Now, suppose you wanted to parameterize some of the values in this string. For example, turn the “Sample Output” into a “text” parameter. How would you do that? Well, you should already know how. Just select the text, split the string, and promote it to a parameter.&lt;/p&gt;  &lt;h3&gt;Wrapping Up&lt;/h3&gt;  &lt;p&gt;If you’re not already using CodeRush, you should be. This post has covered only a portion of the tools and features that work with strings, and working with strings is only a very small tip of the very large iceberg of power that is CodeRush. CodeRush is the fastest, most powerful, and most memory-efficient developer productivity add-on available for Visual Studio.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=297211" width="1" height="1"&gt;</description></item><item><title>The Extensible Test Runner You’ve Been Waiting For</title><link>http://community.devexpress.com/blogs/markmiller/archive/2009/11/16/the-test-runner-you-ve-been-waiting-for.aspx</link><pubDate>Mon, 16 Nov 2009 21:36:37 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:284320</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>20</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=284320</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2009/11/16/the-test-runner-you-ve-been-waiting-for.aspx#comments</comments><description>&lt;p&gt;We’ve been hard at work fine-tuning the CodeRush Test Runner, and we’re getting excited.&lt;/p&gt;  &lt;p&gt;This screen shot contains a few clues as to why we’re so pumped up:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="FirstShot" border="0" alt="FirstShot" src="http://community.devexpress.com/blogs/markmiller/FirstShot_42404434.png" width="252" height="365" /&gt; &lt;/p&gt;  &lt;p&gt;We’re pleased with the UI. Notice in the screen shot above how failing tests are easy to spot while the less-important information is rendered in a lower contrast that’s easy on the eyes. Also, we’ve done some work on the tree list to reduce the number of clicks needed to get to tests of interest. And there’s a handy filter text box at the top.&lt;/p&gt;  &lt;p&gt;So it looks pretty. But more importantly, the Test Runner supports all the popular testing frameworks right out of the box, including &lt;strong&gt;VSTest&lt;/strong&gt;, &lt;strong&gt;NUnit &lt;/strong&gt;(including different flavors mixed in with various extensions), and the oft-neglected &lt;strong&gt;xUnit &lt;/strong&gt;and &lt;strong&gt;MbUnit&lt;/strong&gt;. The screen shot above is taken from a solution that includes test cases for all of these frameworks. &lt;/p&gt;  &lt;p&gt;CodeRush customers will also receive &lt;strong&gt;full source code &lt;/strong&gt;to the plug-ins we ship that provide all this luscious unit testing support. So if you want to extend support for any of these unit test frameworks, &lt;strong&gt;it’s easy&lt;/strong&gt;. Or if you want to add support for a brand new unit testing framework, you all have the sample code you need to get started. That is cool.&lt;/p&gt;  &lt;p&gt;Test results also appear in the code:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="TestStatus" border="0" alt="TestStatus" src="http://community.devexpress.com/blogs/markmiller/TestStatus_2C765BD7.png" width="612" height="576" /&gt; &lt;/p&gt;  &lt;p&gt;You can run test cases from the Test Runner, or from the code itself by clicking one of the Test Runner icons that appear next to the unit test attributes (as shown in the screen shot above).&lt;/p&gt;  &lt;p&gt;The Test Runner debuts in CodeRush 9.3 (beta is internal testing and will available soon if not already by the time you read this). I’ll be showing the Test Runner at PDC in Los Angeles this week, so if you’re in LA stop by our booth and check it out.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=284320" width="1" height="1"&gt;</description></item><item><title>Here's a Picture Worth 1000 Words...</title><link>http://community.devexpress.com/blogs/markmiller/archive/2009/11/11/here-s-a-picture-worth-1000-words.aspx</link><pubDate>Wed, 11 Nov 2009 21:55:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:283749</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=283749</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2009/11/11/here-s-a-picture-worth-1000-words.aspx#comments</comments><description>&lt;p&gt;Derek Reynolds says it all with a single&amp;nbsp;&lt;a href="http://derekreynolds.wordpress.com/2009/11/11/great-visual-studio-2009-productivity-addin-coderush/"&gt;screen shot&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=283749" width="1" height="1"&gt;</description></item><item><title>DX Labs: Single Code Base Driving GDI and WPF Simultaneously from CodeRush Plug-ins</title><link>http://community.devexpress.com/blogs/markmiller/archive/2009/10/19/dx-labs-single-code-base-driving-gdi-and-wpf-simultaneously-from-coderush-plug-ins.aspx</link><pubDate>Mon, 19 Oct 2009 23:05:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:280485</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>12</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=280485</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2009/10/19/dx-labs-single-code-base-driving-gdi-and-wpf-simultaneously-from-coderush-plug-ins.aspx#comments</comments><description>&lt;p&gt;Since the beginning, CodeRush has been extensible. &lt;/p&gt;
&lt;p&gt;The cardinal rule for extensible architectures:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;New revs of the framework can&amp;rsquo;t break existing plug-ins.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Through each release the IDE Tools team responsible for CodeRush has strived to ensure backward and forward compatibility for 3rd-party plug-ins. And throughout the years, we have by and large achieved this goal.&lt;/p&gt;
&lt;p&gt;And along comes the Visual Studio 2010 editor.&lt;/p&gt;
&lt;p&gt;Based entirely on WPF.&lt;/p&gt;
&lt;p&gt;Which kind of mucks things up for anyone writing plug-ins that paint on the editor. Those plug-ins rely upon DXCore events that pass a GDI Graphics instance which makes it easy to paint on the editor surface. But VS 2010 has effectively removed GDI from the equation.&lt;/p&gt;
&lt;p&gt;Which leaves us with a few obvious options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Split the code base (attempt to maintain two code bases)&lt;/li&gt;
&lt;li&gt;Abandon GDI and support for GDI-based dev environments (e.g., VS 2008 and earlier)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The cost of splitting the code base is potentially very high, not only for us but also for customers. For us, it makes the code more complex to maintain, and it potentially creates a scenario where CodeRush customers remaining in VS 2008 or VS 2005 might go without issue fixes and enhancements occurring in the latest version of CodeRush working in WPF land. Moving to an entirely new code base has similar consequences for customers remaining in GDI land.&lt;/p&gt;
&lt;p&gt;There is also a less obvious solution which is to provide a GDI layer on top of the WPF layer in VS 2010, which would allow editor-surface painting plug-ins written in VS 2008 to continue to work in VS 2010. I&amp;rsquo;m about as comfortable with this approach/hack as I am squeezing my pet elephant Jorge into my brand new bright yellow Borat-style bathing suit. While such a configuration may appear stylish from a distance and to some degree addresses the forward compatibility challenge, it brings the risk of some serious chafing. It just doesn&amp;rsquo;t fit in a WPF world where you want to be able to take advantage of everything that Microsoft has added to VS 2010 that works with WPF. &lt;/p&gt;
&lt;p&gt;And so we&amp;rsquo;ve walked away from this more obscure option too.&lt;/p&gt;
&lt;p&gt;So we continued to consider the problem. &lt;/p&gt;
&lt;p&gt;Around this time I was working on a blog post on &lt;a target="_blank" href="http://community.devexpress.com/blogs/markmiller/archive/2009/07/23/code-providers-101-implementing-unimplemented-properties.aspx#comments"&gt;Implementing Code Providers&lt;/a&gt;, and this bit of code that shows up in the post was on my mind:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family:courier new,courier;"&gt;&lt;span style="color:#0000ff;"&gt;private void &lt;/span&gt;cpImplementUnimplementedProperty_PreparePreview(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; sender, &lt;span style="color:#008080;"&gt;PrepareContentPreviewEventArgs&lt;/span&gt; ea) &lt;br /&gt;{ &lt;br /&gt;&amp;nbsp; &lt;span style="color:#008080;"&gt;Property&lt;/span&gt; oldProperty = GetProperty(ea.Element); &lt;br /&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (oldProperty == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:courier new,courier;"&gt;&amp;nbsp; &lt;span style="color:#008080;"&gt;ElementBuilder&lt;/span&gt; elementBuilder = ea.NewElementBuilder(); &lt;br /&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; newCode = GetNewPropertyDeclaration(elementBuilder, oldProperty);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:courier new,courier;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="font-family:courier new,courier;"&gt;&lt;strong&gt;ea.AddCodePreview(oldProperty.Range.Start, newCode.Trim()); &lt;br /&gt;&amp;nbsp; ea.AddStrikethrough(oldProperty.Range); &lt;br /&gt;&lt;/strong&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Notice the last two lines of code. These two lines of code add a visual strikethrough markup over the old code in the editor, and they also add a Code Preview window that&amp;rsquo;s attached to the code. Both of these look like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/ImplementPropertyPreviewHint_f79e59ed-d45e-416a-88ae-42d90c821fde.png" alt="" /&gt; &lt;/p&gt;
&lt;p&gt;Notice the complete lack of anything even remotely resembling GDI whatsoever in those two lines of code. The GDI-heavy code to actually paint the strikethrough and the event handling necessary to support this are abstracted away from the plug-in already. This was all a result of work we did years ago to make it super easy to create preview hints for refactorings and code providers. (That&amp;rsquo;s why CodeRush includes over 185 refactorings &amp;ndash; the architecture makes it super-easy to make them.) &lt;/p&gt;
&lt;p&gt;Considering the strikethrough code example above eventually led us to this question:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Can we abstract all aspects of painting out to a layer that plug-ins can exploit to paint on the editor, without requiring explicit knowledge of GDI or WPF?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;rsquo;re familiar with both GDI and WPF, you understand the magnitude of this question. At first glance it seems incredibly challenging. GDI painting is event-driven, and WPF painting is more of a one-time assembly of pieces, and changes to the pieces can result in automatic updates to the images. GDI has none of this. These drawing frameworks are so radically different in so many ways it seems impossible. Of course, on the IDE Tools team, we don&amp;rsquo;t use the word impossible. We might use &amp;ldquo;economically infeasible&amp;rdquo; and &amp;ldquo;No F*in&amp;rsquo; Way&amp;rdquo;, but never impossible. So the question really became one of economic feasibility. Could we abstract enough of what we needed from these two drawing frameworks in time for the VS 2010 release?&lt;/p&gt;
&lt;p&gt;The answer appears to be &lt;strong&gt;YES&lt;/strong&gt;. To be clear, there are two steps here:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Abstract the painting layer, and create two different engines that map the abstraction to either WPF or GDI.&lt;/li&gt;
&lt;li&gt;Update any existing source code that does anything remotely GDI so it uses the new painting layer.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Drawbacks:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;We have to port GDI-specific code in existing plug-ins to the new framework. Third party developers using GDI to paint as well will also need to be ported if they want to work in VS 2010.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Benefits:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Single source code base as we move forward.&lt;/li&gt;
&lt;li&gt;Plug-ins using the new painting layer are likely to work in all versions of Visual Studio that support .NET. If you&amp;rsquo;re a plug-in developer working with CodeRush or DXCore you don&amp;rsquo;t need to worry about which drawing framework or which version of Visual Studio you will support.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I find this quite exciting because it removes the weight from the decision of whether to work in WPF or to stay in GDI, and that may be a decision developers out there are facing.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s take a look at a real example from the source code for the upcoming CodeRush 10 for VS 2010. &lt;/p&gt;
&lt;p&gt;&lt;span style="color:#800000;"&gt;Disclaimer: This is a DevExpress Labs preview. Everything here is subject to change until we release!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The CodeRush stack-based markers feature paints a small triangle on the editor to indicate the position of markers dropped by the developer. Using the new framework, if we want to put something on the editor we start with a descendant of the CRVisualAdornment, like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family:courier new,courier;"&gt;&lt;span style="color:#0000ff;"&gt;public class &lt;/span&gt;&lt;span style="color:#008080;"&gt;CRMarkerAdornment&lt;/span&gt; : &lt;span style="color:#008080;"&gt;CRVisualAdornment&lt;/span&gt; &lt;br /&gt;{&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#008080;"&gt;CRMarkerAdornment&lt;/span&gt;(&lt;span style="color:#008080;"&gt;IElementFrame&lt;/span&gt; frame)&amp;nbsp; &lt;br /&gt;&amp;nbsp; : &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;(frame) &lt;br /&gt;&amp;nbsp; {&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override void&lt;/span&gt; Render(&lt;span style="color:#008080;"&gt;IDrawingSurface&lt;/span&gt; surface)&amp;nbsp; &lt;br /&gt;&amp;nbsp; {&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;span style="color:#008000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // TODO: Render the marker.&lt;/span&gt; &lt;br /&gt;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public override&lt;/span&gt; &lt;span style="color:#008080;"&gt;Size&lt;/span&gt; GetSize()&amp;nbsp; &lt;br /&gt;&amp;nbsp; {&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new,courier;"&gt;&lt;span style="color:#008000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;return new &lt;/span&gt;&lt;span style="color:#008080;"&gt;Size&lt;/span&gt;&lt;span style="color:#000000;"&gt;(10, 10);&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The GetSize override allows the adornment to tell the drawing engine how big it is. The Render method override is where we place the code that will actually draw the triangle. That code might look something like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;span style="font-family:courier new,courier;"&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override void&lt;/span&gt; Render(&lt;span style="color:#008080;"&gt;IDrawingSurface&lt;/span&gt; surface)&amp;nbsp; &lt;br /&gt;&amp;nbsp; {&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#008080;"&gt;Point&lt;/span&gt; topPoint = new &lt;span style="color:#008080;"&gt;Point&lt;/span&gt;(5, 5);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#008080;"&gt;double&lt;/span&gt; halfBase = 2.5; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#008080;"&gt;double&lt;/span&gt; height = 5; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#008080;"&gt;Point&lt;/span&gt;[] points = {&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;&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:#0000ff;"&gt;new &lt;/span&gt;&lt;span style="color:#008080;"&gt;Point&lt;/span&gt;(topPoint.X, topPoint.Y),&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;&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:#0000ff;"&gt;new &lt;/span&gt;&lt;span style="color:#008080;"&gt;Point&lt;/span&gt;(topPoint.X - halfBase, topPoint.Y + height), &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;&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:#0000ff;"&gt;new &lt;/span&gt;&lt;span style="color:#008080;"&gt;Point&lt;/span&gt;(topPoint.X + halfBase, topPoint.Y + height)&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; surface.DrawPolygon(_FillColor, _OutlineColor, points);&amp;nbsp; &lt;br /&gt;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="color:#008080;"&gt;IDrawingSurface&lt;/span&gt; looks a bit like the GDI Graphics object. &lt;strong&gt;_FillColor &lt;/strong&gt;and &lt;strong&gt;_OutlineColor &lt;/strong&gt;are fields of type &lt;span style="color:#008080;"&gt;ColorProperty&lt;/span&gt; (more on this in a bit), and their declarations look like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family:courier new,courier;"&gt;&amp;nbsp; &lt;span style="color:#008080;"&gt;ColorProperty&lt;/span&gt; _FillColor; &lt;br /&gt;&amp;nbsp; &lt;span style="color:#008080;"&gt;ColorProperty&lt;/span&gt; _OutlineColor;&lt;/span&gt;&amp;nbsp; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We initialize these fields in our constructor:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family:courier new,courier;"&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#008080;"&gt;CRMarkerAdornment&lt;/span&gt;(&lt;span style="color:#008080;"&gt;IElementFrame&lt;/span&gt; frame)&amp;nbsp; &lt;br /&gt;&amp;nbsp; : &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;(frame)&amp;nbsp; &lt;br /&gt;&amp;nbsp; {&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _FillColor = &lt;span style="color:#0000ff;"&gt;new &lt;/span&gt;&lt;span style="color:#008080;"&gt;ColorProperty&lt;/span&gt;(&lt;span style="color:#008080;"&gt;Colors&lt;/span&gt;.Blue);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _OutlineColor = &lt;span style="color:#0000ff;"&gt;new &lt;/span&gt;&lt;span style="color:#008080;"&gt;ColorProperty&lt;/span&gt;(&lt;span style="color:#008080;"&gt;Colors&lt;/span&gt;.DarkBlue);&amp;nbsp; &lt;br /&gt;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;ColorProperty is cool&lt;/strong&gt;. If we use ColorProperties in the &lt;strong&gt;Render&lt;/strong&gt; override, any changes to these values are automatically reflected in the editor, regardless of the platform we are rendering in.&lt;/p&gt;
&lt;p&gt;So, for example, if we wanted to create a new transient marker with a short life span of 20 seconds, we could visually indicate that lifespan by changing the values of the ColorProperties over time (for example, changing the transparency of the color). &lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s give our &lt;span style="color:#008080;"&gt;CRMarkerAdornment&lt;/span&gt; new properties so we can do just that:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family:courier new,courier;"&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public &lt;/span&gt;&lt;span style="color:#008080;"&gt;Color&lt;/span&gt; FillColor&amp;nbsp; &lt;br /&gt;&amp;nbsp; {&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return &lt;/span&gt;_FillColor.Value; }&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;set &lt;/span&gt;{ _FillColor.Value = &lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;; }&amp;nbsp; &lt;br /&gt;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public &lt;/span&gt;&lt;span style="color:#008080;"&gt;Color&lt;/span&gt; OutlineColor&amp;nbsp; &lt;br /&gt;&amp;nbsp; {&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return &lt;/span&gt;_OutlineColor.Value; }&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;set &lt;/span&gt;{ _OutlineColor.Value = &lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;; }&amp;nbsp; &lt;br /&gt;&amp;nbsp; } &lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Notice these exposed properties are of type &lt;span style="color:#008080;"&gt;Color&lt;/span&gt;, not &lt;span style="color:#008080;"&gt;ColorProperty&lt;/span&gt;. &lt;/p&gt;
&lt;p&gt;And that&amp;rsquo;s it! Now we have a graphic element that &lt;strong&gt;paints in both WPF and GDI&lt;/strong&gt;. I&amp;rsquo;m pretty sure this has never been done before. The full source looks like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family:courier new,courier;"&gt;&lt;span style="color:#0000ff;"&gt;public class &lt;/span&gt;&lt;span style="color:#008080;"&gt;CRMarkerAdornment&lt;/span&gt; : &lt;span style="color:#008080;"&gt;CRVisualAdornment&lt;/span&gt; &lt;br /&gt;{ &lt;br /&gt;&amp;nbsp; &lt;span style="color:#008080;"&gt;ColorProperty&lt;/span&gt; _FillColor; &lt;br /&gt;&amp;nbsp; &lt;span style="color:#008080;"&gt;ColorProperty&lt;/span&gt; _OutlineColor;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#008080;"&gt;CRMarkerAdornment&lt;/span&gt;(&lt;span style="color:#008080;"&gt;IElementFrame&lt;/span&gt; frame)&amp;nbsp; &lt;br /&gt;&amp;nbsp; : &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;(frame)&amp;nbsp; &lt;br /&gt;&amp;nbsp; {&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _FillColor = &lt;span style="color:#0000ff;"&gt;new &lt;/span&gt;&lt;span style="color:#008080;"&gt;ColorProperty&lt;/span&gt;(&lt;span style="color:#008080;"&gt;Colors&lt;/span&gt;.Blue);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _OutlineColor = &lt;span style="color:#0000ff;"&gt;new &lt;/span&gt;&lt;span style="color:#008080;"&gt;ColorProperty&lt;/span&gt;(&lt;span style="color:#008080;"&gt;Colors&lt;/span&gt;.DarkBlue);&amp;nbsp; &lt;br /&gt;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override void&lt;/span&gt; Render(&lt;span style="color:#008080;"&gt;IDrawingSurface&lt;/span&gt; surface)&amp;nbsp; &lt;br /&gt;&amp;nbsp; {&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#008080;"&gt;Point&lt;/span&gt; topPoint = new &lt;span style="color:#008080;"&gt;Point&lt;/span&gt;(5, 5);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#008080;"&gt;double&lt;/span&gt; halfBase = 2.5;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#008080;"&gt;double&lt;/span&gt; height = 5;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#008080;"&gt;Point&lt;/span&gt;[] points = {&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;&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:#0000ff;"&gt;new &lt;/span&gt;&lt;span style="color:#008080;"&gt;Point&lt;/span&gt;(topPoint.X, topPoint.Y),&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;&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:#0000ff;"&gt;new &lt;/span&gt;&lt;span style="color:#008080;"&gt;Point&lt;/span&gt;(topPoint.X - halfBase, topPoint.Y + height), &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;&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:#0000ff;"&gt;new &lt;/span&gt;&lt;span style="color:#008080;"&gt;Point&lt;/span&gt;(topPoint.X + halfBase, topPoint.Y + height)&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; surface.DrawPolygon(_FillColor, _OutlineColor, points);&amp;nbsp; &lt;br /&gt;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public override&lt;/span&gt; &lt;span style="color:#008080;"&gt;Size&lt;/span&gt; GetSize()&amp;nbsp; &lt;br /&gt;&amp;nbsp; {&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;return new &lt;/span&gt;&lt;span style="color:#008080;"&gt;Size&lt;/span&gt;(10, 10);&amp;nbsp; &lt;br /&gt;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public &lt;/span&gt;&lt;span style="color:#008080;"&gt;Color&lt;/span&gt; FillColor&amp;nbsp; &lt;br /&gt;&amp;nbsp; {&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return &lt;/span&gt;_FillColor.Value; }&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;set &lt;/span&gt;{ _FillColor.Value = &lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;; }&amp;nbsp; &lt;br /&gt;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public &lt;/span&gt;&lt;span style="color:#008080;"&gt;Color&lt;/span&gt; OutlineColor&amp;nbsp; &lt;br /&gt;&amp;nbsp; {&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt; { &lt;span style="color:#0000ff;"&gt;return &lt;/span&gt;_OutlineColor.Value; }&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;set &lt;/span&gt;{ _OutlineColor.Value = &lt;span style="color:#0000ff;"&gt;value&lt;/span&gt;; }&amp;nbsp; &lt;br /&gt;&amp;nbsp; } &lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;By now you might be wondering what namespace holds the types &lt;span style="color:#008080;"&gt;Color&lt;/span&gt;, &lt;span style="color:#008080;"&gt;Point&lt;/span&gt;, &lt;span style="color:#008080;"&gt;Colors&lt;/span&gt;, and &lt;span style="color:#008080;"&gt;Size&lt;/span&gt; from the code above. In implementing this framework, we had three choices:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use System.Drawing and convert to WPF types when we need to paint with WPF.&lt;/li&gt;
&lt;li&gt;Use System.Windows and convert to GDI types when we need to paint with GDI.&lt;/li&gt;
&lt;li&gt;Use a completely new set of types and convert those to the needed types when painting.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Choice #3 seems to clearly involve the most work. It means the GDI and WPF engines must each implement type conversion, so one might be inclined walk away from that option. However, the first two choices will penalize some customers, forcing both WPF and GDI assemblies to be loaded when only one is really necessary. So we went with choice #3.&lt;/p&gt;
&lt;p&gt;So now we have a &lt;span style="color:#008080;"&gt;CRVisualAdornment&lt;/span&gt; descendant that paints a triangle on the surface of the editor. There are several ways to add this adornment to the editor. One way is to do something like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-family:courier new,courier;"&gt;&lt;span style="color:#008080;"&gt;IElementFrame&lt;/span&gt; frame = ea.CreateFrame(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#008080;"&gt;SourceRange&lt;/span&gt;(10, 20, 10, 21));&amp;nbsp; &lt;br /&gt;&lt;/span&gt;&lt;span style="color:#008080;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new,courier;"&gt;CRMarkerAdornment&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new,courier;"&gt; markerAdornment = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#008080;"&gt;CRMarkerAdornment&lt;/span&gt;(frame); &lt;br /&gt;markerAdornment.PenColor = &lt;span style="color:#008080;"&gt;Colors&lt;/span&gt;.Red;&amp;nbsp; &lt;br /&gt;markerAdornment.OutlineColor = &lt;span style="color:#008080;"&gt;Colors&lt;/span&gt;.DarkRed;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;ea.AddAdornment(markerAdornment);&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The &amp;ldquo;ea&amp;rdquo; in the sample code above represents the event arguments to an unspecified event handler. Adornments can be added in response to a number of IDE events, such as opening a document or scrolling. Adornments can also be added programmatically at any time. The first line in the code above creates a new &lt;span style="color:#008080;"&gt;IElementFrame&lt;/span&gt; implementer, which essentially marks a rectangular region in the code using lines and columns. So this marker starts on line 10 at character 20, and runs to character 21 on that same line. Passing the &lt;span style="color:#008080;"&gt;IElementFrame&lt;/span&gt; implementer to our &lt;span style="color:#008080;"&gt;CRMarkerAdornment&lt;/span&gt; constructor allows the Marker to automatically stick to the code, so when you scroll the marker will scroll too.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=280485" width="1" height="1"&gt;</description><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/CodeRush/default.aspx">CodeRush</category><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/Refactor/default.aspx">Refactor</category><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/DXCore/default.aspx">DXCore</category><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/WPF/default.aspx">WPF</category><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/Visual+Studio+2010/default.aspx">Visual Studio 2010</category><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/GDI/default.aspx">GDI</category></item><item><title>Miller on DNR TV -- Intelligent Code Generation in Visual Studio with CodeRush</title><link>http://community.devexpress.com/blogs/markmiller/archive/2009/10/06/miller-on-dnr-tv-intelligent-code-generation-in-visual-studio-with-coderush.aspx</link><pubDate>Tue, 06 Oct 2009 17:57:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:278833</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=278833</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2009/10/06/miller-on-dnr-tv-intelligent-code-generation-in-visual-studio-with-coderush.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;m deep in code and surfacing briefly only to mention this DNR TV session I recorded with Carl Franklin. The session gives you a taste of how to create language-independent &lt;a href="http://www.dnrtv.com/default.aspx?showNum=152"&gt;intelligent code generators&lt;/a&gt;&amp;nbsp;inside Visual Studio that work with CodeRush or CodeRush Xpress. For anyone who prefers watching a movie over reading &lt;a href="http://community.devexpress.com/blogs/markmiller/archive/2009/07/23/code-providers-101-implementing-unimplemented-properties.aspx"&gt;DXCore plug-in tutorial blog posts&lt;/a&gt;, this one&amp;#39;s for you:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.dnrtv.com/default.aspx?showNum=152"&gt;http://www.dnrtv.com/default.aspx?showNum=152&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For developers interested in creating &lt;em&gt;refactorings&lt;/em&gt; instead of code providers, just drop a RefactoringProvider onto your form instead of the CodeProvider -- all other steps remain the same.&lt;/p&gt;
&lt;p&gt;Note: The &lt;a href="http://libra.franklins.net/ConvertToInteger.zip"&gt;source&lt;/a&gt;  is available as a link at the bottom of the DNR TV page. This source includes extension methods for anyone working in a version of CodeRush earlier than 9.27. If you&amp;#39;re using 9.27 or higher, those extension methods are redundant. Check out the source even if you watch and follow the video, because it includes additional functionality not covered in the video.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=278833" width="1" height="1"&gt;</description><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/CodeRush/default.aspx">CodeRush</category><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/Refactor/default.aspx">Refactor</category><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/DXCore/default.aspx">DXCore</category></item><item><title>Miller on Hanselminutes</title><link>http://community.devexpress.com/blogs/markmiller/archive/2009/09/04/miller-on-hanselminutes.aspx</link><pubDate>Fri, 04 Sep 2009 20:46:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:275430</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=275430</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2009/09/04/miller-on-hanselminutes.aspx#comments</comments><description>&lt;p&gt;I sat down with Scott Hanselman this week and discussed CodeRush architecture, breaking the rules, and my allegedly massive head. &lt;/p&gt;
&lt;p&gt;Get it here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.hanselminutes.com/default.aspx?showID=196"&gt;http://www.hanselminutes.com/default.aspx?showID=196&lt;/a&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=275430" width="1" height="1"&gt;</description></item><item><title>CodeRush Test Runner In-source UI Preview</title><link>http://community.devexpress.com/blogs/markmiller/archive/2009/09/02/coderush-test-runner-in-source-ui-preview.aspx</link><pubDate>Wed, 02 Sep 2009 19:48:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:275112</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=275112</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2009/09/02/coderush-test-runner-in-source-ui-preview.aspx#comments</comments><description>&lt;p&gt;Lately I&amp;#39;ve had my head deep in&amp;nbsp;code, and Mehul has done me the favor of&amp;nbsp;blogging about our new Test Runner, in development. See&amp;nbsp;Mehul&amp;#39;s &lt;a href="http://bit.ly/13s5TF"&gt;blog post&lt;/a&gt; for a preview of the new Test Runner in-source UI.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=275112" width="1" height="1"&gt;</description></item><item><title>Code Providers 101 -- Implementing Unimplemented Properties</title><link>http://community.devexpress.com/blogs/markmiller/archive/2009/07/23/code-providers-101-implementing-unimplemented-properties.aspx</link><pubDate>Thu, 23 Jul 2009 15:12:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:270140</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>15</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=270140</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2009/07/23/code-providers-101-implementing-unimplemented-properties.aspx#comments</comments><description>&lt;p&gt;Here&amp;#39;s another article on writing plug-ins based on the DXCore. This plug-in is based on a request from the Refactor! Pro newsgroups, which goes like this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Whenever I choose to automatically implement an interface, a property that throws &lt;strong&gt;NotImplementedException&lt;/strong&gt; in the getter and setter appears.&amp;nbsp; For example: &lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public int &lt;/span&gt;Foo&lt;br /&gt;&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; &lt;span style="color:#0000ff;"&gt;get&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; {&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;throw new &lt;/span&gt;NotImplementedException();&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; }&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; &lt;span style="color:#0000ff;"&gt;set&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; {&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;throw new &lt;/span&gt;NotImplementedException();&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; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/p&gt; &lt;p&gt;It would be great if there was a refactoring that let me turn this into an auto property, or a backing field property.&amp;nbsp; I know this technically isn&amp;#39;t a &amp;quot;refactoring&amp;quot; since it&amp;#39;s actually causing the functionality of the code to change, but I find myself running into this quite a bit.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This is a great request, in fact, so good, we implemented a feature similar to this for CodeRush 9.1. So for those of you who already have CodeRush 9.1 or above, this tutorial will serve as a how-to for creating tools that generate code intelligently. For the rest of you, this tutorial will have the added benefit of producing a useful feature you can add to your Visual Studio toolset.&lt;/p&gt; &lt;p&gt;As the author mentions, this feature technically isn&amp;#39;t a refactoring. That&amp;#39;s okay, because although Refactor! Pro is all about refactoring, CodeRush includes a sweet mechanism for changing code (in ways that &lt;em&gt;might &lt;/em&gt;result in a change to program behavior), called CodeProviders. CodeProviders are very similar to RefactoringProviders, the primary distinction is how they are presented to developers in the CodeRush/Refactor menu. For example:&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="RefacrtoringsAndCodeProviders" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/RefacrtoringsAndCodeProviders_ebfb0c60-e227-45fa-b453-3e47acff2b85.png" width="797" height="266" /&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;In the screen shot above the CodeRush/Refactor! menu is divided into two sections. The top section in red lists refactorings, while the lower section in blue lists code providers. This visual distinction alerts developers that menu items in blue &lt;em&gt;may &lt;/em&gt;change program behavior.&lt;/p&gt; &lt;p&gt;So while it might be considered &lt;strong&gt;bad form &lt;/strong&gt;to create a refactoring that converts an unimplemented property into an implemented one, adding this feature as a CodeProvider makes all the sense in the world. So let&amp;#39;s do that.&lt;/p&gt; &lt;h3&gt;&lt;span style="color:#00699b;"&gt;Getting Started&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;From the &lt;strong&gt;DevExpress&lt;/strong&gt; menu, select &lt;strong&gt;New Plug-in...&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="NewDXCorePlugInProject" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/NewDXCorePlugInProject_47b442f7-de20-4d4a-8a42-933d73c24ae0.png" width="697" height="350" /&gt; &lt;/p&gt; &lt;p&gt;I&amp;#39;m calling this plug-in project &lt;strong&gt;CR_ImplementProperty&lt;/strong&gt;. I like to start all my CodeRush plug-ins with the CR_ prefix, and I should point out that because this plug-in is based on the CodeProvider technology, developers will need CodeRush to try it out.&lt;/p&gt; &lt;p&gt;Click &lt;strong&gt;OK&lt;/strong&gt;. The &lt;strong&gt;DXCore Plug-in Project Settings&lt;/strong&gt; dialog will appear.&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="PluginProjectSettings" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/PluginProjectSettings_308a7082-5ecd-4107-b944-cfa7870d001e.png" width="342" height="205" /&gt; &lt;/p&gt; &lt;p&gt;We can simply accept the default options on this dialog and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;The project will load and the plug-in design surface will be activated.&lt;/p&gt; &lt;h3&gt;&lt;span style="color:#00699b;"&gt;Dropping the CodeProvider&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;From the Toolbox, navigate to the &lt;strong&gt;DXCore &lt;/strong&gt;tab and select the &lt;strong&gt;CodeProvider&lt;/strong&gt; control. &lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="SelectCodeProvider" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/SelectCodeProvider_1da7d116-2ffe-4a4d-9e52-1837aadd5434.png" width="178" height="291" /&gt; &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Note: If you don&amp;#39;t see this control you can add it by &lt;strong&gt;right-clicking &lt;/strong&gt;the &lt;strong&gt;Toolbox&lt;/strong&gt;, selecting &amp;quot;&lt;strong&gt;Choose Items...&lt;/strong&gt;&amp;quot;, and then placing a check next to the &lt;strong&gt;CodeProvider &lt;/strong&gt;control in the &lt;strong&gt;DevExpress.CodeRush.Core &lt;/strong&gt;namespace.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;Double-click &lt;/strong&gt;the &lt;strong&gt;CodeProvider &lt;/strong&gt;control in the Toolbox to drop it on the plug-in design surface.&lt;/p&gt; &lt;p&gt;Now let&amp;#39;s change the following properties of this CodeProvider:&lt;/p&gt; &lt;p&gt; &lt;table cellspacing="0" cellpadding="2"&gt;  &lt;tr&gt; &lt;td&gt;&lt;b&gt;&lt;span style="color:#5081c0;"&gt;Property&lt;/span&gt;&lt;/b&gt;&lt;/td&gt; &lt;td&gt;&lt;b&gt;&lt;span style="color:#5081c0;"&gt;Value&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;(Name)&lt;/td&gt; &lt;td&gt;&lt;b&gt;cpImplementUnimplementedProperty&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;AutoUndo&lt;/td&gt; &lt;td&gt;&lt;strong&gt;True&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Description&lt;/td&gt; &lt;td&gt;&lt;b&gt;Implements an unimplemented property.&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;DisplayName&lt;/td&gt; &lt;td&gt;&lt;strong&gt;Implement Property&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;ProviderName&lt;/td&gt; &lt;td&gt;&lt;strong&gt;ImplementUnimplementedProperty&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt; &lt;p&gt;Switch to the &lt;strong&gt;Events &lt;/strong&gt;page of the &lt;strong&gt;Properties &lt;/strong&gt;grid.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;img border="0" alt="SwitchToEvents" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/SwitchToEvents_22f69ff3-f745-4c7c-9076-b131cbe13fe4.png" width="520" height="209" /&gt; &lt;/p&gt; &lt;p&gt;First we need to tell the system that our CodeProvider is available. We can add that logic in a handler for the &lt;strong&gt;CheckAvailability &lt;/strong&gt;event.&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="CreateHandlerForCheckAvailability" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/CreateHandlerForCheckAvailability_9b3a8f48-5fad-47b4-8a9a-55f896eb96f9.png" width="665" height="165" /&gt; &lt;/p&gt; &lt;p&gt;I want this CodeProvider to be available when the caret is inside a property declared like this:&lt;/p&gt; &lt;p&gt;&lt;span style="color:#0000ff;"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;public int &lt;/span&gt;Foo&lt;br /&gt;&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; &lt;span style="color:#0000ff;"&gt;get&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; {&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;throw new &lt;/span&gt;NotImplementedException();&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; }&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; &lt;span style="color:#0000ff;"&gt;set&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; {&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;throw new &lt;/span&gt;NotImplementedException();&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; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/p&gt; &lt;p&gt;or this:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public int &lt;/span&gt;Foo&lt;br /&gt;&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; &lt;span style="color:#0000ff;"&gt;get&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; {&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;throw new &lt;/span&gt;NotImplementedException();&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; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/p&gt; &lt;p&gt;or this:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public int &lt;/span&gt;Foo&lt;br /&gt;&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; &lt;span style="color:#0000ff;"&gt;set&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; {&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;throw new &lt;/span&gt;NotImplementedException();&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; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/p&gt; &lt;p&gt;Normally when write plug-ins that work with source code, we break out the &lt;a href="http://www.devexpress.com/Support/Center/KB/p/K18031.aspx" target="_blank"&gt;&lt;strong&gt;Expressions Lab&lt;/strong&gt;&lt;/a&gt;. The Expressions Lab reveals the structure of the language-independent tree that represents the source code inside Visual Studio. &lt;/p&gt; &lt;p&gt;However, instead of starting with the Expression Lab immediately, it might be interesting to see how far we can get using only Visual Studio&amp;#39;s Intellisense and a bit of knowledge learned from previous ventures with the Expressions Lab.&lt;/p&gt; &lt;p&gt;From past lessons we know that every element in the parse tree (e.g., for-loops, expressions, primitives, variables, methods, classes, etc.) either descends from &lt;strong&gt;LanguageElement&lt;/strong&gt; or implements &lt;strong&gt;IElement&lt;/strong&gt;. LanguageElement and many of its descendants are located in the &lt;strong&gt;DevExpress.CodeRush.StructuralParser&lt;/strong&gt; namespace. For example, inside this namespace, there is a class called &lt;strong&gt;Property &lt;/strong&gt;which represents property declarations in source code.&lt;/p&gt; &lt;p&gt;The &lt;strong&gt;ea &lt;/strong&gt;argument to the &lt;strong&gt;CheckAvailability &lt;/strong&gt;event includes a property called &amp;quot;&lt;strong&gt;Element&lt;/strong&gt;&amp;quot;, and this generally refers to the active element at the caret. By the way, this Element can also be set &lt;em&gt;programmatically &lt;/em&gt;by plug-ins wishing to &lt;em&gt;remotely &lt;/em&gt;invoke a refactoring or a code provider, so it is possible that this Element may actually be different from the element at the caret. So we need to resist the urge to use &lt;strong&gt;CodeRush.Source.ActiveProperty &lt;/strong&gt;(which we&amp;#39;ve seen in other plug-ins in the past) because while that may work when the caret is actually in the property, checking &lt;strong&gt;ActiveProperty &lt;/strong&gt;is likely to produce unexpected results if this CodeProvider is invoked remotely for a different property somewhere else in the code.&lt;/p&gt; &lt;p&gt;So, if &lt;strong&gt;Element &lt;/strong&gt;is a &lt;strong&gt;Property&lt;/strong&gt;, we expect to eventually drill down into its accessors to see if they contain a &lt;strong&gt;Throw&lt;/strong&gt;, passing a &lt;strong&gt;NotImplementedException&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;However if &lt;strong&gt;Element &lt;/strong&gt;refers to a starting code element &lt;em&gt;inside &lt;/em&gt;the property (such as the &lt;strong&gt;get &lt;/strong&gt;accessor, for example), then it makes sense to find the &lt;em&gt;parenting &lt;/em&gt;Property so we have a &lt;strong&gt;consistent starting point&lt;/strong&gt;. This allows the CodeProvider to be available even when the caret is inside the unimplemented property declaration. Having a wider range of where the feature is available makes it easier to discover.&lt;/p&gt; &lt;p&gt;So for the purposes of identifying unimplemented properties, it is important to get a consistent starting point, regardless of whether &lt;strong&gt;ea.Element &lt;/strong&gt;refers to the property or a child element of the property.&lt;/p&gt; &lt;p&gt;Here&amp;#39;s the code I use to get to that &lt;strong&gt;Property&lt;/strong&gt; starting point:&lt;/p&gt; &lt;blockquote&gt;&lt;font face="Lucida Console"&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; property = ea.Element &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;as&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; (property == &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;)&lt;br /&gt;&amp;nbsp; property = ea.Element.GetParentProperty();&lt;/font&gt;&lt;/span&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;We&amp;#39;re likely to need this later when we apply this code provider to make changes to the code, so let&amp;#39;s place this code in its own method, like this:&lt;/p&gt; &lt;blockquote&gt;&lt;font face="Lucida Console"&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; GetProperty(&lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;LanguageElement&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; element)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; property = element &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;as&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; (property == &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; &amp;amp;&amp;amp; element != &lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;null&lt;span style="font-size:small;"&gt;&lt;font color="#000000"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; property = element.GetParentProperty();&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;property;&lt;br /&gt;}&lt;/font&gt;&lt;/span&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;With that in place, my event handler now looks like this, containing two calls to a method named &lt;strong&gt;IsUnimplemented&lt;/strong&gt;, which we&amp;#39;ll create in a moment:&lt;/p&gt; &lt;blockquote&gt;&lt;font face="Lucida Console"&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; cpImplementUnimplementedProperty_CheckAvailability(&lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; sender, &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;CheckContentAvailabilityEventArgs&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; ea)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; property = GetProperty(ea.Element);&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; (property == &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; (property.HasGetter &amp;amp;&amp;amp; !IsUnimplemented(property.Getter))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; (property.HasSetter &amp;amp;&amp;amp; !IsUnimplemented(property.Setter))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;;&lt;br /&gt;&amp;nbsp; ea.Available = &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;true&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;;&lt;br /&gt;}&lt;/font&gt;&lt;/span&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The &lt;strong&gt;IsUnimplemented &lt;/strong&gt;method is going to take the &lt;strong&gt;Getter &lt;/strong&gt;or the &lt;strong&gt;Setter &lt;/strong&gt;accessor, and find the &lt;strong&gt;first child statement &lt;/strong&gt;and see if it&amp;#39;s a &lt;strong&gt;Throw &lt;/strong&gt;statement. &lt;strong&gt;IsUnimplemented &lt;/strong&gt;looks like this: &lt;/p&gt; &lt;blockquote&gt;&lt;font face="Lucida Console"&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;bool&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; IsUnimplemented(&lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;PropertyAccessor&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; accessor)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;LanguageElement&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; firstChild = accessor.GetFirstCodeChild();&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; (firstChild == &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;true&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; (firstChild.ElementType != &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;LanguageElementType&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;.Throw)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;false&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; Throws(firstChild &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;as&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;Throw&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt;, &lt;/span&gt;&lt;span style="color:#a31515;font-size:small;"&gt;&lt;font color="#a31515"&gt;&amp;quot;NotImplementedException&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;);&lt;br /&gt;}&lt;/font&gt;&lt;/span&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The call to the GetFirstCodeChild() method returns the first LanguageElement that is a child of the accessor that is not a comment. Note that right after this call there&amp;#39;s a check to see if that firstChild is null, and if so, IsUnimplemented returns true. That means our CodeProvider will &lt;strong&gt;also &lt;/strong&gt;be available in &lt;em&gt;these&lt;/em&gt; declaration scenarios (not all of which compile):&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;font face="Lucida Console"&gt;&lt;span style="color:#0000ff;"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;public int &lt;/span&gt;Foo&lt;br /&gt;&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; &lt;span style="color:#0000ff;"&gt;get&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; {&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; }&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; &lt;span style="color:#0000ff;"&gt;set&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; {&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; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;And this:&lt;/p&gt; &lt;p&gt;&lt;font size="2" face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public int &lt;/span&gt;Foo&lt;br /&gt;&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; &lt;span style="color:#0000ff;"&gt;get&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; {&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; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/font&gt;&lt;/p&gt; &lt;p&gt;And this:&lt;/p&gt; &lt;p&gt;&lt;font size="2" face="Lucida Console"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;public int &lt;/span&gt;Foo&lt;br /&gt;&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; &lt;span style="color:#0000ff;"&gt;set&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; {&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; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/font&gt;&lt;/p&gt; &lt;p&gt;After that, the &lt;strong&gt;IsUnimplemented &lt;/strong&gt;method compares the &lt;strong&gt;ElementType &lt;/strong&gt;of the firstChild against the enum &lt;strong&gt;LanguageElementType.Throw&lt;/strong&gt;. This is done for efficiency -- it&amp;#39;s faster than comparing against the Throw class itself, and a quick way to get out of the IsUnimplemented method for the &lt;strong&gt;majority &lt;/strong&gt;of Property scenarios that are in fact implemented. Performance in availability checks is something we want to maximize for CodeProviders and RefactoringProviders.&lt;/p&gt; &lt;p&gt;The last call in &lt;strong&gt;IsUnimplemented &lt;/strong&gt;is to a method called &lt;strong&gt;Throws&lt;/strong&gt;, which needs to return true if the name of the exception thrown actually matches the one passed in.&lt;/p&gt; &lt;p&gt;And now let&amp;#39;s bring in the &lt;a href="http://www.devexpress.com/Support/Center/KB/p/K18031.aspx" target="_blank"&gt;Expressions Lab&lt;/a&gt;. When using the Expressions Lab to write code that can find structures, I usually place samples of those structures right inside the plug-in code I&amp;#39;m working on, usually inside a method that is never called. This makes exploring the structure and writing code to detect that structure fast and easy. So for this example, I&amp;#39;ll add this line to the code:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt; &lt;p&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff" size="3"&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font size="2" face="Lucida Console"&gt;throw &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font face="Lucida Console"&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;NotImplementedException&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt;();&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;And then check the result inside the Expressions Lab:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;img border="0" alt="ThrowNewNotImplementedException" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/ThrowNewNotImplementedException_52b43a3a-e310-43bc-bdc3-e300de92fd67.png" width="240" height="56" /&gt; &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This three-level structure starts with a &lt;strong&gt;Throw&lt;/strong&gt; object, which parents a DetailNode (in blue). That DetailNode is an &lt;strong&gt;ObjectCreationExpression&lt;/strong&gt;, which in turn has a regular child node (in black) that is a &lt;strong&gt;TypeReferenceExpression&lt;/strong&gt;. That TypeReferenceExpression has a &lt;strong&gt;Name&lt;/strong&gt; property set to &amp;quot;&lt;strong&gt;NotImplementedException&lt;/strong&gt;&amp;quot;. If you click on each of these three nodes inside the Expressions Lab, you can see interesting values for the properties these nodes declare. For example, if you click on the &lt;strong&gt;Throw &lt;/strong&gt;node, you can see that it has an &lt;strong&gt;Expression &lt;/strong&gt;property described as &amp;quot;new NotImplementedException()&amp;quot;, which happens to be the first detail node that you see in blue, above. Often you will find properties like this &lt;strong&gt;Expression &lt;/strong&gt;property, which are there simply to make it easier to access the blue detail nodes of the element.&lt;/p&gt; &lt;p&gt;So based on this exploration, I can create a &lt;strong&gt;Throws&lt;/strong&gt; method that looks like this: &lt;/p&gt; &lt;blockquote&gt;&lt;font face="Lucida Console"&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;bool&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; Throws(&lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;Throw&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; throwStatement, &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; exceptionName)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; (throwStatement == &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;false&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;ObjectCreationExpression&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; expression = throwStatement.Expression &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;as&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;ObjectCreationExpression&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; (expression == &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;false&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;TypeReferenceExpression&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; typeRef = expression.ObjectType&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; (typeRef == &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;false&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;typeRef.Name == exceptionName;&lt;br /&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/blockquote&gt; &lt;p&gt;Now it&amp;#39;s time to test. We haven&amp;#39;t written any code yet to actually fill in the missing implementation for the property. We&amp;#39;ve only written code to see if our CodeProvider should actually be available. So when we test, we&amp;#39;re really only testing the availability check.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Compile and Run&lt;/strong&gt;. A second instance of Visual Studio will start. In that instance, open a source code file that contains an unimplemented property (you might want to create a dedicated test file or project for this), and move the caret so it rests inside that property, and then press the CodeRush/Refactor! key (e.g., Ctrl+`). The Refactor/Code menu will appear, and it should look something like this:&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="ImplementPropertyIsAvailable" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/ImplementPropertyIsAvailable_63376c2f-e913-402d-86cf-92d971b65cae.png" width="412" height="307" /&gt; &lt;/p&gt; &lt;p&gt;And so here we can see our &lt;strong&gt;Implement Property&lt;/strong&gt; CodeProvider is now available in the Code menu. Notice the &lt;strong&gt;description&lt;/strong&gt; added previously now appears inside the light yellow hint to the right. &lt;/p&gt; &lt;p&gt;Now move the caret to a fully-implemented property (e.g., something with backing store), and press the CodeRush/Refactor! key to verify that in this location the &lt;strong&gt;Implement Property &lt;/strong&gt;CodeProvider &lt;strong&gt;does not appear &lt;/strong&gt;on the Refactor/Code menu.&lt;/p&gt; &lt;p&gt;Excellent!&lt;/p&gt; &lt;p&gt;We&amp;#39;re getting closer. The next step is to generate the source code for a new replacement property along with appropriate backing store. This is where things get interesting.&lt;/p&gt; &lt;h3&gt;&lt;span style="color:#00699b;"&gt;Generating the Implemented Property&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;We&amp;#39;ve already seen that when you&amp;#39;re creating plug-ins that work with source code, it is possible to deal with that code in a language-independent manner. This means that with the code we&amp;#39;ve written so far, we would expect to see our &lt;strong&gt;Implement Property &lt;/strong&gt;CodeProvider appear in any other language that supports properties, such as Visual Basic.&lt;/p&gt; &lt;p&gt;It makes sense to have the replacement property generated in a similar language-independent way, so this works regardless of what programming language is active inside of Visual Studio.&lt;/p&gt; &lt;p&gt;If the &lt;strong&gt;second &lt;/strong&gt;instance of &lt;strong&gt;Visual Studio &lt;/strong&gt;is still running, you can &lt;strong&gt;close &lt;/strong&gt;that down.&lt;/p&gt; &lt;p&gt;Let&amp;#39;s handle the &lt;strong&gt;Apply &lt;/strong&gt;event. This event will be fired when you select &amp;quot;&lt;strong&gt;Implement Property&lt;/strong&gt;&amp;quot; from the &lt;strong&gt;Code &lt;/strong&gt;menu. To handle this event, back in the original instance of Visual Studio, &lt;strong&gt;activate &lt;/strong&gt;the &lt;strong&gt;PlugIn1.cs [Design] &lt;/strong&gt;surface, &lt;strong&gt;click &lt;/strong&gt;the &lt;strong&gt;cpImplementUnimplementedProperty &lt;/strong&gt;control, and then on the &lt;strong&gt;Events &lt;/strong&gt;page of the &lt;strong&gt;Properties &lt;/strong&gt;grid, double-click on the &lt;strong&gt;Apply &lt;/strong&gt;event to create a new handler.&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="HandleApply" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/HandleApply_4478f8ce-53f1-4e4c-8ea5-d02cdfc87b73.png" width="624" height="143" /&gt; &lt;/p&gt; &lt;p&gt;The DXCore supports language-independent code generation through a number of API access points, the most robust of which is an &lt;strong&gt;ElementBuilder&lt;/strong&gt;. One of the cool things about the DXCore, is that many of the events pass specialized EventArg descendants filled with useful methods and properties. One of the methods passed through the &lt;strong&gt;ApplyContentEventArgs&lt;/strong&gt; is the &lt;strong&gt;NewElementBuilder&lt;/strong&gt; method. This method creates a new instance of an ElementBuilder, one dedicated to building parse trees for the active language. You can also get an &lt;strong&gt;ElementBuilder&lt;/strong&gt; from the &lt;strong&gt;CodeRush.Language&lt;/strong&gt; service.&lt;/p&gt; &lt;p&gt;Inside the &lt;strong&gt;Apply &lt;/strong&gt;event handler, type in &amp;quot;&lt;strong&gt;ea.&lt;/strong&gt;&amp;quot;, and then select the &amp;quot;&lt;strong&gt;NewElementBuilder&lt;/strong&gt;&amp;quot; method.&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="NewElementBuilder" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/NewElementBuilder_3d84e3f9-d8ba-4a61-a7f3-12a1cade059c.png" width="864" height="313" /&gt; &lt;/p&gt; &lt;p&gt;Add the missing parens and the semi-colon (tip: just press the open paren key and then the semi-colon -- CodeRush will add the closing paren and place the semi-colon outside the parens).&lt;/p&gt; &lt;p&gt;Next, press the CodeRush/Refactor! key and select &lt;strong&gt;Declare Local&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="DeclareLocalElementBuilder" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/DeclareLocalElementBuilder_794bd2ca-8cd9-4ac6-911f-9d8b0763615d.png" width="862" height="134" /&gt; &lt;/p&gt; &lt;p&gt;And you&amp;#39;ll get a line of code looking like this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af" size="3"&gt;&lt;font size="2" face="Lucida Console"&gt;ElementBuilder &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;newElementBuilder = ea.NewElementBuilder();&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;By the way, &lt;strong&gt;Declare Local&lt;/strong&gt;, a feature that you&amp;#39;ve likely seen in CodeRush already, is a &lt;strong&gt;CodeProvider&lt;/strong&gt;, just like the feature we&amp;#39;re building now. &lt;/p&gt; &lt;p&gt;Now that we have our ElementBuilder, let&amp;#39;s add some elements. But to do this we need more information about the property we&amp;#39;ll be creating. For example, we need to know its type, its name, and whether it has a getter and/or a setter. We can get all that information from the property we&amp;#39;re replacing. How can we get to the property structure so we can query it? We can simply call that GetProperty method we added before, passing in the ea.Element:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt; oldProperty = GetProperty(ea.Element);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The &lt;strong&gt;ea &lt;/strong&gt;argument for the &lt;strong&gt;Apply &lt;/strong&gt;event also includes an &lt;strong&gt;Element &lt;/strong&gt;property. Cool. &lt;/p&gt; &lt;p&gt;OK, so now we have a reference to the oldProperty (the one we&amp;#39;ll be replacing), and we have an ElementBuilder. Based on these two, I now have an Apply event handler that looks like this:&lt;/p&gt; &lt;blockquote&gt;&lt;font face="Lucida Console"&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; cpImplementUnimplementedProperty_Apply(&lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; sender, &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;ApplyContentEventArgs&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; ea)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; oldProperty = GetProperty(ea.Element);&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; (oldProperty == &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;ElementBuilder&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; elementBuilder = ea.NewElementBuilder();&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;string &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;newCode = GetNewPropertyDeclaration(elementBuilder, oldProperty);&lt;br /&gt;&amp;nbsp; ea.TextDocument.Replace(oldProperty.Range, newCode, &lt;font color="#800000"&gt;&amp;quot;Implement Property&amp;quot;&lt;/font&gt;, &lt;font color="#0000ff"&gt;true&lt;/font&gt;);&lt;br /&gt;}&lt;/font&gt;&lt;/span&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;We&amp;#39;ll discuss the last line of code in this method a little later. For now we&amp;#39;ll focus on the call to &lt;strong&gt;GetNewPropertyDeclaration&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;The &lt;strong&gt;GetNewPropertyDeclaration&lt;/strong&gt; method needs to generate a new property declaration based on the oldProperty. This method needs to generate a new property based on the existing one, replacing the calls to throw exceptions with real code that accesses the backing store of a field variable. Let&amp;#39;s take this method a piece at a time, and then at the end we&amp;#39;ll see the whole thing as a single method.&lt;/p&gt; &lt;p&gt;First, we need to get the name and type of the property to declare, as well as an appropriate name for the field variable. That code looks like this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;font color="#0000ff"&gt;&lt;font color="#0000ff"&gt;&lt;font face="Lucida Console"&gt;private&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt; GetNewPropertyDeclaration(&lt;/font&gt;&lt;font color="#2b91af"&gt;&lt;font color="#2b91af"&gt;ElementBuilder&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt; elementBuilder, &lt;/font&gt;&lt;font color="#2b91af"&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;font color="#000000"&gt; oldProperty)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff"&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;font color="#000000"&gt; propName = oldProperty.Name;&lt;br /&gt;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff"&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;font color="#000000"&gt; typeName = oldProperty.GetTypeName();&lt;br /&gt;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff"&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt; fieldVariableName = &lt;/font&gt;&lt;font color="#2b91af"&gt;&lt;font color="#2b91af"&gt;CodeRush&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000"&gt;.Strings.Get(&lt;/font&gt;&lt;font color="#a31515"&gt;&lt;font color="#a31515"&gt;&amp;quot;FormatFieldName&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" face="Lucida Console"&gt;, propName);&lt;br /&gt;&amp;nbsp; ...&lt;br /&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The most interesting line of code here is the the call into CodeRush.Strings.Get. This is turn makes a call into a StringProvider named &amp;quot;&lt;strong&gt;FormatFieldName&lt;/strong&gt;&amp;quot;. This StringProvider formats the passed-in parameter (&lt;strong&gt;propName&lt;/strong&gt;) so it matches your style for field declarations. You can change the style for identifiers in the &lt;strong&gt;Editor\Code Style\Identifiers&lt;/strong&gt; options page.&lt;/p&gt; &lt;p&gt;By the way, this StringProvider is used in a number of templates, including templates that generate properties with backing store. You can find documentation for this and other StringProviders in the CodeRush &lt;strong&gt;User Guide&lt;/strong&gt;, in the &lt;strong&gt;Reference\String Providers&lt;/strong&gt; section.&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="ClickFormatFieldName" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/ClickFormatFieldName_208aa115-039a-4b11-8add-1d0baca75700.png" width="659" height="538" /&gt;&lt;/p&gt; &lt;p&gt;Here&amp;#39;s what you will see when you click the FormatFieldName link:&lt;/p&gt; &lt;p&gt;&lt;img style="border-right-width:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" border="0" alt="FormatFieldName" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/FormatFieldName_a1f69761-6497-43da-8487-d1804de92e2e.png" width="663" height="544" /&gt;&lt;/p&gt; &lt;p&gt;Next, we need to add the backing store declaration to the elementBuilder, like this:&lt;span style="font-size:small;"&gt;&lt;font size="3"&gt;&lt;/p&gt; &lt;blockquote&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Lucida Console"&gt;&lt;font color="#2b91af"&gt;&lt;font color="#2b91af"&gt;&amp;nbsp; Variable&lt;/font&gt;&lt;/font&gt; fieldVar = elementBuilder.AddVariable(&lt;font color="#0000ff"&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/font&gt;, typeName, fieldVariableName);&lt;br /&gt;&amp;nbsp; fieldVar.IsStatic = oldProperty.IsStatic;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/blockquote&gt; &lt;p&gt;So the &lt;strong&gt;AddVariable &lt;/strong&gt;method on ElementBuilder generates a tree structure that looks like this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;img border="0" alt="TreeVariable" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/TreeVariable_f8a91c87-c239-4ebe-a296-caeffd65df60.png" width="101" height="52" /&gt; &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;It&amp;#39;s a Variable named &amp;quot;_Foo&amp;quot; (or whatever value you pass in through fieldVariableName) with a DetailNode that is a TypeReferenceExpression named &amp;quot;int&amp;quot; (or whatever value you pass in through typeName). When generated, this tree structure will become this in C#:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;&lt;font color="#0000ff"&gt;int&lt;/font&gt; _Foo;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Next we need to add the property declaration to the elementBuilder, like this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt; newProperty = elementBuilder.AddProperty(&lt;font color="#0000ff"&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/font&gt;, typeName, propName);&lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;newProperty.Visibility = oldProperty.Visibility;&lt;br /&gt;newProperty.IsStatic = oldProperty.IsStatic;&lt;br /&gt;newProperty.IsVirtual = oldProperty.IsVirtual;&lt;br /&gt;newProperty.IsOverride = oldProperty.IsOverride;&lt;br /&gt;newProperty.IsExplicitInterfaceMember = oldProperty.IsExplicitInterfaceMember;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;ElementBuilder&amp;#39;s Add methods create the specified element and then add that element to the specified parent (the first parameter to the AddXxxxxxx methods). In both of these cases so far, the first parameter passed in was &lt;span style="color:#0000ff;"&gt;&lt;strong&gt;null&lt;/strong&gt;&lt;/span&gt;, which means these elements will be added to ElementBuilder&amp;#39;s TopLevelElements collection. Later, when we call ElementBuilder&amp;#39;s GenerateCode method, code will be generated for all the LanguageElements contained in the TopLevelElements collection.&lt;/p&gt; &lt;p&gt;Notice also in the code above how we can modify the references returned by ElementBuilder&amp;#39;s &lt;strong&gt;Add&lt;/strong&gt;Xxxxxx&lt;strong&gt; &lt;/strong&gt;calls. ElementBuilder&amp;#39;s AddProperty method generates a tree structure that looks like this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;img border="0" alt="TreeProperty" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/TreeProperty_7719dd80-9ad3-42a6-9086-b7199c315a3c.png" width="86" height="52" /&gt; &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;It&amp;#39;s a Property named &amp;quot;Foo&amp;quot; (or whatever value you pass in through propName) with a DetailNode that is a TypeReferenceExpression named &amp;quot;int&amp;quot; (or whatever value you pass in through typeName). This Property element does not yet have a getter or a setter, so let&amp;#39;s add those code blocks to the &lt;strong&gt;newProperty &lt;/strong&gt;reference (the local variable that gets the result of the AddProperty call).&lt;/p&gt; &lt;p&gt;Here&amp;#39;s code to add the &lt;strong&gt;getter&lt;/strong&gt;:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:small;"&gt;&amp;nbsp; &lt;font color="#0000ff"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/font&gt; (oldProperty.HasGetter)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#2b91af"&gt;&lt;font color="#2b91af"&gt;Get&lt;/font&gt;&lt;/font&gt; getter = elementBuilder.AddGetter(newProperty);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elementBuilder.AddReturn(getter, fieldVariableName);&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;By storing the result of an ElementBuilder.AddXxxxxx call, and then later passing that LanguageElement back in as the &lt;strong&gt;parent&lt;/strong&gt; (first argument) in subsequent &lt;strong&gt;ElementBuilder.Add&lt;/strong&gt;Xxxxxx calls, we are able to generate &lt;strong&gt;hierarchical structures&lt;/strong&gt; to match the code we want. The call to &lt;strong&gt;AddReturn&lt;/strong&gt;, above, generates a &lt;strong&gt;return statement &lt;/strong&gt;returning the passed-in fieldVariableName. The tree for the getter looks like this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;img border="0" alt="TreeGetter" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/TreeGetter_2ae9fe56-7b04-4409-a1ce-5cc8ad0c3564.png" width="127" height="79" /&gt;&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;And corresponds to code like this in C#:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;&lt;font color="#0000ff"&gt;get&lt;/font&gt;&lt;br /&gt;{&lt;br /&gt;&lt;font color="#0000ff"&gt;&amp;nbsp; return&lt;/font&gt; _Foo;&lt;br /&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Next we&amp;#39;ll add the &lt;strong&gt;setter&lt;/strong&gt;, if necessary:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;&lt;font color="#0000ff"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/font&gt; (oldProperty.HasSetter)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &lt;font color="#2b91af"&gt;&lt;font color="#2b91af"&gt;Set&lt;/font&gt;&lt;/font&gt; setter = elementBuilder.AddSetter(newProperty);&lt;br /&gt;&amp;nbsp; elementBuilder.AddAssignment(setter, fieldVariableName, &lt;font color="#a31515"&gt;&lt;font color="#a31515"&gt;&amp;quot;value&amp;quot;&lt;/font&gt;&lt;/font&gt;);&lt;br /&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The call to &lt;strong&gt;AddAssignment&lt;/strong&gt;, above, creates a statement that assigns &amp;quot;value&amp;quot; to the fieldVariableName. The tree for this segment looks like this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;img border="0" alt="TreeSetter" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/TreeSetter_f53aa4b0-e67c-47e0-b70c-aa3e859474bb.png" width="153" height="100" /&gt; &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;So far, the tree we&amp;#39;ve built using the ElementBuilder looks like this (with &lt;strong&gt;_Foo&lt;/strong&gt;, &lt;strong&gt;Foo&lt;/strong&gt;, and &lt;strong&gt;int &lt;/strong&gt;being replaced with the values you&amp;#39;ve passed in for field variable name, property name, and type name respectively):&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;img border="0" alt="TreeSoFar" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/TreeSoFar_04c95d66-7d98-4574-8f13-54908e7ea7d0.png" width="213" height="302" /&gt;&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Finally we can get all of the generated code as a string so we can insert it into the document, by calling &lt;strong&gt;GenerateCode&lt;/strong&gt;:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;&lt;font color="#0000ff"&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/font&gt; elementBuilder.GenerateCode();&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The entire method looks like this:&lt;/p&gt; &lt;blockquote&gt;&lt;font face="Lucida Console"&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; GetNewPropertyDeclaration(&lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;ElementBuilder&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; elementBuilder, &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; oldProperty)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; propName = oldProperty.Name;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; typeName = oldProperty.GetTypeName();&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;string&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; fieldVariableName = &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;CodeRush&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt;.Strings.Get(&lt;/span&gt;&lt;span style="color:#a31515;font-size:small;"&gt;&lt;font color="#a31515"&gt;&amp;quot;FormatFieldName&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;, propName);&lt;br /&gt;&lt;br /&gt;&lt;font color="#2b91af"&gt;&amp;nbsp; Variable&lt;/font&gt; fieldVar = elementBuilder.AddVariable(&lt;font color="#0000ff"&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/font&gt;, typeName, fieldVariableName);&lt;br /&gt;&amp;nbsp; fieldVar.IsStatic = oldProperty.IsStatic;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;Property&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; newProperty = elementBuilder.AddProperty(&lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;, typeName, propName);&lt;br /&gt;&amp;nbsp; newProperty.Visibility = oldProperty.Visibility;&lt;br /&gt;&amp;nbsp; newProperty.IsStatic = oldProperty.IsStatic;&lt;br /&gt;&amp;nbsp; newProperty.IsVirtual = oldProperty.IsVirtual;&lt;br /&gt;&amp;nbsp; newProperty.IsOverride = oldProperty.IsOverride;&lt;br /&gt;&amp;nbsp; newProperty.IsExplicitInterfaceMember = oldProperty.IsExplicitInterfaceMember;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; (oldProperty.HasGetter)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;Get&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; getter = elementBuilder.AddGetter(newProperty);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elementBuilder.AddReturn(getter, fieldVariableName);&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; (oldProperty.HasSetter)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;Set&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; setter = elementBuilder.AddSetter(newProperty);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elementBuilder.AddAssignment(setter, fieldVariableName, &lt;/span&gt;&lt;span style="color:#a31515;font-size:small;"&gt;&lt;font color="#a31515"&gt;&amp;quot;value&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;);&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;elementBuilder.GenerateCode();&lt;br /&gt;}&lt;/font&gt;&lt;/span&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Before we test this, let&amp;#39;s look at that last line of code in our &lt;strong&gt;Apply &lt;/strong&gt;event handler:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;ea.TextDocument.Replace(oldProperty.Range, newCode, &lt;font color="#800000"&gt;&amp;quot;Implement Property&amp;quot;&lt;/font&gt;, &lt;font color="#0000ff"&gt;true&lt;/font&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This line calls Replace on the active TextDocument. Replace accepts a SourceRange of code to replace (in this case, the oldProperty), the newly-generated code, a display string to describe the operation (for the undo/redo stack), and an optional parameter to specify whether the newCode we pass in should be formatted or not. Visual Studio&amp;#39;s active language service (e.g., C#, Visual Basic, etc) performs the formatting based on formatting options you&amp;#39;ve defined for that language in the Visual Studio options dialog. In most cases you will want to pass in &lt;strong&gt;true &lt;/strong&gt;for this last parameter, as that will ensure the generated code is properly indented and matches the coding styles defined in Visual Studio.&lt;/p&gt; &lt;p&gt;And that wraps up the explanation of the code needed to generate the implemented property. It&amp;#39;s time to test once again.&lt;/p&gt; &lt;h3&gt;&lt;span style="color:#00699b;"&gt;Testing Code Generation&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;Click &lt;strong&gt;Run&lt;/strong&gt;. In the second instance of Visual Studio, find an unimplemented property and press the CodeRush/Refactor key to apply this CodeProvider. &lt;/p&gt; &lt;p&gt;Starting with this sample code in C#... &lt;/p&gt; &lt;blockquote&gt;&lt;font face="Lucida Console"&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;int&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt; Foo&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff" face="Lucida Console"&gt;get&lt;br /&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;{&lt;br /&gt;&lt;font color="#0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;throw&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;NotImplementedException&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;();&lt;br /&gt;&lt;font color="#0000ff"&gt;&amp;nbsp; &lt;/font&gt;}&lt;br /&gt;&lt;font color="#0000ff"&gt;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff" face="Lucida Console"&gt;set&lt;br /&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;{&lt;br /&gt;&lt;font color="#0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;throw&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#2b91af;font-size:small;"&gt;&lt;font color="#2b91af"&gt;NotImplementedException&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;();&lt;br /&gt;&lt;font color="#0000ff"&gt;&amp;nbsp; &lt;/font&gt;}&lt;br /&gt;}&lt;/font&gt;&lt;/span&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;After applying &lt;strong&gt;Implement Property&lt;/strong&gt; I get this:&lt;span style="font-size:small;"&gt;&lt;font size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;blockquote&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff" face="Lucida Console"&gt;int&lt;/font&gt;&lt;/span&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt; _Foo;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;int&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt; Foo&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;&lt;font face="Lucida Console"&gt;get&lt;br /&gt;&lt;font color="#000000"&gt;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt; _Foo;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;&lt;font face="Lucida Console"&gt;set&lt;br /&gt;&lt;font color="#000000"&gt;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font face="Lucida Console"&gt;&lt;span style="font-size:small;"&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _Foo = &lt;/span&gt;&lt;span style="color:#0000ff;font-size:small;"&gt;&lt;font color="#0000ff"&gt;value&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;}&lt;/font&gt;&lt;/span&gt; &lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2" face="Lucida Console"&gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Nice!&lt;/p&gt; &lt;h3&gt;&lt;span style="color:#00699b;"&gt;Undo and Redo&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;Notice also right after applying this CodeProvider, the top entry in the undo stack reads &amp;quot;Implement Property&amp;quot;:&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="UndoImplementProperty" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/UndoImplementProperty_c32e32a3-eb4f-4aaf-a79b-75e2cabb3bd1.png" width="156" height="78" /&gt; &lt;/p&gt; &lt;p&gt;The undo entry has been added for us automatically through the call to TextDocument.Replace.&lt;/p&gt; &lt;h3&gt;&lt;span style="color:#00699b;"&gt;Adding a Preview Hint&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;The only thing missing to make this a professional-grade CodeProvider is a &lt;strong&gt;preview hint&lt;/strong&gt;. Preview hints show what will happen &lt;em&gt;before &lt;/em&gt;the menu item is selected. For example, here&amp;#39;s the preview hint for &lt;strong&gt;Extract Method &lt;/strong&gt;for a selection inside our &lt;strong&gt;GetNewPropertyDeclaration &lt;/strong&gt;method:&lt;/p&gt; &lt;p&gt;&lt;img style="border-right-width:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" border="0" alt="ExtractMethodPreviewHint" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/ExtractMethodPreviewHint_702c06da-c84b-4664-a3aa-9be53f291b02.png" width="582" height="417" /&gt; &lt;/p&gt; &lt;p&gt;Let&amp;#39;s add that now. Close down the second instance of Visual Studio if it&amp;#39;s still running. Activate &lt;strong&gt;PlugIn1.cs [Design]&lt;/strong&gt; and select the &lt;strong&gt;cpImplementUnimplementedProperty&lt;/strong&gt; CodeProvider.&lt;/p&gt; &lt;p&gt;Double-click the PreparePreview event to create a handler....&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="PreparePreview" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/PreparePreview_43c32f80-7916-4643-9901-25f9035e5084.png" width="664" height="275" /&gt; &lt;/p&gt; &lt;p&gt;The PreparePreview event is fired whenever the mouse hovers over an item in the CodeRush/Refactor menu, or when the keyboard is used to highlight entries and an entry has been highlighted for more than a few moments. So when this event fires your CodeProvider has already determined that it is available. So the sequence of events usually looks like this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;CheckAvailability &lt;/strong&gt;-&amp;gt; &lt;strong&gt;PreparePreview &lt;/strong&gt;-&amp;gt; &lt;strong&gt;Apply&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Note that it can also be like this if the menu item is selected very quickly or if only one refactoring or code provider is available:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;CheckAvailability &lt;/strong&gt;-&amp;gt; &lt;strong&gt;Apply&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;And it can also be like this if a refactoring or code provider is invoked programmatically by another plug-in:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;Apply&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The code for our &lt;strong&gt;PreparePreview&lt;/strong&gt; event handler looks like this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;&lt;font color="#0000ff"&gt;private void &lt;/font&gt;cpImplementUnimplementedProperty_PreparePreview(&lt;font color="#0000ff"&gt;object &lt;/font&gt;sender, &lt;font color="#008080"&gt;PrepareContentPreviewEventArgs&lt;/font&gt; ea)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &lt;font color="#008080"&gt;Property&lt;/font&gt; oldProperty = GetProperty(ea.Element);&lt;br /&gt;&amp;nbsp; &lt;font color="#0000ff"&gt;if &lt;/font&gt;(oldProperty == &lt;font color="#0000ff"&gt;null&lt;/font&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;return&lt;/font&gt;;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp; &lt;font color="#008080"&gt;ElementBuilder &lt;/font&gt;elementBuilder = ea.NewElementBuilder();&lt;br /&gt;&amp;nbsp; &lt;font color="#0000ff"&gt;string &lt;/font&gt;newCode = GetNewPropertyDeclaration(elementBuilder, oldProperty);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Lucida Console"&gt;&amp;nbsp; ea.AddCodePreview(oldProperty.Range.Start, newCode.Trim());&lt;br /&gt;&amp;nbsp; ea.AddStrikethrough(oldProperty.Range);&lt;br /&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:small;"&gt;&lt;/span&gt;&lt;/blockquote&gt; &lt;p&gt;Notice starts off similarly to the code in our Apply event handler. We get the Property to refactor, and get the source code that will replace it. The most interesting part of this handler are the last two lines. &lt;/p&gt; &lt;p&gt;The first, a call to AddCodePreview, creates a floating window containing the specified source code with a small arrow which points to the specified SourcePoint (in this case the start of the oldProperty).&lt;/p&gt; &lt;p&gt;The last line calls AddStrikethrough, which crosses out the code within the specified range. &lt;/p&gt; &lt;p&gt;Run and test. You should get something like this:&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="ImplementPropertyPreviewHint" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/ImplementPropertyPreviewHint_f79e59ed-d45e-416a-88ae-42d90c821fde.png" width="447" height="625" /&gt; &lt;/p&gt; &lt;h3&gt;&lt;span style="color:#00699b;"&gt;Language Independence&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;In the CodeProvider we just built you&amp;#39;ll notice that we didn&amp;#39;t write any code specific to any particular programming language. We just built the tree we wanted to generate using the ElementBuilder. As a result, this CodeProvider will work in any language supported by the DXCore (any language that also supports properties, classes, and field variables). To prove this, open up a Visual Basic file and try it out. You should see something like this:&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="PreviewHintVB" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeProviders101ImplementingUnimplemente_E2ED/PreviewHintVB_e01a7afb-8651-42bf-9c93-3dca7d2b5d74.png" width="470" height="486" /&gt; &lt;/p&gt; &lt;p&gt;That&amp;#39;s it! I hope this helps make it easier for you to add your own refactorings and code providers to the DXCore! Let me know if you have any questions or would like to see more tutorials like this in the future.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=270140" width="1" height="1"&gt;</description></item><item><title>What's New in CodeRush 9.2</title><link>http://community.devexpress.com/blogs/markmiller/archive/2009/07/15/what-s-new-in-coderush-9-2.aspx</link><pubDate>Wed, 15 Jul 2009 22:20:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:269154</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>14</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=269154</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2009/07/15/what-s-new-in-coderush-9-2.aspx#comments</comments><description>&lt;p&gt;Here&amp;#39;s what you can expect in the CodeRush 9.2 release.&lt;/p&gt;
&lt;h3&gt;&lt;span style="color:#00699b;"&gt;Faster Performance&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;A new symbol cache, built the first time you open a solution improves the speed of subsequent solution parses dramatically. Now the speed to go from opening a solution to being able to refactor anywhere in that code base increases by 200%-500% for large solutions. More details on the performance improvements can be found &lt;a target="_blank" href="http://community.devexpress.com/blogs/markmiller/archive/2009/06/17/performance-and-memory-milestones-in-coderush-and-refactor-pro-preview-of-9-2.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Additional performance enhancements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First startup after install is now significantly faster -- plug-in profile data now ships with the install and the plug-in profiling step is no longer part of the first startup.&lt;/li&gt;
&lt;li&gt;Background parsing, if running, is now suppressed during a solution build.&lt;/li&gt;
&lt;li&gt;Plug-in loader engine performance has been improved.&lt;/li&gt;
&lt;li&gt;The time to find all references has been reduced. &lt;/li&gt;
&lt;li&gt;Code issue checking time has been reduced. &lt;/li&gt;
&lt;li&gt;Incremental parser performance has been improved. &lt;/li&gt;
&lt;li&gt;Visual element painting time has been reduced. &lt;/li&gt;
&lt;li&gt;Availability checks for code providers are now executed in less time. &lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;span style="color:#00699b;"&gt;Reduced Memory Consumption&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;CodeRush 9.2 uses dramatically less memory. Project symbols are now cached, and only loaded when needed. Recently-accessed members are kept in memory, while stale members are aggressively released. As a result, customers with large solutions can expect reductions in overall memory consumption by 100MB-200MB. More details on the memory savings can be found &lt;a target="_blank" href="http://community.devexpress.com/blogs/markmiller/archive/2009/06/17/performance-and-memory-milestones-in-coderush-and-refactor-pro-preview-of-9-2.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;span style="color:#00699b;"&gt;Manual Load and Unload&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Normally CodeRush loads on startup, and unloads when Visual Studio shuts down. CodeRush 9.2 adds the ability to defer loading to another time after startup, and also adds the ability to unload CodeRush while Visual Studio remains running. This may be useful for developers running into memory issues (e.g., very large solutions open in many instances of Visual Studio).&lt;/p&gt;
&lt;p&gt;You can defer the CodeRush startup time to a time of your choosing on the CodeRush Startup options page. Check the &amp;quot;Load manually&amp;quot; checkbox and restart.&lt;/p&gt;
&lt;p&gt;&lt;img height="199" width="519" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/WhatsNewinCodeRush9.2_E881/ide-tools-startup-options_ef037c64-5730-4a02-846e-08bae0cf1ad2.png" alt="ide-tools-startup-options" border="0" /&gt; &lt;/p&gt;
&lt;p&gt;The next time Visual Studio starts, there will be a DevExpress menu item with a single entry, &amp;quot;Load&amp;quot;. Selecting this entry will load CodeRush and any other third-party plug-ins that rely upon the DXCore.&lt;/p&gt;
&lt;p&gt;&lt;img height="106" width="452" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/WhatsNewinCodeRush9.2_E881/ide-tools-manual-load_a7322adc-5c91-403c-aaa2-dd6185ab9dc3.png" alt="ide-tools-manual-load" border="0" /&gt; &lt;/p&gt;
&lt;h3&gt;&lt;span style="color:#00699b;"&gt;Settings Merge on Upgrade&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;With this release we introduce a new XML storage engine for CodeRush settings. This settings engine is backwards compatible - customer settings stored in the older INI files are merged with new settings stored in XML files (the INI files are &lt;strong&gt;not &lt;/strong&gt;deleted). This engine will allow DevExpress to enhance default settings without losing customer changes.&lt;/p&gt;
&lt;h3&gt;&lt;span style="color:#00699b;"&gt;Support for Preprocessor Directives&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Conditional compiler directives are now supported.&lt;/p&gt;
&lt;h3&gt;&lt;span style="color:#00699b;"&gt;Background Processing Progress Bar&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;CodeRush now shows progress for background parsing and symbol loading as you open a new solution. This progress bar is essentially your countdown to the moment when you can refactor instantly anywhere in the code. Note that you can work normally with Visual Studio before the background parse process ends. Closing this window does not break the background parsing process.&lt;/p&gt;
&lt;p&gt;&lt;img height="56" width="219" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/WhatsNewinCodeRush9.2_E881/ide-tools-load-progress_c9089191-86fe-4586-a3f7-b9068b85871d.png" alt="ide-tools-load-progress" border="0" /&gt; &lt;/p&gt;
&lt;h3&gt;&lt;span style="color:#00699b;"&gt;DXCore Version Switcher&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;The DXCore Version Switcher lets you switch among several versions of DevExpress IDE Tools installed side-by-side.&lt;/p&gt;
&lt;p&gt;&lt;img height="488" width="558" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/WhatsNewinCodeRush9.2_E881/ide-tools-version-switcher_8a6bc273-a6ce-46fa-9255-faaf91c83e83.png" alt="ide-tools-version-switcher" border="0" /&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=269154" width="1" height="1"&gt;</description></item><item><title>CodeRush Xpress for C# and Visual Basic inside Visual Studio 2008</title><link>http://community.devexpress.com/blogs/markmiller/archive/2009/06/25/coderush-xpress-for-c-and-visual-basic-2008.aspx</link><pubDate>Thu, 25 Jun 2009 20:00:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:264990</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>41</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=264990</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2009/06/25/coderush-xpress-for-c-and-visual-basic-2008.aspx#comments</comments><description>&lt;p&gt;&lt;a target="_blank" href="http://www.devexpress.com/crx"&gt;&lt;img height="37" width="98" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/Download_e69f69b4-7c67-44d6-82b2-57237fa70d61.png" alt="Download CodeRush Xpress - free from Dev Express!" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;CodeRush Xpress is a powerful developer productivity tool from Dev Express. The product is free, licensed by Microsoft on behalf of all developers working in Visual Studio 2008 in all paid-for product skus (e.g., Standard, Professional, Team System). Note however that CodeRush Xpress &lt;strong&gt;will not load&lt;/strong&gt; in the Express Editions of Visual Studio.&lt;/p&gt;
&lt;p&gt;CodeRush Xpress includes features that support common developer tasks in the following areas:&lt;/p&gt;
&lt;p&gt;&lt;img height="302" width="306" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/FeatureSummary_1093823b-8234-41da-80bc-9d84f5f82f89.png" alt="FeatureSummary" border="0" /&gt; &lt;/p&gt;
&lt;p&gt;CodeRush Xpress fully supports all language features of &lt;strong&gt;Visual Basic&lt;/strong&gt; and &lt;strong&gt;C#&lt;/strong&gt; in &lt;strong&gt;Visual Studio 2008&lt;/strong&gt;. If a specific feature applies to only one of these two languages, it will be noted with one of these icons:&lt;/p&gt;
&lt;p&gt;&lt;img height="39" width="62" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/VB_deb51164-1e31-49e5-b900-0e0b55173b69.png" alt="VB" border="0" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img height="39" width="62" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/C__20f54d8e-ab82-4769-9389-91cee740bbb7.png" alt="C#" border="0" /&gt;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;More details on CodeRush Xpress functionality follow.&lt;/p&gt;
&lt;p&gt;&lt;img height="145" width="142" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/NavigateFeatures_56439a8e-0b6e-4516-947e-1b14989e12c6.png" alt="NavigateFeatures" border="0" /&gt;&lt;/p&gt;
&lt;h1&gt;&lt;span style="color:#009b07;"&gt;Navigate&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;CodeRush Xpress includes seven powerful navigation features to make getting to that important location fast and easy.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#009b07;"&gt;Camel Case Navigation&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;You can move among the lowercase-to-uppercase transitions using Camel Case Nav. &lt;/p&gt;
&lt;p&gt;To move right, hold down the &lt;strong&gt;Alt &lt;/strong&gt;key and press the &lt;strong&gt;Right &lt;/strong&gt;arrow key inside a camel case identifier.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="53" width="403" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CamelCaseRight_9ef20811-8f55-4c06-a939-09e42409b76b.png" alt="CamelCaseRight" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To move left, hold down the &lt;strong&gt;Alt &lt;/strong&gt;key and press the &lt;strong&gt;Left &lt;/strong&gt;arrow key inside a camel case identifier.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="52" width="407" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CamelCaseLeft_6d66cd74-9584-444d-9782-336e9aa60bc9.png" alt="CamelCaseLeft" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Camel Case Nav is useful when you want to rename an identifier and change the name in a manner that keeps a portion of the existing camel case identifier. For example, if an existing identifier was called &amp;quot;StartTasks&amp;quot; and you wanted to rename it to &amp;quot;StartFilteredTasks&amp;quot;, you could use Camel Case Nav to instantly get the caret between the &amp;quot;Start&amp;quot; and &amp;quot;Tasks&amp;quot; parts before typing in the new part.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#009b07;"&gt;Collect Marker&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Whenever a CodeRush Xpress feature takes you to a new place in the code, CodeRush Xpress drops a stack-based marker at the original location. You can return to the original location (collecting the marker and popping it off the stack) by pressing &lt;strong&gt;Escape&lt;/strong&gt; (when no other tool tip windows or context menus are active).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="170" width="665" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CollectingMarkers_e4e526c7-a03f-4527-b24c-5f4faf5631cc.png" alt="CollectingMarkers" border="0" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When you press Escape, CodeRush Xpress animates a small locator beacon around the marker. This locator beacon is useful when your eyes are looking elsewhere on the screen, especially if you work with a large monitor. CodeRush Xpress also attempts to shift the code vertically so its position is roughly equivalent to what it was when you last viewed it. &lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#009b07;"&gt;Structural Highlighting&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Structural Highlighting helps you visually navigate the structure of the code. Matching delimiters are connected with low-contrast lines that are easy to read when this information is useful, and easy to ignore when your mind is on the code. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="362" width="1023" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/Structural%20Highlighting_3d178055-077b-4532-8fdd-02e71f144e28.png" alt="Structural Highlighting" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Structural Highlighting is useful for understanding the flow of large methods or third-party C# code using a different leading brace position than you might otherwise work with.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#009b07;"&gt;Tab to Next Reference&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;You can quickly jump to the active identifier&amp;#39;s next reference in the solution file by pressing the &lt;strong&gt;Tab&lt;/strong&gt; key (as long as the caret is somewhere inside the identifier). All matching references (and declaration) to this identifier will be underlined and the selection will move to the next reference. Continuing to press the &lt;strong&gt;Tab&lt;/strong&gt; key will cycle through all identifiers in the solution. &lt;strong&gt;Shift&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;Tab&lt;/strong&gt; brings you back. You can also press &lt;strong&gt;Escape&lt;/strong&gt; to return to the starting location (where the Tab to Next Reference feature was first invoked on this identifier).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="212" width="648" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/TabToNextReference_045f897f-40fa-42f5-b43c-5a2f5067e60f.png" alt="TabToNextReference" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Tab to Next Reference is useful when you want to quickly visit all references to a particular identifier or type.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#009b07;"&gt;Highlight All References&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Highlight All References is visually similar to Tab to Next Reference, however it does not move the caret. Just press &lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;Alt&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;U&lt;/strong&gt; to see all references to the active identifier.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="408" width="894" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/HighlightAllReferences_2885e411-c6df-462d-90f7-cdacd22c7acd.png" alt="HighlightAllReferences" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;span style="color:#009b07;"&gt;Quick Navigation&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Quickly find a type,&amp;nbsp;member, class, field or variable using Quick Nav. Just press &lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;Shift&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;Q &lt;/strong&gt;to bring up the &lt;strong&gt;Quick Navigation&lt;/strong&gt; window.&lt;/p&gt;
&lt;p&gt;You can filter the list by entering a portion of the identifier text you are looking for. If you hold down the &lt;strong&gt;Shift &lt;/strong&gt;key and enter uppercase letters, you can find all identifiers named with those uppercase letters, as in the example below:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="176" width="310" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/Quick%20Navigation%20-%20Smart%20Filtering_2c37a9cf-5771-466a-a468-814cc7a4aea2.png" alt="Quick Navigation - Smart Filtering" border="0" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You can preview the target location by holding down the &lt;strong&gt;Ctrl &lt;/strong&gt;key. To jump to the selected symbol, press &lt;strong&gt;Enter&lt;/strong&gt;. To return to the starting location, press &lt;strong&gt;Escape&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#009b07;"&gt;Quick File Navigation&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Quickly find and open any file in your solution. Just press &lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;Alt&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;F &lt;/strong&gt;to bring up the &lt;strong&gt;Quick File Navigation&lt;/strong&gt; window. The filtering mechanism in this window is similar to what we&amp;#39;ve just seen in the Quick Navigation window. Just enter a few letters from the file name. CodeRush Xpress will filter down the list. Use the &lt;strong&gt;Up &lt;/strong&gt;and &lt;strong&gt;Down &lt;/strong&gt;arrow keys to select the file you want to jump to, and press &lt;strong&gt;Enter &lt;/strong&gt;to go there (or &lt;strong&gt;Escape &lt;/strong&gt;to close the Quick File Navigation window and return to where you were).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="228" width="300" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/QuickFileNavigation_cbc6bc15-7897-48a5-b607-0d536eeab848.png" alt="QuickFileNavigation" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img height="145" width="142" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/SelectFeatures_46463cac-fdce-4745-92fe-0015b3a5b9a3.png" alt="SelectFeatures" border="0" /&gt;&lt;/p&gt;
&lt;h1&gt;&lt;span style="color:#8e3e0d;"&gt;Select&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;CodeRush Xpress includes five intelligent features for selecting code more efficiently.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#8e3e0d;"&gt;Camel Case Select&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;If you need to select one or more words from inside a camel-case identifier, just use the Shift key along with the Camel Case Nav keys.&lt;/p&gt;
&lt;p&gt;For example, to select from the caret to the start of the camel case part to the left, use &lt;strong&gt;Alt&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;Shift&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;Left&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="52" width="407" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CamelCaseSelect_1de139cf-a38e-4e6d-9f31-0c79dcd5b4da.png" alt="CamelCaseSelect" border="0" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;span style="color:#8e3e0d;"&gt;Selection Increase&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;First, there is a command to increase the selection by logical blocks. For example, if the caret is inside an expression, you can quickly expand the selection so it entirely holds the expression. Being able to quickly define a selection around a logical block is useful for refactoring. You can also use it to quickly select code you want to move to another location. This command is bound to a shortcut: &lt;strong&gt;Alt&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;Shift&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;=&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#8e3e0d;"&gt;Selection Reduce&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;If you accidentally overshoot the block you want to select, you can reduce the selection by logical blocks using &lt;strong&gt;Alt&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;Shift&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;-&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#8e3e0d;"&gt;Intelligent Cut, Intelligent Copy, and Paste Replace&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;If you need to cut or copy an identifier to the clipboard, there&amp;#39;s no need to select it with CodeRush Xpress. Just place the caret on the identifier and press the cut or copy key (e.g., &lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;X&lt;/strong&gt;, &lt;strong&gt;Shift&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;Delete&lt;/strong&gt;, &lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;C&lt;/strong&gt;, or &lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;Insert&lt;/strong&gt;). CodeRush Xpress will select the identifier before the cut or copy operation. &lt;/p&gt;
&lt;p&gt;Once you have an identifier on the clipboard, you can move the caret to a different identifier and replace it with the one on the clipboard using &lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;B&lt;/strong&gt;. This Paste Replace command will select the identifier at the caret before pasting in the contents of the clipboard.&lt;/p&gt;
&lt;p&gt;If you need to cut or copy a larger structure, such as a for loop, a try/finally block, a member or a class, just place the caret at the start of the block you want to copy and press the cut or copy key. CodeRush Xpress will select the entire block before cutting or copying the block to the clipboard.&lt;/p&gt;
&lt;p&gt;&lt;img height="145" width="142" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/DeclareFeatures_d0998c40-672d-4cef-8b06-8723b717fc36.png" alt="DeclareFeatures" border="0" /&gt;&lt;/p&gt;
&lt;h1&gt;&lt;span style="color:#1f3a7c;"&gt;Declare&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;CodeRush Xpress includes powerful features to intelligently declare classes, members, fields, local variables and so much more.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#1f3a7c;"&gt;Consume-first Declaration&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The consume-first declaration features of CodeRush Xpress are a quick way to generate the code you need. It starts with a call or a reference to something that doesn&amp;#39;t exist yet (the consumption code). Just move the caret to the reference that needs to be declared and press the CodeRush key (&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;`&lt;/strong&gt; by default). CodeRush Xpress will do the rest, declaring the missing member, type, enum, or variable.&lt;/p&gt;
&lt;p&gt;Consume-first declaration is useful because it gets you thinking in terms of developers who would consume the code you write. This can improve the quality of the code and make it easier for developers to work with your code. Consume-first declaration is also almost always an essential component of Test Driven Development (TDD). &lt;/p&gt;
&lt;p&gt;However one of the most significant benefits of consume-first declaration is the efficiency gain -- you can quickly craft the code you need significantly faster than doing the same by hand.&lt;/p&gt;
&lt;p&gt;To illustrate, let&amp;#39;s look at a practical example. Often developers will use Intellisense to discover the return type of an unfamiliar method call or property, by entering that expression right inside the code, like this:&lt;/p&gt;
&lt;p&gt;&lt;img height="216" width="1133" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/UsingIntellisenseToGetReturnType_ecd96b4e-ea6a-4a05-9422-35818cbf35dc.png" alt="UsingIntellisenseToGetReturnType" border="0" /&gt; &lt;/p&gt;
&lt;p&gt;Typically what happens next is the developer&amp;#39;s eyes move to the front of the tool tip and note the type (circled in red above). Then the developer accepts the suggestion and moves the caret to the beginning of the line to enter a variable declaration of the correct type (e.g., a variable of type &amp;quot;Module[]&amp;quot; in this example). &lt;/p&gt;
&lt;p&gt;Overall there&amp;#39;s a great deal of caret movement and typing involved just to declare a variable. To save a little time, some developers avoid specifying the type to implicitly declare variables (using the &lt;strong&gt;var &lt;/strong&gt;keyword in C#, for example), thus avoiding the discovery and text entry costs associated with explicit declaration.&lt;/p&gt;
&lt;p&gt;Fortunately, CodeRush Xpress makes it easy to explicitly declare variables in a way that exploits the power of Visual Studio&amp;#39;s Intellisense and is likely to be highly compatible with how you already work:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create the expression fragment on an empty line using Intellisense or simply typing the expression by hand.&lt;br /&gt;&lt;br /&gt;&lt;img height="40" width="616" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/TypeExpression_4bf74330-828c-4c04-aa85-db83140e8036.png" alt="TypeExpression" border="0" /&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt; If you&amp;#39;re working in C#, there is no need to end the expression with a semi-colon.&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;With the caret at the end of the line, press the CodeRush key (&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;`&lt;/strong&gt;) and select &amp;quot;Declare Local&amp;quot; from the menu. CodeRush Xpress will generate the local variable declaration and select the variable so you can give it a meaningful name:&lt;br /&gt;&lt;br /&gt;&lt;img height="47" width="888" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/DeclaredLocal_36430e66-62e8-4155-bf34-500c117d9640.png" alt="DeclaredLocal" border="0" /&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So the steps behind exploiting consume-first features are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Write the call or reference to the member, type or variable that doesn&amp;#39;t exist, OR enter an expression on an empty line (as in the example above). &lt;/li&gt;
&lt;li&gt;Place the caret on the part that doesn&amp;#39;t exist. &lt;/li&gt;
&lt;li&gt;Press the CodeRush key (&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;`&lt;/strong&gt;). If a menu appears select the item you want to declare. For methods and properties, you may also see a horizontal red line appear (called the Target Picker) that allows you to select the insertion point for that member. Just use the up and down arrow keys to select the ideal location and press Enter to insert the declaration. &lt;/li&gt;
&lt;li&gt;Sometimes CodeRush Xpress will shift the view or take you to another file, to show you the code just inserted. This allows you to rename or edit the newly-declared code. When you&amp;#39;re satisfied with the declaration you can press &lt;strong&gt;Escape &lt;/strong&gt;to collect the marker and return to where you started.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;More details on specific consume-first declaration features follow:&lt;/p&gt;
&lt;h3&gt;&lt;span style="color:#1f3a7c;"&gt;Declaring Members&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;Want to add a member to a type? Just write the code as you would like it to appear. If it&amp;#39;s a method, pass in the parameters you need (tip: if you&amp;#39;re passing in parameters that are undeclared, declare those first before declaring the method). Place the caret on the member and press the CodeRush key. &lt;/p&gt;
&lt;p&gt;Here are the consume-first member declarations you get with CodeRush Xpress:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Declare Constructor &lt;/li&gt;
&lt;li&gt;Declare Method &lt;/li&gt;
&lt;li&gt;Declare Property &lt;/li&gt;
&lt;li&gt;Declare Property (auto-implemented) &lt;/li&gt;
&lt;li&gt;Declare Property (with backing field) &lt;/li&gt;
&lt;li&gt;Declare Getter &lt;/li&gt;
&lt;li&gt;Declare Setter &lt;/li&gt;
&lt;li&gt;Declare Event Handler&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;span style="color:#1f3a7c;"&gt;Declaring Types&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;To declare a new type, add a reference to it. Usually when you want a new type, you also want a constructor for it. So it&amp;#39;s usually most efficient to enter the constructor call like on an empty line:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="39" width="364" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/NewTypeExpression_39af42b3-8e37-42e4-860b-45fb4b7fe8d9.png" alt="NewTypeExpression" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;At this point you can press the CodeRush key (&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;`&lt;/strong&gt;) to declare a new local variable as we&amp;#39;ve seen before. You can also place the caret on the &amp;quot;FileLogger&amp;quot; text and press the CodeRush key to declare a class or struct. &lt;/p&gt;
&lt;p&gt;Here are the consume-first type declarations you get with CodeRush Xpress:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Declare Class &lt;/li&gt;
&lt;li&gt;Declare Delegate &lt;/li&gt;
&lt;li&gt;Declare Enum &lt;/li&gt;
&lt;li&gt;Declare Enum Element &lt;/li&gt;
&lt;li&gt;Declare Interface &lt;/li&gt;
&lt;li&gt;Declare Struct&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;span style="color:#1f3a7c;"&gt;Declaring Variables&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;As we&amp;#39;ve already seen, declaring variables to represent an expression on a line is easy. Another way to declare variables is to simply place the caret on a reference to the variable name in an assignment, as in the &amp;quot;_StartTime&amp;quot; text in the assignment below:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="35" width="358" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/FieldDeclaration_a638c1fa-5cb2-4d0c-bc20-e8d34341fca8.png" alt="FieldDeclaration" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Press the CodeRush key (&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;`&lt;/strong&gt;) and select the declaration you&amp;#39;d like. A preview hint will let you see the changes to the code before you commit.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="408" width="516" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/DeclareStartTime_a2936a59-8350-43a2-b556-0e36b736d2e3.png" alt="DeclareStartTime" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here are the consume-first variable declarations you get with CodeRush Xpress:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Declare Field &lt;/li&gt;
&lt;li&gt;Declare Local &lt;/li&gt;
&lt;li&gt;Declare Local (implicit)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;span style="color:#1f3a7c;"&gt;Create Method Contract&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Often inside methods, before you work with the parameters, you need to verify that those parameters are valid. Developers typically select one of three mechanisms to ensure the data coming in is correct:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Throw an exception &lt;/li&gt;
&lt;li&gt;Call Debug.AssertXxxx() &lt;/li&gt;
&lt;li&gt;Exit the method&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Regardless of which one of these you prefer, CodeRush Xpress makes it easy to build this contract code. Just move the caret to the start of the method, like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;img height="79" width="497" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CreateMethodContract1_92c7d6dc-4c9f-4ef7-a51b-d8c090f6e4b5.png" alt="CreateMethodContract1" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then press the CodeRush key (&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;`&lt;/strong&gt;). The Create Method Contract menu will appear, allowing you to select the ideal mechanism for validating any parameters that are without validation code. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="193" width="905" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CreateMethodContract2_06508df7-30f9-40d3-bf5c-c2daa78f37c6.png" alt="CreateMethodContract2" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The preview hint shows you exactly what you&amp;#39;re going to get. Create Method Contract makes the process of ensuring parameters are valid fast and easy.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#1f3a7c;"&gt;Duplicate Line&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Duplicate line lets you create a new line of code based on an existing line of code. You can duplicate variable declarations, constants, and method calls. The shortcut is &lt;strong&gt;Shift&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;Enter&lt;/strong&gt;. For example, if the caret is on a declaration like this in C#:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="27" width="372" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/DuplicateLine1_c1b8ece7-8263-418e-860c-de01221edc29.png" alt="DuplicateLine1" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Pressing Shift+Enter will create a duplicate declaration that looks like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;img height="43" width="363" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/DuplicateLine2_b4e66895-97e3-4426-9a24-f45f73211e93.png" alt="DuplicateLine2" border="0" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now it&amp;#39;s simply a matter of typing in the new field name. Note that the Camel Case features , shown above, may be useful here if you want to change only a portion of the name (for example, changing _StartTime to _EndTime would be easy with Camel Case Nav and Camel Case Select).&lt;/p&gt;
&lt;p&gt;&lt;img height="145" width="142" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/RefactorFeatures_a0d7f6b1-06bd-4d39-8b9a-92017d062ef0.png" alt="RefactorFeatures" border="0" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;h1&gt;&lt;span style="color:#a20631;"&gt;Refactor&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Refactoring is a powerful way to improve the quality and flexibility of your code, without changing program behavior. Well-refactored code costs less to maintain, is easier to extend, and is a more valuable asset than code that is allowed to accumulate technical debt (also referred to as design debt).&lt;/p&gt;
&lt;p&gt;CodeRush Xpress includes over 50 refactorings, and nearly all work in both C# and Visual Basic. A few refactorings are available in only a single language due to features of that particular language. &lt;/p&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/VBSmall_38bf7eee-c041-4b81-b120-02cb47191658.png" alt="VBSmall" border="0" /&gt;&amp;nbsp; For example, &lt;strong&gt;Inline With Statement&lt;/strong&gt; and &lt;strong&gt;Create With Statement&lt;/strong&gt; are both available in Visual Basic.&lt;/p&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt; Similarly, refactorings to &lt;strong&gt;Add Block Delimiters &lt;/strong&gt;and &lt;strong&gt;Remove Block Delimiters &lt;/strong&gt;are only available in C#. &lt;/p&gt;
&lt;p&gt;In some cases CodeRush Xpress provides wrappers for existing refactorings in either language. These wrappers ensure a more complete experience, making all refactorings contextually available in one location, accessed from a single keystroke (&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;`&lt;/strong&gt;). In many cases wrappers will also implement a preview hint, so you can see the impact of the changes before you commit. Wrappers are indicated in the refactoring menu with a Visual Studio icon, as in the Rename and Reorder Parameters refactorings appearing in the refactoring menu below:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;img height="192" width="366" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/Wrappers_6e1f0f13-6aee-4d96-8849-58ac0b0d9016.png" alt="Wrappers" border="0" /&gt; &lt;/p&gt;
&lt;p&gt;In this section you&amp;#39;ll find descriptions for all refactorings shipping inside CodeRush Xpress, arranged in the following categories:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;Changing Signatures&lt;br /&gt;Conditionals&lt;br /&gt;Declaration &amp;amp; Initialization&lt;br /&gt;Expressions&lt;br /&gt;Interfaces&lt;br /&gt;Lambda Expressions &amp;amp; Anonymous Methods&lt;br /&gt;Loops &amp;amp; Blocks&lt;br /&gt;Properties &amp;amp; Fields&lt;br /&gt;Moving/Extracting Methods&lt;br /&gt;Resource Files &amp;amp; Strings&lt;br /&gt;Types&lt;br /&gt;Visibility&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Consult the Visual Studio help after installing CodeRush Xpress for additional details and example code in both C# and Visual Basic demonstrating these refactorings in action.&lt;/p&gt;
&lt;h3&gt;&lt;span style="color:#a20631;"&gt;Changing Signatures&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Add Parameter&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Adds a new parameter to a method declaration and updates all calls accordingly.&lt;br /&gt;&amp;nbsp; &lt;img height="190" width="883" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/AddParameter_b96d940f-8c58-43d0-b6c2-fbf2e448d6b6.png" alt="AddParameter" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Create Overload&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Creates an overloaded method similar to the one at the caret, with fewer parameters. Applying this refactoring leads to an interactive phase where you can select which parameters to exclude from the new overload. XML doc comments are updated appropriately. You can even create overloads of constructors, as shown in the screen shot below:&lt;br /&gt;&amp;nbsp; &lt;img height="206" width="846" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CreateOverload_3039ff87-0df6-4385-9021-692d5133942d.png" alt="CreateOverload" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Decompose Parameter&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Replaces a single parameter with one or more new parameters, each standing in for a property access on the original parameter. For example, consider the code below:&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="326" width="688" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/DecomposeParameter0_44cf31be-09f0-4029-b21b-0fa5195194cb.png" alt="DecomposeParameter0" border="0" /&gt; &lt;br /&gt;&lt;br /&gt;In the first constructor, only a single property of the &lt;strong&gt;parentGrid&lt;/strong&gt; parameter, &lt;strong&gt;Children&lt;/strong&gt;, is accessed inside the code (and aside from this property reference, &lt;strong&gt;parentGrid&lt;/strong&gt; is never referenced or assigned to directly in the code). So we can replace this parameter with a parameter of the same type as the property referenced. The preview hint for Decompose Parameter shows the impact of this change: &lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="264" width="837" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/DecomposeParameter_831abb76-e26b-4d62-96c5-c764a2055722.png" alt="DecomposeParameter" border="0" /&gt;&amp;nbsp; &lt;br /&gt;After applying this refactoring, all calls to the method are updated. The final code looks like this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;img height="326" width="743" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/DecomposeParameter2_057266e0-913e-4d1e-ac97-5b08343ef63b.png" alt="DecomposeParameter2" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Promote to Parameter&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Removes all references to the local declaration or field from the method, replacing it with a parameter. Calling code is adjusted to pass in the promoted field or expression. &lt;/p&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt;&lt;br /&gt;In C#, CodeRush Xpress simply adds a preview hint wrapper around the existing refactoring.&lt;/p&gt;
&lt;p&gt;&lt;img height="371" width="709" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/PromoteToParameter_7761d49e-6871-4fb8-bc5e-a4c321893852.png" alt="PromoteToParameter" border="0" /&gt;&amp;nbsp;&lt;br /&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/VBSmall_5d258307-3280-403f-a07a-8d145fbc10b4.png" alt="VBSmall" border="0" /&gt;&amp;nbsp;&lt;br /&gt;In Visual Basic the refactoring is available as well, however in this case CodeRush Xpress actually implements the refactoring instead of handing off to the language service:&lt;br /&gt;&lt;br /&gt;&lt;img height="333" width="778" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/PromoteToParameterVB_b5ec6834-b61b-436f-ae17-ecc616c85e6d.png" alt="PromoteToParameterVB" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Remove Unused Parameter&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Removes an unused parameter from a method declaration and updates all calls accordingly. &lt;/p&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/VBSmall_5d258307-3280-403f-a07a-8d145fbc10b4.png" alt="VBSmall" border="0" /&gt;&lt;br /&gt;In Visual Basic this refactoring is only available on parameters that are not referenced within the method:&lt;/p&gt;
&lt;p&gt;&lt;img height="233" width="805" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/RemoveUnusedParamter_34302249-58fc-451a-85a5-172e4df15762.png" alt="RemoveUnusedParamter" border="0" /&gt; &lt;/p&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt;&lt;br /&gt;In C# the &lt;strong&gt;Remove Unused Parameter&lt;/strong&gt; refactoring is not available, however there is a wrapper for the built-in C# refactoring &lt;strong&gt;Remove Parameters&lt;/strong&gt;, and that wrapper is available when the caret is on any parameter:&lt;br /&gt;&lt;br /&gt;&lt;img height="203" width="766" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/RemoveParameters_5e408a27-987f-4d7c-8baf-364107b20e96.png" alt="RemoveParameters" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;When you select the Remove Parameters, CodeRush Xpress calls the &lt;strong&gt;built-in C# refactoring&lt;/strong&gt;, which allows you to select the parameters to remove:&lt;br /&gt;&lt;br /&gt;&lt;img height="375" width="602" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/RemoveParametersBuiltInUI_de0d94f3-2ed5-4bae-8441-4aa293ccda39.png" alt="RemoveParametersBuiltInUI" border="0" /&gt;&amp;nbsp; &lt;br /&gt;&lt;span style="color:#808080;"&gt;Note: The image above is a dialog from Visual Studio and is not part of CodeRush Xpress.&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Reorder Parameters&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Reorders parameters in the current method, and then updates calling code to reflect the new order. &lt;/p&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt;&lt;br /&gt;In C#, this refactoring hands control over to the existing C# implementation of Reorder Parameters:&lt;br /&gt;&lt;br /&gt;&lt;img height="391" width="565" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ReorderParametersCS_9dfbf303-624b-4602-941d-2f997b116acd.png" alt="ReorderParametersCS" border="0" /&gt;&lt;br /&gt;&lt;span style="color:#808080;"&gt;Note: The image above is a dialog from Visual Studio and is not part of CodeRush Xpress.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/VBSmall_5d258307-3280-403f-a07a-8d145fbc10b4.png" alt="VBSmall" border="0" /&gt;&lt;br /&gt;In Visual Basic, the application of this refactoring leads to an interactive phase where parameters can be rearranged using the CodeRush Xpress in-source UI. A hint appears revealing available shortcuts in the interactive mode.&lt;br /&gt;&lt;br /&gt;&lt;img height="216" width="1026" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ReorderParametersVB_11eadbe9-4a5b-4f72-a56a-b8dae2f1a5c9.png" alt="ReorderParametersVB" border="0" /&gt;&amp;nbsp; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Safe Rename&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Safely renames non-private methods and properties by creating a duplicate member to preserve the old signature, calling the renamed member from the old member. The old member is hidden from Intellisense and marked &amp;quot;Obsolete&amp;quot;. References to the old member will generate compiler warnings directing developers to the new renamed member.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="255" width="772" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/SafeRename0_994daa51-0fa6-420a-945b-e8479271c0ae.png" alt="SafeRename0" border="0" /&gt;&lt;br /&gt;After applying this refactoring, CodeRush Xpress selects and links the method name for an easy rename.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;img height="323" width="774" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/SafeRename1_efb4a100-9cf5-49da-8172-3f74e20279c9.png" alt="SafeRename1" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;Safe rename is useful if you want to change the signature of a public or protected method referenced by code &lt;em&gt;outside &lt;/em&gt;of your solution (e.g., on a developer&amp;#39;s machine in another part of the world making calls to your API). For example, after performing the &lt;strong&gt;Safe Rename &lt;/strong&gt;on the code shown above, we can next apply &lt;strong&gt;Remove Parameter &lt;/strong&gt;to the unused &lt;strong&gt;deprecatedData&lt;/strong&gt; in the &lt;strong&gt;FindPlayers&lt;/strong&gt; method, cleaning up its signature without breaking any code that calls the now-obsolete FindAllThePlayers method.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;&lt;span style="color:#a20631;"&gt;Conditionals&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Combine Conditionals&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Combines nested conditionals to into a binary expression performing a logical AND operation. For example, &amp;quot;&lt;span style="color:#0000ff;"&gt;if &lt;/span&gt;(e1) &lt;span style="color:#0000ff;"&gt;if &lt;/span&gt;(e2)&amp;quot; becomes &amp;quot;&lt;span style="color:#0000ff;"&gt;if &lt;/span&gt;(e1 &amp;amp;&amp;amp; e2)&amp;quot;. This refactoring is the opposite of Split Conditional. This refactoring can also combine two or more neighboring conditionals with identical bodies into a single conditional statement where each conditional expression is logically OR&amp;rsquo;d.&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s an example where nested conditionals can be combined:&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="273" width="666" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CombineConditionalsAnd_a1511b8d-1cad-4bf9-8c77-0a78b6c4d625.png" alt="CombineConditionalsAnd" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;And here&amp;#39;s an example where neighboring conditionals with identical bodies can be combined:&lt;br /&gt;&lt;br /&gt;&lt;img height="264" width="511" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CombineConditionals_3bee518c-75c8-4742-8849-b5632de50325.png" alt="CombineConditionals" border="0" /&gt; &lt;/p&gt;
&lt;p&gt;Combine conditionals will also remove any redundancy that might appear in the newly combined expression. For example, notice in the preview hint for the following how the reference to the &lt;strong&gt;hasQualified&lt;/strong&gt; parameter appears only once:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;img height="303" width="852" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CombineConditionals2_c5278269-287f-4f5f-a27b-1fc9f29ab362.png" alt="CombineConditionals2" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Compress to Ternary Expression&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Converts an if/else conditional with assignments in each branch into a ternary expression. This refactoring is the opposite of Expand Ternary Expression.&lt;br /&gt;&lt;br /&gt;&lt;img height="279" width="691" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CompressToTernaryExpression_cfbddac7-b4fa-4607-8f50-3685570a2c4f.png" alt="CompressToTernaryExpression" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Expand Ternary Expression&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Converts a ternary expression into an if/else block. This refactoring is the opposite of Compress to Ternary Expression.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; Before:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;font-family:Lucida Console;"&gt;&amp;nbsp; column = cellPosition == &lt;span style="color:#008080;"&gt;CellPosition&lt;/span&gt;.Last ? _NumColumns - 1 : 1;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; After:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:small;font-family:Lucida Console;"&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;if &lt;/span&gt;(cellPosition == &lt;span style="color:#008080;"&gt;CellPosition&lt;/span&gt;.Last)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; column = _NumColumns - 1;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; else&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; column = 1;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Flatten Conditional&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Unindents all or a portion of the conditional statement. This refactoring applies one of the following refactorings: Replace Nested Conditional with Guard Clause, Remove Redundant Else, or Reverse Conditional followed by Remove Redundant Else. Flatten conditional can also recognize &amp;ldquo;&lt;span style="color:#0000ff;"&gt;if &lt;/span&gt;(E) &lt;span style="color:#0000ff;"&gt;return true&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;else return false&lt;/span&gt;;&amp;rdquo; and convert all of this to simply &amp;ldquo;&lt;span style="color:#0000ff;"&gt;return &lt;/span&gt;E;&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s one example for Flatten Conditional, where an indented code block (the last one of a method) becomes unindented by reversing the conditional and exiting the method:&lt;br /&gt;&lt;br /&gt;&lt;img height="377" width="524" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/FlattenConditional_206725d3-f646-41a5-9439-1e85ee993a28.png" alt="FlattenConditional" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s another example preview hint for &lt;strong&gt;Flatten Conditional&lt;/strong&gt;, where an else keyword and the corresponding braces are removed, unindenting the contents of the block:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;img height="191" width="880" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/FlattenConditional2_6ef54157-507e-49e9-aafd-ae83849b3a2a.png" alt="FlattenConditional2" border="0" /&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Reverse Conditional&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Inverts the logic in this conditional statement and swaps the If and Else blocks.&lt;br /&gt;&lt;br /&gt;&lt;img height="279" width="514" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ReverseConditional_bf63b54a-fbab-4590-9aba-e477ca5a7a8c.png" alt="ReverseConditional" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Split Conditional&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Two behaviors:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Converts a conditional with a binary expression performing a logical AND operation into nested conditionals. For example, in C#, &amp;quot;&lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (e1 &amp;amp;&amp;amp; e2)&amp;quot; becomes &amp;quot;&lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (e1) &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (e2)&amp;quot;.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; Before:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:small;font-family:Lucida Console;"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;if &lt;/span&gt;(fileName != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; fileName != &lt;span style="color:#008080;"&gt;String&lt;/span&gt;.Empty)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PlayInCell(fileName, column, row);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; After:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;font-family:Lucida Console;"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;if &lt;/span&gt;(fileName != &lt;span style="color:#0000ff;"&gt;null)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if &lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;fileName != &lt;span style="color:#008080;"&gt;String&lt;/span&gt;.Empty)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PlayInCell(fileName, column, row);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;Converts a conditional with a binary expression performing a logical OR operation into neighboring conditionals.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; Before:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;font-family:Lucida Console;"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;if &lt;/span&gt;(fileName == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; || fileName == &lt;span style="color:#008080;"&gt;String&lt;/span&gt;.Empty)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; After:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;font-family:Lucida Console;"&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;if &lt;/span&gt;(fileName == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;if &lt;/span&gt;(fileName == &lt;span style="color:#008080;"&gt;String&lt;/span&gt;.Empty)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt;;&lt;/span&gt;&lt;span style="color:#a20631;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/blockquote&gt;
&lt;h3&gt;&lt;span style="color:#a20631;"&gt;Declaration &amp;amp; Initialization&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Convert to Initializer&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Converts a default constructor call immediately followed by object initialization into an object initializer.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="214" width="1057" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ConvertToInitializer_d918189e-9daa-4175-9e3e-460b21d12d12.png" alt="ConvertToInitializer" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Decompose Initializer&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Converts an object initializer to a default constructor call followed by object initialization. Available when the caret is on type reference in the constructor call.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; Before:&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="font-family:Lucida Console;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="color:#008080;"&gt;&amp;nbsp; MediaPlayerPro &lt;/span&gt;mediaPlayerPro = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#008080;"&gt;MediaPlayerPro&lt;/span&gt; { NumColumns = 3, StartingFolder = &lt;span style="color:#800000;"&gt;@&amp;quot;C:\Images&amp;quot;&lt;/span&gt; };&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Trebuchet MS;color:#a20631;"&gt;&amp;nbsp; After:&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:#008080;"&gt;&lt;font face="Lucida Console"&gt;&lt;img height="78" width="545" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/DecomposeInitializer_edec06b8-a091-4e17-9114-0165eccb1097.png" alt="DecomposeInitializer" border="0" /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; Note the variable name is linked up after decomposing the initializer, allowing for a quick rename if desired.&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Make Explicit&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Converts an implicitly-typed local variable to a variable with an explicit type.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="215" width="1023" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/MakeExplicit_6269deee-cc7a-41ac-9e67-b21024504a17.png" alt="MakeExplicit" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Make Explicit (and Name Anonymous Type)&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Converts an implicitly-typed local variable to a variable with an explicit type, creates a named type to represent the expression on the right, and replaces the anonymous type with a newly-declared type. Other anonymous types in this project having the same shape will also be replaced by the new type.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="269" width="586" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/MakeExplicitAndNameAnonymousType_cb307587-70dc-4335-8ff9-e98429f617bc.png" alt="MakeExplicitAndNameAnonymousType" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Make Implicit&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Converts an explicitly-typed variable declaration to an implicit one.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="223" width="581" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/MakeImplicit_e62388e3-b34b-4e3f-8dac-7a0a5c04a5fc.png" alt="MakeImplicit" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Move Declaration Near Reference&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Moves the declaration statement for a local variable near its first reference. &lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="302" width="533" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/MoveDeclarationNearReference_def7516f-a8cc-4025-8391-551c404f1250.png" alt="MoveDeclarationNearReference" border="0" /&gt;&lt;br /&gt;This refactoring is sometimes useful in preparing a block of code for Extract Method (if a selected block contains the variable declaration, the variable won&amp;#39;t need to be passed in as a input parameter).&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Move Initialization to Declaration&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Combines a local variable&amp;#39;s declaration with its first initialization. &lt;br /&gt;&amp;nbsp; &lt;img height="244" width="450" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/MoveInitializationToDeclaration_ada4a278-0306-4647-8d88-2f6676913204.png" alt="MoveInitializationToDeclaration" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Name Anonymous Type&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Replaces the anonymous type with a newly-declared type.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="191" width="571" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/NameAnonymousType_caf4c02a-05b4-49ca-a63d-0cb2b2bb2d87.png" alt="NameAnonymousType" border="0" /&gt;&lt;br /&gt;Additionally, other anonymous types in this project having the same shape (matching property names of the same types) will be replaced by the new type. For example, watch what happens when you apply this refactoring the first anonymous type assigned to the variable &lt;strong&gt;superCar1&lt;/strong&gt; below: &lt;/p&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; Before:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;font-family:Lucida Console;"&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;var &lt;/span&gt;superCar1 = &lt;span style="color:#0000ff;"&gt;new &lt;/span&gt;{ MaxSpeed = 250, Driver = &lt;span style="color:#800000;"&gt;&amp;quot;Speed&amp;quot;&lt;/span&gt; };&lt;br /&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;var &lt;/span&gt;superCar2 = &lt;span style="color:#0000ff;"&gt;new &lt;/span&gt;{ MaxSpeed = 250, Driver = &lt;span style="color:#800000;"&gt;&amp;quot;Racer X&amp;quot;&lt;/span&gt; };&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; After:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;font-family:Lucida Console;"&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;var &lt;/span&gt;superCar1 = &lt;span style="color:#0000ff;"&gt;new &lt;/span&gt;&lt;span style="color:#008080;"&gt;SuperCar&lt;/span&gt;(250, &lt;span style="color:#800000;"&gt;&amp;quot;Speed&amp;quot;&lt;/span&gt;);&lt;br /&gt;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;var &lt;/span&gt;superCar2 = &lt;span style="color:#0000ff;"&gt;new &lt;/span&gt;&lt;span style="color:#008080;"&gt;SuperCar&lt;/span&gt;(250, &lt;span style="color:#800000;"&gt;&amp;quot;Racer X&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The anonymous type assigned to superCar2 is also replaced by the new type.&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Remove Assignments to Parameter&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Removes assignments to value parameters, declaring a new local at the first assignment.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="275" width="583" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/RemoveAssignmentsToParameter_14ab238c-3480-44dc-93ee-4452150558d7.png" alt="RemoveAssignmentsToParameter" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Split Initialization from Declaration&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Breaks an initialized declaration for a local variable into a declaration and a separate initialization statement.&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; Before:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;font-family:Lucida Console;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; string&lt;/span&gt;[] files = System.IO.&lt;span style="color:#008080;"&gt;Directory&lt;/span&gt;.GetFiles(_StartingFolder);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; After:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Lucida Console;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; string&lt;/span&gt;[] files;&lt;br /&gt;&amp;nbsp; files = System.IO.&lt;span style="color:#008080;"&gt;Directory&lt;/span&gt;.GetFiles(_StartingFolder);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Split Temporary Variable&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Splits a local variable which has too many assignments, declaring a new local at the first new assignment following the first reference. In this example where the local variable &amp;quot;&lt;span style="font-size:x-small;font-family:Lucida Console;"&gt;i&lt;/span&gt;&amp;quot; has multiple assignments and references, the preview hint shows a new variable named &amp;quot;&lt;span style="font-size:x-small;font-family:Lucida Console;"&gt;splitI&lt;/span&gt;&amp;quot; will be introduced, and all subsequent references to &amp;quot;&lt;span style="font-size:x-small;font-family:Lucida Console;"&gt;i&lt;/span&gt;&amp;quot; will be replaced with the new &lt;span style="font-size:x-small;font-family:Lucida Console;"&gt;splitI&lt;/span&gt; variable.&lt;br /&gt;&lt;br /&gt;&lt;img height="317" width="677" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/SplitTemp_5fec722b-427d-48aa-ae8d-08b389408a90.png" alt="SplitTemp" border="0" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;&lt;span style="color:#a20631;"&gt;Expressions&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Inline Temp&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Replaces all references to a local variable with its initial value.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="241" width="588" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/InlineTemp2_830e9b42-3068-44b6-b718-3630e55bcfb1.png" alt="InlineTemp2" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Introduce Constant&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Declares a new constant, initialized to the value of the string or number at the caret.&lt;br /&gt;&lt;img height="195" width="645" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/IntroduceConstant_76a2c415-c126-44fc-b155-630123e578d9.png" alt="IntroduceConstant" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Introduce Constant (local)&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Declares a new local constant, initialized to the value of the string or number at the caret.&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Introduce Local&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Creates a new local variable initialized to the selected expression. Replaces the selection with the new variable.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="208" width="858" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/IntroduceLocal_0bb232f3-796d-4e51-b4a0-9c706c9c0a5e.png" alt="IntroduceLocal" border="0" /&gt; &lt;br /&gt;After applying this refactoring, the new local variable name is selected and linked up...&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="59" width="656" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/AfterIntroduceLocal_6e79e95a-fbf9-4d27-a4a6-d503e152cedc.png" alt="AfterIntroduceLocal" border="0" /&gt; &lt;br /&gt;So it is easy to rename...&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="54" width="630" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/AfterIntroduceLocal2_ad77d552-3022-4066-8ce5-d88beb902dc5.png" alt="AfterIntroduceLocal2" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Introduce Local (replace all)&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Creates a new local variable initialized with the selected expression. Replaces the expression everywhere it appears inside the code block with the new variable.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="318" width="746" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/IntroduceLocalReplaceAll_0984a6d2-9f64-43c3-ab31-51fc698ffe47.png" alt="IntroduceLocalReplaceAll" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Simplify Expression&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Resolves an expression to its simplest form. Simplify Expression will remove redundancy such as extra parentheses and sub-expressions that have no impact on the outcome of the evaluation. For example, consider the redundancy in the expression in the method below:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img height="185" width="849" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/SimplifyExpression0_73606ce9-13d6-40ff-85ca-cbea31f0cedc.png" alt="SimplifyExpression0" border="0" /&gt; &lt;br /&gt;To simplify this, select the expression and press the CodeRush key (&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;`&lt;/strong&gt;). The preview hint shows how the expression will be simplified. Notice that we lose the redundant reference to the hasQualified parameter, and we also lose an extra pair or parens, resulting in a cleaner expression that is easier to read.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;img height="228" width="893" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/SimplifyExpression_95ed4434-67b8-47d9-99f2-8959bc011cfc.png" alt="SimplifyExpression" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;&lt;span style="color:#a20631;"&gt;Interfaces&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Extract Interface&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Extracts an interface based on public members in a class.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;&lt;span style="color:#a20631;"&gt;Lambda Expressions &amp;amp; Anonymous Methods&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Compress to Lambda Expression&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt;&amp;nbsp;&lt;span style="color:#00ae34;"&gt;This refactoring is only available in C#.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Converts an anonymous method to an equivalent lambda expression.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="232" width="923" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CompressToLambdaExpression_ba2ed16b-5d0a-491d-a4a5-c81b5b7fc9e0.png" alt="CompressToLambdaExpression" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Expand Lambda Expression&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt;&amp;nbsp;&lt;span style="color:#00ae34;"&gt;This refactoring is only available in C#.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Converts a lambda expression to an equivalent anonymous method.&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Inline Delegate&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt;&amp;nbsp;&lt;span style="color:#00ae34;"&gt;This refactoring is only available in C#.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Inlines the delegate, creating an anonymous method. If there are no other references to the delegate method, it is removed. &lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="320" width="948" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/InlineDelegate_30c0a5ac-300d-4a31-9fdc-272d921832c6.png" alt="InlineDelegate" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Name Anonymous Method&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt;&amp;nbsp;&lt;span style="color:#00ae34;"&gt;This refactoring is only available in C#.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Creates a new delegate method from an anonymous method which does not access any local variables from the parenting method body.&lt;br /&gt;&lt;br /&gt;&lt;img height="405" width="711" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/NameAnonymousMethod_b7c64403-1293-4a60-98c1-5da4eef00a6e.png" alt="NameAnonymousMethod" border="0" /&gt;&amp;nbsp;&lt;br /&gt;After applying this refactoring the method names will be linked up allowing you to easily rename the new method.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;&lt;span style="color:#a20631;"&gt;Loops &amp;amp; Blocks&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Add Block Delimiters&lt;/span&gt;&lt;/h4&gt;
&lt;span style="color:#00ae34;"&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt;&amp;nbsp;&lt;span style="color:#00ae34;"&gt;This refactoring is only available in C#.&lt;/span&gt;&lt;/p&gt;
&lt;span style="color:#00ae34;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;p&gt;Embeds a child statement inside brace delimiters.&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; Before:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;font-family:Lucida Console;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; if &lt;/span&gt;(files == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;span style="color:#008080;"&gt;&lt;span style="color:#000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; files = &lt;/span&gt;Directory&lt;/span&gt;.GetFiles(_StartingFolder);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; After:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Lucida Console;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; if &lt;font color="#000000"&gt;(files == &lt;/font&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; files = &lt;/font&gt;&lt;font color="#008080"&gt;Directory&lt;/font&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;.GetFiles(_StartingFolder);&lt;br /&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Create With Statement&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/VBSmall_5d258307-3280-403f-a07a-8d145fbc10b4.png" alt="VBSmall" border="0" /&gt;&amp;nbsp;&lt;span style="color:#717eff;"&gt;This refactoring is only available in Visual Basic.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Creates a Visual Basic &lt;strong&gt;With &lt;/strong&gt;statement for the specified instance within the selection.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="298" width="845" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CreateWithStatement_e2547550-3cec-4212-884c-4d71134fe7c0.png" alt="CreateWithStatement" border="0" /&gt; &lt;/p&gt;
&lt;p&gt;If more than one qualifying instance exists, a sub menu will allow you to select the instance to become the subject of the &lt;strong&gt;With &lt;/strong&gt;statement.&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Inline With Statement&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/VBSmall_5d258307-3280-403f-a07a-8d145fbc10b4.png" alt="VBSmall" border="0" /&gt;&amp;nbsp;&lt;span style="color:#717eff;"&gt;This refactoring is only available in Visual Basic.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Inlines the object reference of a Visual Basic &lt;strong&gt;With &lt;/strong&gt;statement into all dot-references.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="208" width="523" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/InlineWithStatement_b188cd19-a133-4a2c-967b-1145ffe6b9e8.png" alt="InlineWithStatement" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Remove Block Delimiters&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt;&amp;nbsp;&lt;span style="color:#00ae34;"&gt;This refactoring is only available in C#.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Removes unnecessary brace delimiters in C#.&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; Before:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;font-family:Lucida Console;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; if &lt;/span&gt;(files == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;span style="color:#008080;"&gt;&lt;span style="color:#000000;"&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; files = &lt;font color="#008080"&gt;Directory&lt;/font&gt;&lt;font color="#000000"&gt;.GetFiles(_StartingFolder);&lt;br /&gt;&amp;nbsp; }&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; After:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Lucida Console;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; if &lt;font color="#000000"&gt;(files == &lt;/font&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;font color="#000000"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; files = &lt;font color="#008080"&gt;Directory&lt;/font&gt;.GetFiles(_StartingFolder);&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;&lt;span style="color:#a20631;"&gt;Properties &amp;amp; Fields&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Convert to Auto-implemented Property&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt;&amp;nbsp;&lt;span style="color:#00ae34;"&gt;This refactoring is only available in C#.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Removes the backing store and converts the active property to a C# auto-implemented property. Available when the caret is on the property name.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="212" width="664" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ConvertToAutoImplementedProperty_72efddbc-cdf6-4142-829a-608bffdc38f4.png" alt="ConvertToAutoImplementedProperty" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Convert to Auto-implemented Property (convert all)&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt;&amp;nbsp;&lt;span style="color:#00ae34;"&gt;This refactoring is only available in C#.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Converts all properties in the active C# type to auto-implemented properties, removing the associated backing store fields.&lt;br /&gt;&lt;br /&gt;&lt;img height="417" width="691" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ConvertToAutoImplementedPropertyConvertAll_7eb9ea7c-0f78-46d7-954e-bf5332ae392f.png" alt="ConvertToAutoImplementedPropertyConvertAll" border="0" /&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Create Backing Store&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt;&amp;nbsp;&lt;span style="color:#00ae34;"&gt;This refactoring is only available in C#.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Converts a C# auto-implemented property to a conventional property with a backing store.&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; Before:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;font-family:Lucida Console;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; public string &lt;/span&gt;&lt;span style="color:#008080;"&gt;&lt;span style="color:#000000;"&gt;StartingFolder { &lt;font color="#0000ff"&gt;get&lt;/font&gt;; &lt;font color="#0000ff"&gt;private set&lt;/font&gt;; }&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; After:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Lucida Console;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &lt;font color="#000000"&gt;&lt;font color="#0000ff"&gt;private string &lt;/font&gt;_StartingFolder;&lt;br /&gt;&amp;nbsp; &lt;font color="#0000ff"&gt;public string&lt;/font&gt; StartingFolder&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;get&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;return&lt;/font&gt; _StartingFolder;&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;private set&lt;br /&gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _StartingFolder = &lt;font color="#0000ff"&gt;value&lt;/font&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp;&lt;span style="color:#a20631;"&gt; &lt;/span&gt;&lt;/span&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Encapsulate Field&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Encapsulates a field into a read-write property and replaces all occurrences of this field with the newly declared property. In C# control is passed to the built-in refactoring that encapsulates fields. In Visual Basic CodeRush Xpress implements this refactoring.&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Encapsulate Field (read only)&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Encapsulates a field into a read-only property and replaces all read-references to this field with the newly declared property.&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Method to Property&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Creates a property from the current method.&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; Before:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;font-family:Lucida Console;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; public string&lt;/span&gt; GetStartingFolder()&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#0000ff;"&gt;return _&lt;/span&gt;&lt;span style="color:#000000;"&gt;StartingFolder;&lt;br /&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; After:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Lucida Console;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; public string&lt;font color="#000000"&gt; StartingFolder&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;get&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff"&gt;return _&lt;/font&gt;&lt;font color="#000000"&gt;StartingFolder;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Property to Method(s)&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; For read-only properties:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Converts the property into a function.&lt;br /&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; For write-only properties:&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Converts the property into a method (or Sub in Visual Basic).&lt;br /&gt;&lt;span style="color:#a20631;"&gt;&amp;nbsp; For read/write properties:&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Converts the property into two methods, creating a new function for the getter, and a new method for the setter.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/p&gt;
&lt;h4&gt;&lt;/h4&gt;
&lt;/blockquote&gt;
&lt;h3&gt;&lt;span style="color:#a20631;"&gt;Moving/Extracting Methods&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Extract Method&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Creates a new method from the selected code block. The selection is replaced with appropriate calling code to invoke the newly-declared method.&lt;/p&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/CSharpSmall_f57ac4d9-bf5e-4e92-9b16-7867847c914b.png" alt="CSharpSmall" border="0" /&gt; In C# control is passed to the built-in refactoring that extracts methods.&amp;nbsp; &lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/VBSmall_5d258307-3280-403f-a07a-8d145fbc10b4.png" alt="VBSmall" border="0" /&gt; In Visual Basic CodeRush Xpress implements this refactoring.&lt;br /&gt;&lt;br /&gt;&lt;img height="463" width="882" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ExtractMethod_cfc0d23d-a9b0-491b-8231-9991d7fcb698.png" alt="ExtractMethod" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Extract Method to Type&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Creates a new method from the selected code block and moves it to the specified type, updating the selected code block appropriately. The selection is replaced with suitable calling code to invoke the newly-declared method through an instance of the target type. This refactoring is useful when you have a block of code that references several properties or methods on a variable of a type that is declared elsewhere in your solution.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="483" width="916" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ExtractMethodToType_ae411386-e1d9-4a4e-8524-d9f216dca9fb.png" alt="ExtractMethodToType" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;After extracting the code block above, the new method looks like this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;img height="189" width="628" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ExtractMethodToType1_663dd259-7008-4d6b-a6cf-d72ffc6db423.png" alt="ExtractMethodToType1" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;And the calling site looks like this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img height="212" width="861" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ExtractMethodToType2_d76b329b-7d1a-48e4-828b-afb97cb13da1.png" alt="ExtractMethodToType2" border="0" /&gt;&amp;nbsp; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Extract Property&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Creates a new property from the selected code block. The selection is replaced with appropriate code to reference the newly-declared property.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="205" width="664" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ExtractProperty_871633b1-6c8e-40cf-bef9-33e0e3c58a8b.png" alt="ExtractProperty" border="0" /&gt; &lt;br /&gt;After extraction the property name is selected and linked up for an easy rename.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="284" width="662" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ExtractProperty2_d9447db1-8a99-4088-84a0-7951e5ca1d1c.png" alt="ExtractProperty2" border="0" /&gt; &lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Replace Temp with Query&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Replaces each reference to this local variable with a call to an extracted method, which returns the initial value assigned to this local.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="291" width="603" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ReplaceTempWithQuery_377f648e-d0e4-4bce-ad13-b46866faef16.png" alt="ReplaceTempWithQuery" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;&lt;span style="color:#a20631;"&gt;Resource Files &amp;amp; Strings&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Extract String to Resource&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Extracts the string at the caret into a resource file.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="144" width="837" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ExtractStringToResource_0f3c31f5-d6c6-4860-98c7-e61701ff2512.png" alt="ExtractStringToResource" border="0" /&gt; &lt;br /&gt;After extracting the string, the resource identifier is selected and linked for an easy rename.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="37" width="780" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ExtractStringToResource2_8ab09ff8-5268-414b-a75b-0c57ee287fe9.png" alt="ExtractStringToResource2" border="0" /&gt; &lt;/p&gt;
&lt;p&gt;This refactoring is useful if you have text that needs to be translated into one or more target languages. Placing all text that needs translation into a resource file makes it possible to change and add foreign language support without changing the code.&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Extract String to Resource (replace all)&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Extracts all matching strings in the file to a resource file.&lt;/p&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Extract XML Literal to Resource&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;img height="23" width="37" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/VBSmall_5d258307-3280-403f-a07a-8d145fbc10b4.png" alt="VBSmall" border="0" /&gt;&amp;nbsp;&lt;span style="color:#717eff;"&gt;This refactoring is only available in Visual Basic.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Extracts the active embedded XML literal to a resource file.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="185" width="758" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ExtractXMLLiteralToResource_f5d30452-c723-4641-85c3-f1dee9c310b0.png" alt="ExtractXMLLiteralToResource" border="0" /&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;After the extraction the resource identifier is selected and linked up for an easy rename.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="32" width="553" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/ExtractXMLLiteralToResource2_970485f3-9fc6-46d8-a7a1-d5be1c976923.png" alt="ExtractXMLLiteralToResource2" border="0" /&gt;&amp;nbsp; &lt;/p&gt;
&lt;/blockquote&gt;&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Use String.Format&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Converts a composed string expression into a single String.Format call.&lt;br /&gt;&lt;br /&gt;&lt;img height="267" width="1262" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/UseStringFormat_c8290fc6-0427-44f6-b77e-9be1e629f4d4.png" alt="UseStringFormat" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;Notice in the preview hint how the formatting arguments passed to the &lt;strong&gt;ToString&lt;/strong&gt; calls in the original expression (e.g., &amp;quot;&lt;span style="font-size:x-small;font-family:Lucida Console;"&gt;listPrice.ToString(&amp;quot;c&amp;quot;)&lt;/span&gt;&amp;quot;) are properly converted to the appropriate format strings (e.g., &amp;quot;&lt;span style="font-size:x-small;font-family:Lucida Console;"&gt;{0:c}&lt;/span&gt;&amp;quot;). &lt;br /&gt;&lt;br /&gt;This refactoring is useful if you have concatenated display text such as this that needs to be translated into another language. Complete sentences are more effectively translated than sentence fragments, as they can be grammatically rearranged as is sometimes necessary with translation, without touching the code.&lt;/p&gt;
&lt;/blockquote&gt;&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Use StringBuilder&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Replaces the selected string concatenation operations with corresponding method calls on a local StringBuilder instance. For example, consider the following code:&lt;br /&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; &lt;img height="120" width="817" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/UseStringBuilder0_a0252e53-ad67-430a-a812-9cd7a0d1794d.png" alt="UseStringBuilder0" border="0" /&gt;&amp;nbsp;&lt;br /&gt;To change these string concatenation operations to equivalent code that works uses a StringBuilder, just select the text to convert and press the CodeRush key (&lt;strong&gt;Ctrl&lt;/strong&gt;&lt;span style="color:#808080;"&gt;+&lt;/span&gt;&lt;strong&gt;`&lt;/strong&gt;).&lt;br /&gt;&lt;br /&gt;&lt;img height="320" width="873" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/UseStringBuilder1_18a87b9e-32ce-40ee-a39c-ac6f2c5f9049.png" alt="UseStringBuilder1" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;The preview hint gives you an idea of the changes this refactoring will apply to the code. Old string concatenation operations (&amp;quot;&lt;span style="font-size:x-small;font-family:Lucida Console;"&gt;+=&lt;/span&gt;&amp;quot;) are updated.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img height="118" width="843" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/UseStringBuilder2_343ef55f-c73c-48af-ab4e-94cde7ff313c.png" alt="UseStringBuilder2" border="0" /&gt; &lt;br /&gt;Notice also the intelligent changes applied to the second line that had previously called String.Format. That call has been converted to an AppendFormat call.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;&lt;span style="color:#a20631;"&gt;Types&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Move Type to File&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Creates a new file with the same name as the type at the caret, adds the file to the project, and then moves the type to that file, along with any leading comments, attributes, and XML doc comments. This refactoring is available when the caret is on a type declaration and the file contains two or more types.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="278" width="496" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/MoveTypeToFile_80d478d9-416c-4f3c-a990-8575ec608ac4.png" alt="MoveTypeToFile" border="0" /&gt;&amp;nbsp;&lt;br /&gt;After applying this refactoring, the type is moved to a new file with a matching name, and added to the active project:&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="145" width="193" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/MoveTypeToFile2_fa0dcef9-22c2-49cb-9899-52c6e7b08cea.png" alt="MoveTypeToFile2" border="0" /&gt; &lt;/p&gt;
&lt;p&gt;The new file is activated so you can work in that file if needed. As always, when a feature in CodeRush Xpress takes you away from where you started, you can get back to the original location by pressing &lt;strong&gt;Escape&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;&lt;span style="color:#a20631;"&gt;Visibility&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Widen Scope&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Moves a variable declaration up (out) in scope, increasing the area where it can be referenced within the method.&lt;br /&gt;&lt;br /&gt;&lt;img height="301" width="534" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/WidenScope_c40b30d4-00e6-4abe-b931-344e90007d13.png" alt="WidenScope" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Widen Scope (promote constant)&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Moves the local constant declaration out of the member and up to the type, replacing all matching values in the type with a reference to the constant.&lt;/p&gt;
&lt;/blockquote&gt;&lt;blockquote&gt;
&lt;h4&gt;&lt;span style="color:#a20631;"&gt;Widen Scope (promote to field)&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;Converts a local variable to a field variable.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;img height="235" width="561" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/WidenScopePromoteToField_0dc7d665-abaf-415a-b515-b3f41edb564a.png" alt="WidenScopePromoteToField" border="0" /&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;More Information&lt;/h2&gt;
&lt;p&gt;Documentation on all the features of CodeRush Xpress, including samples in both C# and Visual Basic, can be found in the &lt;strong&gt;Visual Studio help &lt;/strong&gt;after installing. Just select the &lt;strong&gt;Help &lt;/strong&gt;| &lt;strong&gt;Contents&lt;/strong&gt; menu item:&lt;/p&gt;
&lt;p&gt;&lt;img height="118" width="248" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/HelpContents_b9fda119-0f50-4ebf-bf62-9a885b5dd313.png" alt="HelpContents" border="0" /&gt; &lt;/p&gt;
&lt;p&gt;The help also includes sample animations for C# and Visual Basic, so you can see the features in motion.&lt;/p&gt;
&lt;p&gt;&lt;img height="380" width="962" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/HelpAnimations_af7ddd83-8e90-4452-b9d1-740312c125ea.png" alt="HelpAnimations" border="0" /&gt; &lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.devexpress.com/crx"&gt;&lt;img height="37" width="98" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/CodeRushXpressforCandVisualBasic2008_104AB/Download_e69f69b4-7c67-44d6-82b2-57237fa70d61.png" alt="Download CodeRush Xpress - free from Dev Express!" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=264990" width="1" height="1"&gt;</description><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/CodeRush/default.aspx">CodeRush</category></item><item><title>Performance and Memory Milestones in CodeRush and Refactor! Pro - Preview of 9.2</title><link>http://community.devexpress.com/blogs/markmiller/archive/2009/06/17/performance-and-memory-milestones-in-coderush-and-refactor-pro-preview-of-9-2.aspx</link><pubDate>Wed, 17 Jun 2009 19:10:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:264048</guid><dc:creator>Mark Miller (DevExpress)</dc:creator><slash:comments>18</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/markmiller/rsscomments.aspx?PostID=264048</wfw:commentRss><comments>http://community.devexpress.com/blogs/markmiller/archive/2009/06/17/performance-and-memory-milestones-in-coderush-and-refactor-pro-preview-of-9-2.aspx#comments</comments><description>&lt;p&gt;The IDE Tools team has been spending a great deal of time making CodeRush and Refactor! Pro run even faster and with less memory. With every release since 3.2.3, customers have noticed improvements in speed. And it&amp;#39;s no different for CodeRush 9.2, expected later this quarter.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#00699b;"&gt;Performance&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Our primary focus for performance in this release has been solution load times. Specifically, we want to reduce the time it takes to go from specifying a solution to open in Visual Studio to the ability to refactor anywhere that a solution (we call this &amp;quot;zero-to-refactor&amp;quot; time). Refactoring anywhere means CodeRush has a full understanding of all the code in the entire solution.&lt;/p&gt;
&lt;p&gt;To give you an idea of what you can expect in CodeRush 9.2, we took some measurements of this zero-to-refactor time with three of our internal DevExpress solutions. Two of these solutions are among our largest: &lt;strong&gt;DX Controls&lt;/strong&gt; (8000+ files, anyone? Holy crap!) and &lt;strong&gt;XAF&lt;/strong&gt;. The third is a medium-sized project, &lt;strong&gt;XtraScheduler. &lt;/strong&gt;The table below gives you an idea of their respective sizes using a variety of metrics:&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:12pt;font-family:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;table align="left" cellpadding="0" cellspacing="0" style="margin:auto 6.75pt;border-collapse:collapse;mso-yfti-tbllook:1184;mso-table-lspace:9.0pt;mso-table-rspace:9.0pt;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal:column;mso-table-left:left;mso-padding-alt:0in 0in 0in 0in;" class="MsoNormalTable  "&gt;

&lt;tr style="height:15.85pt;mso-yfti-irow:0;mso-yfti-firstrow:yes;"&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:76.1pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;height:15.85pt;background-color:transparent;"&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:calibri;"&gt;&lt;span style="font-size:small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;border-top:#95b3d7 1pt solid;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:86.85pt;padding-top:0in;border-bottom:#95b3d7 1pt solid;height:15.85pt;background-color:transparent;"&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color:#3e6ea8;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;font-family:Calibri;"&gt;DX Controls&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;border-top:#95b3d7 1pt solid;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:48.25pt;padding-top:0in;border-bottom:#95b3d7 1pt solid;height:15.85pt;background-color:transparent;"&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color:#3e6ea8;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;XAF&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;border-top:#95b3d7 1pt solid;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:58.4pt;padding-top:0in;border-bottom:#95b3d7 1pt solid;height:15.85pt;background-color:transparent;"&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;b&gt;&lt;span style="color:#3e6ea8;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;XtraScheduler&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow:1;"&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;padding-bottom:0in;border-left:#95b3d7 1pt solid;width:76.1pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#3e6ea8;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;# of Projects&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:86.85pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;51&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:48.25pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;54&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:58.4pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;9&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow:2;"&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;padding-bottom:0in;border-left:#95b3d7 1pt solid;width:76.1pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#3e6ea8;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;# of Files&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:86.85pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;8,056&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:48.25pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;1,980&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:58.4pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;660&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow:3;"&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;padding-bottom:0in;border-left:#95b3d7 1pt solid;width:76.1pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#3e6ea8;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;# of Types&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:86.85pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;17,351&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:48.25pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;4,295&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:58.4pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;2,235&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow:4;"&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;padding-bottom:0in;border-left:#95b3d7 1pt solid;width:76.1pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#3e6ea8;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;# of Members&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:86.85pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;209,384&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:48.25pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;32,250&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:58.4pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;22,215&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow:5;"&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;padding-bottom:0in;border-left:#95b3d7 1pt solid;width:76.1pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#3e6ea8;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;Lines of Code&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:86.85pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;1,831,086&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:48.25pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;255,759&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:58.4pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;389,954&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow:6;mso-yfti-lastrow:yes;"&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;padding-bottom:0in;border-left:#95b3d7 1pt solid;width:76.1pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#3e6ea8;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;Source Size&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:86.85pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;84MB&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:48.25pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;16MB&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-right:#95b3d7 1pt solid;padding-right:5.4pt;padding-left:5.4pt;border-left-color:#f0f0f0;padding-bottom:0in;width:58.4pt;border-top-color:#f0f0f0;padding-top:0in;border-bottom:#95b3d7 1pt solid;background-color:transparent;"&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;18MB&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;
&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:12pt;"&gt;&lt;span style="font-family:calibri;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:12pt;"&gt;&lt;span style="font-family:calibri;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:12pt;"&gt;&lt;span style="font-family:calibri;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:12pt;"&gt;&lt;span style="font-family:calibri;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:12pt;font-family:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:12pt;font-family:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:12pt;font-family:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:12pt;font-family:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;How do &lt;em&gt;your &lt;/em&gt;solutions compare to these?&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;Some details on the test machine:&lt;/p&gt;
&lt;blockquote&gt;
&lt;table cellpadding="0" cellspacing="0"&gt;

&lt;tr&gt;
&lt;td&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#3e6ea8;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;Processor&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;Intel Core 2 Duo E6400, 2.13 GHz&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#3e6ea8;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;Memory&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;2 GB&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#3e6ea8;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;Hard disk drive&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;Seagate st3250824as, 7200 RPM&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;(8ms average seek time, &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;9ms average write time)&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;p style="margin:0in 0in 0pt;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#3e6ea8;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;Operating system&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p align="right" style="margin:0in 0in 0pt;text-align:right;mso-element:frame;mso-element-frame-hspace:9.0pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly;" class="MsoNormal"&gt;&lt;span style="color:#0f243e;"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-size:small;"&gt;&lt;font face="Calibri"&gt;32-bit Vista, SP1&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;
&lt;/blockquote&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;And it&amp;#39;s Windows Experience Index:&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&amp;nbsp;&lt;img border="0" width="569" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/2057ede03501_FED2/WindowsExperience_c3d26b5d-8272-41eb-bd20-cac169997624.png" alt="WindowsExperience" height="222" /&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;&lt;span style="color:#00699b;"&gt;First Time Loads&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;When you first open a solution, CodeRush 9.2 parses it and caches important information using a background thread. The cache later improves the zero-to-refactor time for subsequent loads of the same solution.&lt;/p&gt;
&lt;p&gt;The parse and cache-building times for first-time loads for each of the solutions in CodeRush 9.2 are about the same as the old parse times (and no cache building) for CodeRush 9.1:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img border="0" width="607" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/2057ede03501_FED2/FirstTimeLoad3_561794d1-93e1-4078-8504-4454d5a2ccae.png" alt="FirstTimeLoad3" height="438" /&gt; &lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;Even though CodeRush 9.2 performs additional functionality on the first-time load (e.g., parsing the code &lt;em&gt;and &lt;/em&gt;building the cache), the team has actually found ways to improve the parsing speed sufficiently so as to have an overall effect of marginally reducing the zero-to-refactor time.&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;By the way, if you are looking at that 200-second parse and cache-building time for the DX Controls project and on the verge of freaking out, you may find relief in the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div style="margin:0in 0in 0pt;" class="MsoNormal"&gt;
&lt;div style="margin:0in 0in 0pt;" class="MsoNormal"&gt;That time is from zero (no solution open) to the ability to instantly initiate a refactoring anywhere (no build required).&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div style="margin:0in 0in 0pt;" class="MsoNormal"&gt;
&lt;div style="margin:0in 0in 0pt;" class="MsoNormal"&gt;This is all happening in a &lt;strong&gt;background thread&lt;/strong&gt;. Visual Studio remains responsive during this time.&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div style="margin:0in 0in 0pt;" class="MsoNormal"&gt;The DX Controls solution declares over &lt;strong&gt;seventeen thousand types &lt;/strong&gt;and over &lt;strong&gt;two hundred thousand &lt;/strong&gt;members. It&amp;#39;s &lt;strong&gt;84MB &lt;/strong&gt;of source code and nearly &lt;strong&gt;two million lines of code long&lt;/strong&gt;. This solution is significantly larger than most solutions out there.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;This cache-construction stage only occurs once -- the first time you open a solution without a cache. &lt;/li&gt;
&lt;li&gt;
&lt;div style="margin:0in 0in 0pt;" class="MsoNormal"&gt;This zero-to-refactor performance for first-time solution loads is actually &lt;strong&gt;comparable &lt;/strong&gt;if not &lt;em&gt;&lt;strong&gt;significantly faster &lt;/strong&gt;&lt;/em&gt;than the competition.&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;&lt;span style="color:#00699b;"&gt;Subsequent Loads&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;For subsequent solution loads &lt;em&gt;after &lt;/em&gt;the cache is built, the story is even better:&lt;/p&gt;
&lt;p&gt;&lt;img border="0" width="711" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/2057ede03501_FED2/SubsequentLoad2_386095f9-42a1-4de5-955e-6c4b4bc5dbac.png" alt="SubsequentLoad2" height="489" /&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Notice that once the cache is built, subsequent times to load a solution and get from zero-to-refactoring for CodeRush 9.2 (middle row in &lt;span style="color:#a20631;"&gt;red&lt;/span&gt;) approach those of Visual Studio&amp;#39;s normal load time for the solution (front row in &lt;span style="color:#3d558d;"&gt;blue&lt;/span&gt;). &lt;/p&gt;
&lt;p&gt;The bottom line is CodeRush 9.2 gets you to that point of total code understanding where you can refactor anywhere significantly faster than CodeRush 9.1. In some cases up to &lt;b&gt;five times faster&lt;/b&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#00699b;"&gt;Memory Consumption&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Remarkably, the memory story is &lt;strong&gt;even more compelling&lt;/strong&gt; than the performance story. &lt;/p&gt;
&lt;p&gt;The data below shows total Task Manager memory after loading one of these large solutions and reaching that point where we&amp;#39;re able to refactor anywhere in the solution (all source code has been parsed). Measurements were taken with Visual Studio 2008 alone (no add-ins), and with CodeRush 9.1 and CodeRush 9.2.&lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;img border="0" width="711" src="http://community.devexpress.com/blogs/markmiller/WindowsLiveWriter/2057ede03501_FED2/MemoryConsumption2_241f3e87-cf92-47e0-92b5-257611159174.png" alt="MemoryConsumption2" height="489" /&gt; &lt;/p&gt;
&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-size:12pt;font-family:&amp;#39;Times New Roman&amp;#39;,&amp;#39;serif&amp;#39;;"&gt;&lt;span style="font-family:calibri;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;By the way, if you&amp;#39;re using a competing IDE productivity tool and wondering how much memory that other tool might be consuming, it&amp;#39;s likely to be very close to the memory consumed by CodeRush &lt;strong&gt;9.1 &lt;/strong&gt;(see the back row in &lt;span style="color:#624275;"&gt;purple&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;Notice the &lt;b&gt;significant&lt;/b&gt; drops in memory consumption produced by &lt;b&gt;CodeRush&lt;/b&gt; &lt;strong&gt;9.2&lt;/strong&gt; (middle row in &lt;span style="color:#a20631;"&gt;red&lt;/span&gt;) compared to the memory consumption of CodeRush 9.1 (or your other IDE productivity tool). The savings in memory is &lt;b&gt;huge&lt;/b&gt;, especially considering the size of these projects and the fact that this memory also holds all the assemblies required simply to keep CodeRush (and Refactor! Pro) running.&lt;/p&gt;
&lt;p&gt;The percentage numbers in white near the top of each bar show how much additional memory is required by CodeRush (to represent the entire solution as well as its referenced assemblies) as a percentage of that needed by Visual Studio alone (if you didn&amp;#39;t have CodeRush installed).&lt;/p&gt;
&lt;p&gt;Whereas CodeRush 9.1 (in purple) requires about double the memory Visual Studio needs, CodeRush 9.2 requires substantially less. We expect most customers with large solutions to see a reduction in memory consumption of at least &lt;strong&gt;100MB&lt;/strong&gt;. Customers with very large solutions (e.g., 2000 files and up) should see even greater savings.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#00699b;"&gt;Can I Try This Now?&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Yes you can. Between now and the release of CodeRush 9.2, CodeRush customers can request a daily build of CodeRush 9.2 from &lt;a href="mailto:support@devexpress.com"&gt;support@devexpress.com&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=264048" width="1" height="1"&gt;</description><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/CodeRush/default.aspx">CodeRush</category><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/Refactor/default.aspx">Refactor</category><category domain="http://community.devexpress.com/blogs/markmiller/archive/tags/v2009.2/default.aspx">v2009.2</category></item></channel></rss>