Nitriq Developer Edition Documentation
Below you'll find a description of all the properties available on Nitriq classes.
If you're looking for documentation for the Console Edition, click here.
Getting started? Be sure to look at the Instructions.
IMPORTANT - Nitriq's editor component does not yet support full-blown C# autocompletion. However, you can easily see all of the properties on the important Nitriq types as long as your variables are named appropriately (i.e. if you want to see autocomplete off an IMethod variable, the variable name needs to equal "m" or contain the case insenstive string "method"). It is highly recommended you read the additional information available when you click on "Query/Editor Help" in the upper right hand corner of the query editor.
Extension Methods
Nitriq has a couple extension methods that will help to make your queries less verbose, but due to current limitiations with the editor will not display with autocomplete.
Calling "Like(string regexPattern, bool ignoreCase)" will work on any string value, it will return true if the target string matches the Regular Expression Pattern. Calling "Like(string regexPattern)" is the same as the above method but ignore case is ON by default.
Example:
from method in Methods
where method.Name.Like(@"Node$", false)
select new { method.MethodId, method.Name };
Will return all methods that end in the word "Node" (case sensitive).
Another extension method is "Round(int digits)" that works on any number.
Example:
from method in Methods
let LineComplexity = (method.LogicalLineCount / method.Cyclomatic).Round(2)
where LineComplexity > 5
select new { method.MethodId, method.Name, method.LineComplexity };
The results of this query will only have 2 decimal places on the "LineComplexity" property. (Note: LineComplexity was
made up for the purposes of this example, it probably has no diagnostic value)
IAssembly
In order to see these properties with autocomplete your variable name needs to equal "a" or contain the string "Assembly" or contain the string "Assem" (case insensitive)
Property |
Type |
Comments |
AssemblyId |
int |
The Nitriq Unique Id given to this Assembly. You must select this in a query in order for the Treemap and other visualizations to work properly. |
IsCoreAssembly |
bool |
Returns whether or not this Assembly is a Core Assembly. Core Assemblies are the assemblies you are primarily concerned with analyzing - typically excludes Microsoft and 3rd Party Assemblies. |
Name |
string |
The name of this Assembly |
Namespaces |
NamespaceCollection |
The INamespace array of Namespaces in this Assembly |
Version |
string |
The Version of this Assembly |
IEvent
In order to see these properties with autocomplete your variable name needs to equal "e" or "ev" or contain the string "Event" (case insensitive)
Property |
Type |
Comments |
EventId |
int |
The Nitriq Unique Id for this Event. You must select this in a query in order for the Treemap and other visualizations to work properly |
EventType |
IType |
The Type of this Event |
FullName |
string |
The Full Name of this Event |
IsInCoreAssembly |
bool |
Returns whether or not this Event is a Core Assembly. Core Assemblies are the assemblies you are primarily concerned with analyzing. |
IsInternal |
bool |
Whether or not this Event is marked Internal |
IsPrivate |
bool |
Whether or not this Event is marked Private |
IsProtected |
bool |
Whether or not this Event is marked Protected |
IsPublic |
bool |
Whether or not this Event is marked Public |
IsStatic |
bool |
Whether or not this Event is marked Static |
Name |
string |
The Name of this Event |
Type |
IType |
The Type that Declares this Event |
TypesUsed |
TypeCollection |
A Collection of Types that this Event depends on |
IField
In order to see these properties with autocomplete your variable name needs to equal "m" or contain the string "Method" (case insensitive)
Property |
Type |
Comments |
FieldId |
int |
The Nitriq Unique Id for this Field. You must select this in a query in order for the Treemap and other visualizations to work properly |
FieldType |
IType |
The Type of this Field |
FullName |
string |
The Full Name of this Field |
GotByMethods |
MethodCollection |
A Collection of Methods that retrieve values from this Field |
IsInCoreAssembly |
bool |
Returns whether or not this Field is a Core Assembly. Core Assemblies are the assemblies you are primarily concerned with analyzing. |
IsInternal |
bool |
Whether or not this Field is marked Internal |
IsPrivate |
bool |
Whether or not this Field is marked Private |
IsProtected |
bool |
Whether or not this Field is marked Protected |
IsProtectedAndInternal |
bool |
Whether or not this Field is marked Protected and Internal |
IsProtectedOrInternal |
bool |
Whether or not this Field is marked Protected or Internal |
IsPublic |
bool |
Whether or not this Field is marked Public |
IsStatic |
bool |
Whether or not this Field is marked Static |
Name |
string |
The Name of this Field |
SetByMethods |
MethodCollection |
A Collection of Methods that assign values to this Field |
Type |
IType |
The Type that Declares this Field |
TypesUsed |
TypeCollection |
A Collection of Types that this Field depends on |
IMethod
In order to see these properties with autocomplete your variable name needs to equal "m" or contain the string "Method" (case insensitive)
Property |
Type |
Comments |
CalledBy |
MethodCollection |
Methods that call this Method |
Calls |
MethodCollection |
Methods that this Method Calls |
CommentLineCount |
int |
The number of lines with comments in the source code for this Method |
Cyclomatic |
int |
The Cyclomatic Complexity (CC) of this Method. CC is the number of individual paths through a method. In C# it is the count the following tokens if, &&, ||, for, foreach, case, default, continue, while, goto, catch, ??, and a ternary expression |
FieldGets |
FieldCollection |
Fields that this Method Gets (reads from) |
FieldSets |
FieldCollection |
Fields that this Method Sets |
FullName |
string |
The Full Name of this method |
ILCount |
int |
The number of IL Instructions in this Method |
ILCyclomatic |
int |
The cyclomatic complexity of the IL for a method is the count of the distinct offset targets in a branch/jump instruction |
IsConstructor |
bool |
Whether or not this Method is a Constructor |
IsEventAdder |
bool |
Whether or not this Method is an Event Adder |
IsEventRemover |
bool |
Whether or not this Method is an Index Remover |
IsGeneric |
bool |
Whether or not this Method is has generic parameters |
IsInCoreAssembly |
bool |
Returns whether or not this Method is a Core Assembly. Core Assemblies are the assemblies you are primarily concerned with analyzing. |
IsIndexGetter |
bool |
Whether or not this Method is an Index Getter (ie this[int index]) |
IsIndexSetter |
bool |
Whether or not this Method is an Index Setter (ie this[int index]) |
IsInternal |
bool |
Whether or not this Method is marked Internal (only visible from the same assembly) |
IsOperator |
bool |
Whether or not this Method is an Operator |
IsPrivate |
bool |
Whether or not this Method is marked Private |
IsPropertyGetter |
bool |
Whether or not this Method is a Property Getter |
IsPropertySetter |
bool |
Whether or not this Method is a Property Setter |
IsProtected |
bool |
Whether or not this Method is marked Protected |
IsProtectedAndInternal |
bool |
Whether or not this Type is marked Protected and Internal (visible only to derived classes from the same assembly) |
IsProtectedOrInternal |
bool |
Whether or not this Type is marked Protected or Internal (visible only to derived classes or classes in the same assembly) |
IsPublic |
bool |
Whether or not this Method is marked Public |
IsStatic |
bool |
Whether or not this Method is marked Static |
IsStaticConstructor |
bool |
Whether or not this Method is a Static Constructor |
IsVirtual |
bool |
Whether or not this Method is marked Virtual |
LogicalLineCount |
int |
The number of breakpoints that *could* be set in this Method. |
MethodId |
int |
The Nitriq Unique Id for this Method. You must select this in a query in order for the Treemap and other visualizations to work properly |
Name |
string |
The Name of this method |
OverloadCount |
int |
The number of overloads for this Method (same method name on the same class but with a different set of parameters) |
ParameterCount |
int |
The number of parameters on this Method |
ParameterTypes |
TypeCollection |
A distinct set of the Types of this Method's Parameters |
PercentComment |
double |
The percent of lines in this Method that are comments (100 * CommentLineCount / PhysicalLineCount) |
PhysicalLineCount |
int |
The number of line breaks in the source code for this Method. |
ReturnType |
IType |
The Type that this Method returns |
Type |
IType |
The Type that Declares this method |
TypesUsed |
TypeCollection |
A Collection of Types that this method depends on |
UsesBoxing |
bool |
Whether or not this Method uses Boxing |
UsesUnboxing |
bool |
Whether or not this Method uses Unboxing |
INamespace
In order to see these properties with autocomplete your variable name needs to equal "n" or "ns" or contain the string "Namespace" (case insensitive)
Property |
Type |
Comments |
FullName |
string |
The FullName of this Namespace |
NamespaceId |
int |
The Nitriq Unique Id given to this Namespace. You must select this in a query in order for the Treemap and other visualizations to work properly. |
Types |
TypeCollection |
A Collection of Types that are contained in this Namespace |
IType
In order to see these properties with autocomplete your variable name needs to equal "t" or contain the string "Type" (case insensitive)
Property |
Type |
Comments |
Assembly |
IAssembly |
The IAssembly that contains this Type |
BaseType |
IType |
The Base Type for this Type |
CommentLineCount |
int |
The sum of the comment lines for all Methods in this Type. Does NOT include any lines/comments outside of its methods. |
Cyclomatic |
int |
The sum of the cyclomatic complexity for all Methods in this Type |
DerivedTypes |
TypeCollection |
A Collection of Types that derive from this Type |
Events |
EventCollection |
A Collection of this Type's Events |
Fields |
FieldCollection |
A Collection of this Type's Fields |
FullName |
string |
The full name of this Type |
GenericParameterCount |
int |
The number of generic parameters on this Type |
ILCount |
int |
The sum of the IL instructions for all Methods in this Type |
InheritanceDepth |
int |
The Depth of this Type in its Inheritance Tree |
Interfaces |
TypeCollection |
A Collection of Interfaces that this Type implements |
IsAbstract |
bool |
Whether or not this Type is Abstract |
IsClass |
bool |
Whether or not this Type is a Class |
IsDelegate |
bool |
Whether or not this Type is a Delegate |
IsEnum |
bool |
Whether or not this Type is an Enum |
IsInCoreAssembly |
bool |
Returns whether or not this Type is a Core Assembly. Core Assemblies are the assemblies you are primarily concerned with analyzing. |
IsInterface |
bool |
Whether or not this Type is an Interface |
IsInternal |
bool |
Whether or not this Type is marked Internal |
IsNested |
bool |
Whether or not this Type is a Nested Type |
IsPrivate |
bool |
Whether or not this Type is marked Private |
IsProtected |
bool |
Whether or not this Type is marked Protected (visible only to derived classes) |
IsProtectedAndInternal |
bool |
Whether or not this Type is marked Protected and Internal (visible only to derived classes from the same assembly) |
IsProtectedOrInternal |
bool |
Whether or not this Type is marked Protected or Internal (visible only to derived classes or classes in the same assembly) |
IsPublic |
bool |
Whether or not this Type is marked Public |
IsSealed |
bool |
Whether or not this Type is Sealed (doesn't allow for derived classes) |
IsStatic |
bool |
Whether or not this Type is Static |
IsValueType |
bool |
Whether or not this Type is a Value Type |
LogicalLineCount |
int |
The number of breakpoints that could be set inside this type |
Methods |
MethodCollection |
A Collection of this Type's Methods |
Name |
string |
The name of this Type |
Namespace |
INamespace |
The INamespace that contains this Type |
PercentComment |
double |
The CommentLineCount divided by the PhysicalLineCount. (Only counts lines inside a method) |
PhysicalLineCount |
int |
The sum of the line count for all Methods in this Type. Does NOT include any lines outside of its methods |
TypeId |
int |
The Nitriq Unique Id for this Type. You must select this in a query in order for the Treemap and other visualizations to work properly |
TypesUsed |
TypeCollection |
A Collection of Types that this Type depends on |
TypesUsing |
TypeCollection |
A Collection of Types that depend on this Type |