Archive

Posts Tagged ‘Properties’

Quick Navigation inside Visual Studio using CodeRush

September 27th, 2012 1 comment

The Quick Navigation feature allows you to find any code members inside your solution, such as classes, interfaces, structures, enumerations, delegates, methods, properties, events, fields locals and parameters. Once you hit the Ctrl+Shift+Q shorcut, the simplified Quick Navigation window will appear by default:

CodeRush Quick Navigation Default Window

Read more…

Code providers for converting unimplemented properties

August 30th, 2012 Comments off

CodeRush has two code providers that allow you to convert unimplemented properties into a property with backing store field or into an auto-implemented property quickly:

  • Convert to Property with Backing Store
  • Convert to Auto-implemented Property

Read more…

Refactorings for changing member signatures overview

August 9th, 2012 Comments off

This is just a quick list to organize a bunch of refactorings that change member signatures. Click the refactoring name to learn more about it.

Add Parameter

The refactoring adds a new parameter to a method declaration and updates all calls accordingly. This refactoring is useful when you need to quickly add a new parameter to an existing method because it needs more information from its caller that wasn’t passed in before.

Read more…

Quick ways to add and remove a set/get property accessor with CodeRush

August 9th, 2012 Comments off

A property without a ‘set’ accessor is considered read-only:

CodeRush Add Setter code sample

Read more…

CodeRush INotifyPropertyChanged interface support

July 31st, 2012 2 comments

Since ancient times, CodeRush has supported the INotifyPropertyChanged interface implementation. The interface provides a standard way to notify binding clients of a property value change. It has just one event, with a simple and clear name, PropertyChanged.

The most important part of the support of this interface is connected to the code templates. Once you expand a property template in a class that implements the INotifyPropertyChanged interface, you will see the corresponding code generated. For instance, expanding the ‘ps’ template will produce the following code:

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…

Refactorings specific to auto-implemented properties

July 12th, 2011 Comments off

Auto-implemented properties enable you to quickly specify a property without having to write logic for the property accessors. The auto-property’s logic and the field serving as a backing store are automatically generated by the compiler. Such properties appeared in C# version 3.0 and Visual Basic version 10.0.

Read more…

DXCore Components – ContextProvider

September 25th, 2010 Comments off

The ContextProvider component provides a new context entry for the ContextPicker component. Context is automatically registered in the DXCore when a plug-in containing the corresponding ContextProvider is loaded.

You can drop the ContextProvider onto your plug-in design surface from the “DXCore: Extensions & Providers” category of Visual Studio Toolbox:

Read more…