2010年7月19日星期一

Automating Visual Studio 2008

http://www.geekzone.co.nz/vs2008/6324

Efficient Navigation:

Visual Studio’s Code Editor provides efficient means to navigate around large files (using collapsible code blocks), large projects (using Bookmarks) that contain large numbers of classes and/or properties (using Object Explorer) as well as solutions that contain numerous projects (using Solution Explorer).

Code Creation:

In addition to UI designers, Visual Studio provider database schema designers (to graphically create and design database schemas as well as queries), a class designer (to graphically develop or document classes and their interactions), and a mapping designer (to graphically design the mapping between database schemas and the code entities that encapsulate the data).

Code Refactoring:

Beginning with VS2005, several refactoring tools are built directly into the IDE, which are accessible from the Code Editor’s context menu, or the main menu’s Refactor menu (which is only visible when the Code Editor has focus).

The refactoring tools offered are sparse, but helpful:

o Extract Method: Defines a new method, based on a selection of code statements.
o Encapsulate Field: Turns a public field into a private field, wrapping it with a public property.
o Extract Interface: Defines a new interface based on the current class’ public properties and methods.
o Reorder Parameters: Provides a way to reorder member parameters, as well as the arguments of all references to it throughout a project.
o Remove Parameters: Removes a member’s parameter, and the argument from of all references to it throughout a project.
o Rename: This allows you to rename a code token (method, field, etc.), and all references to it throughout a project.
o Promote Local Variable to Parameter: Moves a local variable to the parameter set of the defining method.

没有评论:

发表评论