NDepend v4 Released Download Free Trial 14-Day Fully Functional Now!
Home
Download
Product ▼
Purchase
Upgrade
Documentation ▼
About ▼
Features
Sample Reports
Screenshots
Editions Comparison
FAQ
Testimonials
Release Notes
JArchitect, NDepend for Java
CppDepend, NDepend for C++
Getting Started
Metrics Definitions
CQLinq Code Query and Rule
Visual Studio Extra-Features
Build Process Integration
NDepend.API
Coverage FAQ
NDepend Material
White Books
Advanced Documentation
CQLinq Default Rules
CQLinq Syntax
CQLinq Features
CQLinq Performance
CQL to CQLinq Automatic Conversion
Declare CQLinq Rules in Source Code
Advanced Code Diff
Dependency Graph
Dependency Structure Matrix
Visualizing Code Metrics
Validating CQLinq Code Rules
Rich Code Search Facilities
Developing Application-Wide
NDepend Console
NDepend Analysis
Customize NDepend Report
Critical Rules and Build Failure
Understanding NDepend Analysis Inputs
Reporting Code Diff
Source Files Rebasing
Integrate NDepend with TFS
Integrate NDepend with CruiseControl.NET
Integrate NDepend with FinalBuilder
Integrate NDepend with TeamCity
Contact Us
NDepend Partners
EULA
CQL to CQLinq Automatic Conversion
Since NDepend v4, the CQLinq language replaces the
CQL
language. The CQL languages is still 100% supported for compatibility reasons. If you used NDepend before v4, it is advised to convert your CQL queries and rules to the CQLinq syntax. While CQL can lead to a bit faster execution of code queries, there are no significant reasons to prefer CQL over CQLinq.
An automatic converter from CQL to CQLinq is proposed. This converter only works for CQL queries and rules that compile. There are 4 ways to use this converter:
Convert a CQL query edited to the CQLinq syntax:
Just click the wizard button that appears automatically in the query editor when a CQL query or rule is edited. The conversion is considered as a modification by the query editor, and just doing undo with Ctrl+Z will cancel it:
Convert several CQL queries to the CQLinq syntax at once:
Just right-click a group in the
Queries and Rules Explorer
panel. If the group contains some CQL queries, a menu is shown to convert them to CQLinq. When clicking the menu, a message box will appear to ask you if you want to create a backup NDepend project file, before the conversion.
Use the Power Tool to convert all CQL queries of an NDepend project to the CQLinq syntax:
An open-source Power tool exists to convert all CQL queries of a NDepend project to the CQLinq syntax. The power tool will ask you if you want to create a backup NDepend project file, before the conversion.
Programmatically convert some CQL queries to the CQLinq syntax:
The single extension method
ConvertToCQLinq()
is proposed to use the CQL to CQLinq converter. This extension method is used in the source code of the Power Tool shown above. If you want to use this method, we advise to get inspired from this Power Tool source code contained in
$NDependInstallDir$\NDepend.PowerTools.SourceCode\CQL2CQLinq\CQL2CQLinqPowerTool.cs
.
|
Share
Follow us on Twitter
Watch a Video Tour!
Getting Started
Product Features
Code Query LINQ
NDepend is also available
for
Java
and
C++
More than
3.000 companies provide better .NET code
with NDepend
Full Visual Studio Integration
Copyright © 2004-2013 Patrick Smacchia