Archive

Archive for the ‘CodeRush’ Category

CodeRush code issues for overridden members

August 19th, 2011 Comments off

Overridden members (that include an ‘override‘ keyword) provide a new implementation of a virtual or an abstract member with the same signature. Compile-time errors occur when member override rules are violated. To declare an overridden member according to the language specification without violating its rules, CodeRush suggests several overridden-specific code issues.

Read more…

CodeRush code issues for abstract members

August 19th, 2011 Comments off

In addition to CodeRush code issues for virtual members, there are similar code issues for abstract members. An abstract member is similar to a virtual member but with no implementation, in other words, it has no body. In contrast to virtual members, abstract members must be implemented in a derived class if one is inherited from the class that contains an abstract member.

Read more…

CodeRush code issues for virtual members

August 19th, 2011 Comments off

As you probably know, if a member is declared with the ‘virtual‘ keyword, derived classes can override the implementation of this member. In a virtual member invocation, the run-time type of the instance for which that invocation takes place determines the actual member implementation to invoke: whether it is a base virtual member or an overridden member from a derived class. The virtual member is declared like an instance member with addition of a ‘virtual‘ keyword to its declaration.

Read more…

Declaring various properties using CodeRush code generation tools

August 18th, 2011 Comments off

The consume-first declaration features of CodeRush are a quick way to generate the required code without typing the entire declaration’s code by hand. Once you have a reference to an undeclared member, pressing the CodeRush key allows you to choose a member you would like to declare. Let’s take a look at the property-declaring code generation providers you can use.

Read more…

DXCore Expression Lab tool window for observing the parsed source code trees

August 16th, 2011 Comments off

The Expression Lab is a DXCore diagnostic plug-in containing the tool window that displays the hierarchical abstract source tree built by the DXCore. This is useful to learn the structure of the parsed source code and created a source tree to build your own DXCore plug-ins. When you know the structure of the tree, you can build your own trees or its parts and generate the appropriate code for all programming languages supported by the DXCore. Also, you can see the set of properties each language element has, to learn more on how to construct any specific elements.

Read more…

Silverlight testing framework support in the Unit Testing Service

August 16th, 2011 Comments off

The CodeRush Unit Test Runner supports running tests from the Silverlight Unit Test Framework which is a part of Silverlight Toolkit now, so it’s easy to test your Silverlight applications.

Once you install the Silverlight Unit Test Framework, you are able to create the Silverlight Unit Test Application project. Here is what the Add Project dialog looks with the Silverlight tab highlighted:

Read more…

Navigation between files – Open Files tool window

August 5th, 2011 Comments off

The Open Files CodeRush tool window lists files that are currently opened inside the Visual Studio IDE. The window allows you to quickly switch between files via a single mouse click. This window is similar to the Ctrl+Tab Visual Studio built-in window but has a few advanced options. This is what it looks like:

CodeRush Open Files default view

Read more…

Code Issues – Complex Member

July 27th, 2011 Comments off

The Complex Member code issue of the smell type highlights complex members. A complex member is a member that may have too much code inside. The issue is based on a calculation of the Maintenance Complexity code metric. Maintenance complexity is a measure the structural complexity of a node (and its children), and represents how easy or challenging a method will be to understand and maintain. Scores closer to zero are simple. Small methods usually score below 150, while large/complex methods will exceed 500.

Read more…