Interface IProjectCodeToAnalyze
Represents application and third-party assemblies to analyze, of an NDepend project.
public interface IProjectCodeToAnalyze
- Extension Methods
Remarks
Assemblies are referenced by names.
A collection of directories is provided.
At assemblies resolving time, assemblies are resolved by names in directories provided. Some IAssemblyResolvingError can then occur.
Properties (5)
ApplicationAssembliesNames
Gets a read-only list of application assemblies files names.
IReadOnlyList<string> ApplicationAssembliesNames { get; }
Property Value
Remarks
The list returned is a read-only clone. Hence it doesn't reflect any modification in the original collection.
Directories
Gets a read-only list of directories paths where to search for assemblies.
IReadOnlyList<IDirectoryPath> Directories { get; }
Property Value
Remarks
The list returned is a read-only clone. Hence, it doesn't reflect any modification in the original collection.
DirectoriesAbsolute
Gets a read-only list of absolute directories paths where to search for assemblies.
IReadOnlyList<IAbsoluteDirectoryPath> DirectoriesAbsolute { get; }
Property Value
Remarks
Return a read-only list of Directories resolved as absolute, in the context of the current machine and the current project.
In this situation, if a directory cannot be resolved to absolute (like for example the relative directory "....\Dir0" cannot be resolved from "C:\Dir1\Project.ndproj"), it doesn't appear in the returned collection of paths.
The list returned is a read-only clone. Hence, it doesn't reflect any modification in the original collection.
IDEFiles
Gets a read-only list of Visual Studio solution(s) or project(s) from which some application assemblies are inferred to be analyzed.
IReadOnlyList<IDEFile> IDEFiles { get; }
Property Value
RuntimeProfileDesc
Get or set a string that describes the .NET runtime profile for assemblies of this project.
string RuntimeProfileDesc { get; set; }
Property Value
Remarks
This value is used to infer runtime profile directories in which referenced assemblies are resolved at analysis time.
Methods (3)
Resolve(out IReadOnlyList<IAbsoluteFilePath>, out IReadOnlyList<IAbsoluteFilePath>, out IReadOnlyList<IAssemblyResolvingError>, out IReadOnlyList<IAssemblyResolvingError>)
Try resolve application and third-party assemblies paths, and if some are not resolved, returns corresponding IAssemblyResolvingError objects.
bool Resolve(out IReadOnlyList<IAbsoluteFilePath> applicationAssemblies, out IReadOnlyList<IAbsoluteFilePath> thirdPartyAssemblies, out IReadOnlyList<IAssemblyResolvingError> applicationAssembliesError, out IReadOnlyList<IAssemblyResolvingError> thirdPartyAssembliesError)
Parameters
applicationAssembliesIReadOnlyList<IAbsoluteFilePath>Paths to application assemblies files resolved.
thirdPartyAssembliesIReadOnlyList<IAbsoluteFilePath>Paths to third-party assemblies files resolved.
applicationAssembliesErrorIReadOnlyList<IAssemblyResolvingError>A read-only list of IAssemblyResolvingError objects, one for each application assemblies files unresolved.
thirdPartyAssembliesErrorIReadOnlyList<IAssemblyResolvingError>A read-only list of IAssemblyResolvingError objects, one for each third-party assemblies files unresolved.
Returns
- bool
Returns true if no assembly resolving error is found, otherwise returns false.
Remarks
The result of this resolving action is not cached and each time calling this method can take a few tenths of second.
SetApplicationAssemblies(IEnumerable<IAbsoluteFilePath>)
Set the collection of application assemblies to analyze.
void SetApplicationAssemblies(IEnumerable<IAbsoluteFilePath> assembliesPath)
Parameters
assembliesPathIEnumerable<IAbsoluteFilePath>The sequence of absolute file paths of the application assemblies to analyze.
Remarks
This method resets the IProjectCodeToAnalyzeApplicationAssembliesNames for this project.
Third-party assemblies are inferred from these application assemblies and also application assemblies inferred from IDEFiles.
Directories (absolute or relative to the NDepend project file path) are inferred as well.
.NET Framework directories are also inferred.
SetIDEFiles(IEnumerable<IDEFile>)
Set the collection of Visual Studio files (solution or project) to analyze from which some application assemblies are inferred to be analyzed.
void SetIDEFiles(IEnumerable<IDEFile> ideFiles)
Parameters
ideFilesIEnumerable<IDEFile>The sequence of Visual Studio files from which some application assemblies are inferred to be analyzed.
Remarks
This method resets the IProjectCodeToAnalyzeIDEFiles for this project.
Third-party assemblies are inferred from application assemblies inferred from IDEFiles and also from ApplicationAssembliesNames.
Directories (absolute or relative to the NDepend project file path) are inferred as well.
.NET Framework directories are also inferred.