Table of Contents

Interface IDotNetManager

Namespace
NDepend.DotNet
Assembly
NDepend.API.dll

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

Version

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

filePath IAbsoluteFilePath

The path to the main module file of a .NET assembly.

Returns

IAssemblyInfo

GetDotNetProfileDirectories(DotNetProfile, Version)

Gets a sequence of directory paths containing assemblies of the dotNetProfile, specified version.

IEnumerable<IAbsoluteDirectoryPath> GetDotNetProfileDirectories(DotNetProfile dotNetProfile, Version version)

Parameters

dotNetProfile DotNetProfile

The .NET profile target.

version Version

The version demanded, only the version major and minor numbers are taken account.

Returns

IEnumerable<IAbsoluteDirectoryPath>

Directory paths containing assemblies of the dotNetProfile, specified version.
An empty sequence if version is not supported.
Some directories paths are returned even if version of dotNetProfile is 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

dotNetProfile DotNetProfile

The .NET profile target.

Returns

IEnumerable<Version>

A sequence a versions of the profile supported on the current machine.
An empty sequence if no version of dotNetProfile is 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

filePath IAbsoluteFilePath

The path to the file to test whether it is a main module assembly.

Returns

bool

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

dotNetProfile DotNetProfile

The .NET profile target.

version Version

The version demanded, only the version major and minor numbers are taken account.

Returns

bool