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

Parameters

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

Return Value

returnType being a NDepend.CodeModel.IType whose NDepend.CodeModel.ICodeElement.FullName is returnTypeFullName:
Returns true if method returns a returnType, 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.IMethod.NDepend.CodeModel.IMethod.ReturnType must be used instead.
Remarks
If one or several types are matched by returnTypeFullName, 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
ReturnType Property
WithReturnType Method
WithReturnTypeIn Method