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

Parameters

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

Type Parameters

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