Archive

Posts Tagged ‘Declaration’

Code Issues hints for declaration and initialization

October 12th, 2012 Comments off

Here are a few simple code issues of a hint type (suggestion) for declarations and initializations.

Read more…

DXCore Services – Code Modification

February 14th, 2012 Comments off

The Code Mod (Modification) DXCore service provides APIs for code generation and code declaration, and access to the code provider extensions.

Read more…

Code issues specific to declaring members

December 27th, 2011 Comments off

One of the goals of the Code Issues technology is to help you find mistakes when coding before compiling. This increases the coding speed and allows you to save time in the future when dialing with those mistakes. Let’s take a look at code issues CodeRush provides specific to declaring members:

Read more…

How to get the declaring element (declaration) from a reference using DXCore

August 29th, 2011 Comments off

Once you have a reference to an element and would like to get its declaration, simply call the GetDeclaration() method of a reference of the Expression type (all references have the Expression base type).

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…

Code Generation – Create Ancestor

June 29th, 2011 4 comments

The Create Ancestor code provider generates a new base class declaration for the active class. The generated base class will be declared above the active class and the active class becomes a descendant of the new base class. The new base class has the same visibility as the active class and contains the default public parameterless constructor. All identifiers and references of the base class are linked together for easy renaming.

Read more…

Code Generation – Declare Interface

June 29th, 2011 Comments off

The Declare Interface code provider generates a new definition of an interface and adds interface referenced members to it, if any. The declaring provider is available on an undeclared type reference, that starts with an upper-case letter I, e.g. ILogger.

Read more…

Code Gen – Declare Struct

November 5th, 2010 Comments off

Declare Struct code provider generates a structure for the current type reference to a non-existent type. If the type reference on the editor caret creates a new instance of a non-existent type that takes some arguments, the appropriate constructor is generated for the new structure:

CSharp:

CodeRush Declare Struct

Read more…