NDepend.API Documentation
ContainsSameCodeElementsThan<TCodeElement>(IEnumerable<TCodeElement>,IEnumerable<TCodeElement>) Method
NDepend.CodeModel Namespace > ExtensionMethodsHelpers Class > ContainsSameCodeElementsThan Method : ContainsSameCodeElementsThan<TCodeElement>(IEnumerable<TCodeElement>,IEnumerable<TCodeElement>) Method
The code element type that is ICodeElement or that implements ICodeElement.
This sequence of code elements objects.
The other sequence of code elements objects.
Returns true if this codeElements sequence contains the same set of code elements than the otherCodeElements sequence. Otherwise returns false.
Syntax
[Extension()]
public static bool ContainsSameCodeElementsThan<TCodeElement>( 
   IEnumerable<TCodeElement> codeElements,
   IEnumerable<TCodeElement> otherCodeElements
)
where TCodeElement: class, ICodeElement

Parameters

codeElements
This sequence of code elements objects.
otherCodeElements
The other sequence of code elements objects.

Type Parameters

TCodeElement
The code element type that is ICodeElement or that implements ICodeElement.
Remarks
Notice that both sequences can contain doublons, hence this operation first gets codeElements.Distinct() and otherCodeElements.Distinct().
This extension method has a O(codeElements.Count + otherCodeElements.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

ExtensionMethodsHelpers Class
ExtensionMethodsHelpers Members
Overload List