NDepend.API Documentation
TryGetCommonRootDirectory Method
NDepend.Path Namespace > ExtensionMethodsOnPathsCollection Class : TryGetCommonRootDirectory Method
This collection of directories absolute paths.
The common root directory if it has been found.
Find the common root directory of all directories of this collection.
Syntax

Parameters

collection
This collection of directories absolute paths.
commonRootDirectory
The common root directory if it has been found.

Return Value

true if a common root directory has been found, else returns false.
Remarks
A return value indicates whether a common root directory has been found. A common root directory cannot be found if at least two directories path on two different drives are in this collection. If the collection contains at least one null path, a common root directory cannot be found.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ExtensionMethodsOnPathsCollection Class
ExtensionMethodsOnPathsCollection Members