NDepend.API Documentation
DepthOfDeriveFrom Method (ExtensionMethodsSequenceUsage)
NDepend.CodeModel Namespace > ExtensionMethodsSequenceUsage Class : DepthOfDeriveFrom Method
This sequence of types.
The type base of types in the returned code metric DefinitionDomain.
Returns a ICodeMetric<TCodeElement,TNumeric> object whose DefinitionDomain is a sub-sequence of this sequence types, containing only types that derive from typeBase. The metric value for each type in DefinitionDomain is equal to the depth of inheritance relative to typeBase.
Syntax
[Extension()]
public static ICodeMetric<IType,ushort> DepthOfDeriveFrom( 
   IEnumerable<IType> types,
   IType typeBase
)

Parameters

types
This sequence of types.
typeBase
The type base of types in the returned code metric DefinitionDomain.
Remarks
The depth of typeBase is 0.
The depth of types that directly derive from typeBase is 1.
And so forth.
This extension method has a O(types.Count) 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

ExtensionMethodsSequenceUsage Class
ExtensionMethodsSequenceUsage Members
BaseClass Property
BaseClasses Property
DeriveFrom Method
DepthOfDeriveFrom Method
DerivedTypes Property
DirectDerivedTypes Property
ThatDeriveFrom Method
ThatDeriveFromAny Method
ThatDirectlyDeriveFrom Method
ThatDirectlyDeriveFromAny Method
DepthOfDeriveFromAny Method
NDepend.Reserved.CQLinq.ExtensionMethodsCQLinqDependency.DeriveFrom(NDepend.CodeModel.IType,System.String)
NDepend.Reserved.CQLinq.ExtensionMethodsCQLinqDependency.DepthOfDeriveFrom(NDepend.CodeModel.IType,System.String)