Archive

Author Archive

Refactorings for implicitly-typed local variables

September 27th, 2011 4 comments

Implicitly-typed local variables are variables declared without specifying the type explicitly. The type of such variables is being inferred from the expression that is used to initialize the variable at the time the code is compiled. Implicitly-typed variables are really useful for LINQ that creates anonymous types in queries, and for which you want to assign variables. However, implicitly-typed locals can be used with any variable declaration to enhance the readability, for example:

Refactor! Implicit variable sample

Read more…

IDE Tools Unavailable Contexts options page

September 21st, 2011 Comments off

The Unavailable Contexts options page shows the list of DXCore contexts and its default values that may not always be available in IDE Tools:

Read more…

IDE Tools Startup options page

September 21st, 2011 Comments off

The Startup options page from the Core category allows you to tweak the IDE Tools start-up settings. The page level is expert, so do not change these options if you do not actually need this. Here is what the options page looks like (click the image to enlarge):

Read more…

DXCore Services – Reflection

September 19th, 2011 Comments off

The Reflection DXCore service provides access to useful .NET reflection methods.

Read more…

DXCore Services – UndoStack

September 19th, 2011 Comments off

The Undo Stack DXCore Service provides access to the Undo Manager and undo/redo stack of the Visual Studio IDE.

Read more…

DXCore Services – String Utilities

September 19th, 2011 Comments off

The String Utilities DXCore service (accessed via the CodeRush.StrUtil object) provides utility methods for manipulating single string, multi-line texts, and string arrays.

Read more…

How to use WPF controls in DXCore Tool Window plug-in

September 16th, 2011 Comments off

DXCore Tool Windows are based on the Windows Forms technology and can use only Windows Forms controls. However, if you would like to use WPF controls there is a work-around intended to use the ElementHost Windows Forms control that is used to host a Windows Presentation Foundation (WPF) element.

Read more…

Creating custom CodeRush Code Embeddings

September 12th, 2011 Comments off

CodeRush Code Embeddings are completely customizable. They are modified on the Embeddings options page in the Options Dialog, where you can create your own. Let’s add a new code embedding to surround the selected code with the logging capabilities.

Read more…