 |
Define your own naming standards |
|
devAdvantage allows you to create your own
custom naming conventions for:
-
Namespaces
-
Types (classes, interfaces, structures, enumerations and delegates)
-
Type members (methods, properties, fields, events)
-
Method parameters
-
Local variables
Along the ability to target these at
declarations based on scope, attributes, location, regular expressions, etc –
you can define a custom naming for almost any identifier in C#.
For more information on scoping and
configuration, see the
devAdvantage Overview
|
|
|
 |
Automated renaming of declarations and all references |
|
The devAdvantage refactoring engine builds a
complete model of the solution code when doing its analysis. When renaming
identifiers, the refactoring engine handles the renaming of all references to
the type or type member safely. The refactoring engine even has a scope which
includes references that exist in web files (*.aspx and *.ascx files).
|
|
|
 |
Detection and correction in ASPX pages |
|
If you do web development, naming standards
cannot just be applied to C# class files. Types and references are either
tightly tied to your aspx and ascx file, or in some cases existing only in the
web files. devAdvantage can both detect and correct naming convention
issues whether they are in class or web files.
|
|
|
The naming convention knowledge pack contains
preconfigured rules based on the
Naming Guidelines found
in
Microsoft’s Design Guidelines for Class Library Developers as
well as other industry best practices.
|
Rule
|
Category
|
Automatic Correction
|
|
Namespace name should be Pascal case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Interface types should start with capital letter I and be
Pascal case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Struct types should use Pascal case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Class types should be Pascal case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Delegate types should use Pascal case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Enumerations should use Pascal case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Attributes should use Pascal case and end in "Attribute".
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Collections should end in "Collection".
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Read-only collections should end in "Collection".
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Event should be Pascal case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Event arguments should be end in "EventArgs".
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Property should be Pascal case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Method should be Pascal case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Public fields should Pascal case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Private type fields should use camel case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Constant should use Pascal case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Protected type fields should be camel case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Internal type fields should be camel case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Method parameters should be camel case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Variables should be camel case.
|
Naming Convention Best Practices for .NET
|
Yes
|
|
Classes of type Form should end in "Form".
|
Sample Rule*
|
Yes
|
|
Classes of type Forms.UserControl should end in "Control".
|
Sample Rule*
|
Yes
|
|
Field name of type ArrayList should end in "ArrayList".
|
Sample Rule*
|
Yes
|
|
Field name of type Button should end in "Button".
|
Sample Rule*
|
Yes
|
|
Field name of type Hashtable should end in "Hashtable".
|
Sample Rule*
|
Yes
|
|
Field name of type ListBox should end in "ListBox".
|
Sample Rule*
|
Yes
|
|
Field name of type ComboBox should end in "ComboBox".
|
Sample Rule*
|
Yes
|
|
Field name of type DataGrid should end in "DataGrid".
|
Sample Rule*
|
Yes
|
|
Field name of type TextBox should end in "TextBox".
|
Sample Rule*
|
Yes
|
|
Private fields should not use prefixes of 'm','_' or 'm_'.
|
Sample Rule*
|
Yes
|
|
Private fields should use 'm' prefix.
|
Sample Rule*
|
Yes
|
|
Private fields should use 'm_' prefix.
|
Sample Rule*
|
Yes
|
|
Private fields should use underscore prefix.
|
Sample Rule*
|
Yes
|
* Note sample rules are left disabled, allowing you to
choose those that apply directly or those that are examples of rules your
organization may need.