NDepend.API Documentation
DeriveFrom Method (ExtensionMethodsCQLinqDependency)
NDepend.Reserved.CQLinq Namespace > ExtensionMethodsCQLinqDependency Class : DeriveFrom Method
This derived type.
The NDepend.CodeModel.ICodeElement.FullName of the base class.
The string baseClassFullName can contain wildcard '*' characters but cannot be just a single wildcard string "*".
If one or several classes are matched by baseClassFullName, this method has a derives from any behavior.
Returns true if type is, directly or indirectly, deriving from a class whose NDepend.CodeModel.ICodeElement.FullName is baseClassFullName. This method can only be called in a ICQLinqExecutionContext, otherwise the method NDepend.CodeModel.IType.NDepend.CodeModel.IType.DeriveFrom must be called instead.
Syntax
[Extension()]
public static bool DeriveFrom( 
   IType type,
   string baseClassFullName
)

Parameters

type
This derived type.
baseClassFullName
The NDepend.CodeModel.ICodeElement.FullName of the base class.
The string baseClassFullName can contain wildcard '*' characters but cannot be just a single wildcard string "*".
If one or several classes are matched by baseClassFullName, this method has a derives from any behavior.

Return Value

baseClass being a NDepend.CodeModel.IType whose NDepend.CodeModel.ICodeElement.FullName is baseClassFullName:
Returns true if type is, directly or indirectly, deriving from a baseClass, otherwise returns false.
Exceptions
ExceptionDescription
This extension method cannot be called from a program consuming NDepend.API. In such context, the method NDepend.CodeModel.IType.NDepend.CodeModel.IType.DeriveFrom must be called instead.
Remarks
If one or several classes are matched by baseClassFullName, 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
BaseClass Property
BaseClasses Property
DeriveFrom Method
DepthOfDeriveFrom Method
DerivedTypes Property
DirectDerivedTypes Property
ThatDeriveFrom Method
ThatDeriveFromAny Method
ThatDirectlyDeriveFrom Method
ThatDirectlyDeriveFromAny Method
DepthOfDeriveFrom Method
DepthOfDeriveFromAny Method
NDepend.Reserved.CQLinq.ExtensionMethodsCQLinqDependency.DepthOfDeriveFrom(NDepend.CodeModel.IType,System.String)