Interface IDotNetManager
Exposes base operations concerning the .NET platforms versions installed, including getting .NET Fx installation directories. An instance of IDotNetManager can be obtained from the property NDependServicesProvider.DotNetManager.
public interface IDotNetManager
- Extension Methods
Property (1)
HighestDotNetVersionAnalyzable
Gets the highest .NET version that can be analyzed by the current NDepend version.
Version HighestDotNetVersionAnalyzable { get; }
Property Value
Methods (5)
GetAssemblyInfo(IAbsoluteFilePath)
Returns assembly information if the file specified is a main module of a .NET assembly, otherwise returns null.
IAssemblyInfo GetAssemblyInfo(IAbsoluteFilePath filePath)
Parameters
filePathIAbsoluteFilePathThe path to the main module file of a .NET assembly.
Returns
GetDotNetProfileDirectories(DotNetProfile, Version)
Gets a sequence of directory paths containing assemblies of the dotNetProfile, specified version.
IEnumerable<IAbsoluteDirectoryPath> GetDotNetProfileDirectories(DotNetProfile dotNetProfile, Version version)
Parameters
dotNetProfileDotNetProfileThe .NET profile target.
versionVersionThe version demanded, only the version major and minor numbers are taken account.
Returns
- IEnumerable<IAbsoluteDirectoryPath>
Directory paths containing assemblies of the
dotNetProfile, specifiedversion.
An empty sequence ifversionis not supported.
Some directories paths are returned even ifversionofdotNetProfileis not installed. In such case these directories doesn't exist.
Remarks
Only the version major and minor numbers are taken account.
Returns an empty set of directories if the version is not a valid version.
GetDotNetProfileVersionsInstalled(DotNetProfile)
Gets the versions installed on the machine, for the specified .NET profile.
IEnumerable<Version> GetDotNetProfileVersionsInstalled(DotNetProfile dotNetProfile)
Parameters
dotNetProfileDotNetProfileThe .NET profile target.
Returns
- IEnumerable<Version>
A sequence a versions of the profile supported on the current machine.
An empty sequence if no version ofdotNetProfileis installed on the current machine.
Remarks
Versions are returned in decreased order, higher version installed first.
Notes that NDepend needs at least .NET framework v4.0 to run, so the returned version for the DotNetFramework profile must include v4.0 or above.
Only the version major and minor numbers are taken account.
IsAssembly(IAbsoluteFilePath)
Returns true if the file specified is a main module of a .NET assembly.
bool IsAssembly(IAbsoluteFilePath filePath)
Parameters
filePathIAbsoluteFilePathThe path to the file to test whether it is a main module assembly.
Returns
IsInstalled(DotNetProfile, Version)
Returns true if the .NET profile version specified is installed on the current machine, otherwise returns false.
bool IsInstalled(DotNetProfile dotNetProfile, Version version)
Parameters
dotNetProfileDotNetProfileThe .NET profile target.
versionVersionThe version demanded, only the version major and minor numbers are taken account.