Interface IProjectProperties
Represents main properties of an NDepend project.
public interface IProjectProperties
- Extension Methods
Properties (10)
CompressAnalysisResultFile
Gets or sets a boolean value indicating whether the content of the analysis result file (.ndar) gets compressed.
bool CompressAnalysisResultFile { get; set; }
Property Value
Remarks
The default value is true. In most cases, the .ndar file size is reduced by a factor of 3 to 4. Zipping at the end of the analysis and unzipping when loading results typically takes less than one second.
FilePath
Gets or sets the NDepend project file path.
IAbsoluteFilePath FilePath { get; set; }
Property Value
Remarks
It is not recommended to change the project file path if some paths referenced by the project are relative.
Indeed, in such situation most of directories and files referenced by the project are relative to the FilePath.
When the file path is changed, the event IProject.SettingsChanged is triggered with the flag ProjectSettings.FilePath activated.
ForceReturnZeroExitCode
Gets or sets a value indicating whether the analysis should always return a zero exit code, even when Quality Gates fail or rule violations are detected.
bool ForceReturnZeroExitCode { get; set; }
Property Value
Remarks
The default value is false. This flag is especially useful when NDepend is run in a Continuous Integration environment like TeamCity and you don't want the NDepend analysis to fail the build process.
KeepXmlFiles
Gets or sets a boolean value indicating whether at the end of an analysis, the XML files used to generate the report through a XSL transformation, are kept or not.
bool KeepXmlFiles { get; set; }
Property Value
Remarks
When the property is changed, the event IProject.SettingsChanged is triggered with the flag ProjectSettings.Report_KeepXmlFilesUsedToBuildReport activated.
MergeCodeGeneratedByCompiler
Gets or sets a boolean value indicating whether at analysis time, types and methods generated by the C# and VB.NET compilers to handle language constructs like lambda, iterators, anonymous and asynchronous methods, are merged within their declaring methods.
bool MergeCodeGeneratedByCompiler { get; set; }
Property Value
Remarks
The default value is true. In most situations you'll want to avoid having to deal with such generated types and methods.
Anonymous types are not merged since they are explicitly created and used in the source code.
Types created by the Microsoft Code Contract infrastructure are not merged as well.
Name
Gets or sets the name of the NDepend project.
string Name { get; set; }
Property Value
Remarks
When the name is changed, the event IProject.SettingsChanged is triggered with the flag ProjectSettings.Name activated.
OutputDir
Gets or sets the output directory path of the NDepend project, the path where all analysis results will be stored.
IDirectoryPath OutputDir { get; set; }
Property Value
Remarks
When the output directory is changed, the event IProject.SettingsChanged is triggered with the flag ProjectSettings.OutputDirectoryPath activated.
ProjectFileWrittenByProductVersion
Gets the NDepend version that has written last time this project file.
Version ProjectFileWrittenByProductVersion { get; }
Property Value
Remarks
This property appeared with NDepend version 7. All project written with a major version lower than 7 have by default the version 6.0.0.0.
TemporaryProjectMode
Gets a value indicating whether this project is a temporary project or not.
TemporaryProjectMode TemporaryProjectMode { get; }
Property Value
Remarks
By working with temporary projects, you can create and experiment with a project without specifying a disk location or a project name.
- See Also
ZipSourceFiles
Gets or sets a boolean value indicating whether at analysis time source files get zipped.
bool ZipSourceFiles { get; set; }
Property Value
Remarks
The default value is true. In most situations you'll want to zip source files. Having access to source files is especially useful when you want to diff particular changes in code.
However, zipping source files consumes a bit of CPU at analysis time and a bit of hard drive space to keep the zip files for each analysis result.
So it might make sense to prefer no zipping source files.