NDepend.API Documentation
DepthOfIsUsedByAny<TUsed,TUser> Method
NDepend.CodeModel Namespace > ExtensionMethodsSequenceUsage Class : DepthOfIsUsedByAny<TUsed,TUser> Method
The used code elements type that is IUsed or that implements IUsed.
The user code elements type that is IUser or that implements IUser.
This sequence of code elements.
The sequence of code elements that uses directly or indirectly code elements in the returned sequence.
Returns a ICodeMetric<TCodeElement,TNumeric> object whose DefinitionDomain is a sub-sequence of this sequence codeElementsUsed, containing only code elements directly or indirectly used by any code element in codeElementsUser. The metric value for each code element in DefinitionDomain is equal to the depth of usage.
Syntax
[Extension()]
public static ICodeMetric<TUsed,ushort> DepthOfIsUsedByAny<TUsed,TUser>( 
   IEnumerable<TUsed> codeElementsUsed,
   IEnumerable<TUser> codeElementsUser
)
where TUsed: class, ICodeElement
where TUser: class, IUser

Parameters

codeElementsUsed
This sequence of code elements.
codeElementsUser
The sequence of code elements that uses directly or indirectly code elements in the returned sequence.

Type Parameters

TUsed
The used code elements type that is IUsed or that implements IUsed.
TUser
The user code elements type that is IUser or that implements IUser.
Remarks
If a code element in codeElementsUser or a child or parent of a code element in codeElementsUser, is in the returned sequence, its depth of usage is 0.
The depth of usage of a code element in codeElementsUsed, directly used by a code element in codeElementsUser or a child or parent of a code element in codeElementsUser, is 1.
And so forth.
This extension method has a O(codeElementsUsed.Count + codeElementsUser.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
IsUsedBy Method
UsedByAny<TUsed,TUser> Method
UsedByAll<TUsed,TUser> Method
DepthOfIsUsedBy<TUsed,TUser> Method