NDepend.API Documentation
FieldTypeIs Method
NDepend.Reserved.CQLinq Namespace > ExtensionMethodsCQLinqDependency Class : FieldTypeIs Method
This field.
The NDepend.CodeModel.ICodeElement.FullName of this field's type.
The string fieldTypeFullName can contain wildcard '*' characters but cannot be just a single wildcard string "*".
If one or several types are matched by fieldTypeFullName, this method has a has any field type behavior.
Returns true if field has a field type whose NDepend.CodeModel.ICodeElement.FullName is fieldTypeFullName. This method can only be called in a ICQLinqExecutionContext, otherwise the property getter NDepend.CodeModel.IField.NDepend.CodeModel.IField.FieldType must be used instead.
Syntax
[Extension()]
public static bool FieldTypeIs( 
   IField field,
   string fieldTypeFullName
)

Parameters

field
This field.
fieldTypeFullName
The NDepend.CodeModel.ICodeElement.FullName of this field's type.
The string fieldTypeFullName can contain wildcard '*' characters but cannot be just a single wildcard string "*".
If one or several types are matched by fieldTypeFullName, this method has a has any field type behavior.

Return Value

fieldType being a NDepend.CodeModel.IType whose NDepend.CodeModel.ICodeElement.FullName is fieldTypeFullName:
Returns true if field has for field type a fieldType, otherwise returns false.
Exceptions
ExceptionDescription
This extension method cannot be called from a program consuming NDepend.API. In such context, the property getter NDepend.CodeModel.IField.NDepend.CodeModel.IField.FieldType must be used instead.
Remarks
If one or several types are matched by fieldTypeFullName, they will be listed in NDepend.CodeQuery.IQueryExecutionSuccessResult.TargetCodeElements.
In the context of a CQLinq compiled query, this method has a constant time complexity.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ExtensionMethodsCQLinqDependency Class
ExtensionMethodsCQLinqDependency Members
WithFieldType Method
WithFieldTypeIn Method