Interface IProjectReport
Represents report settings of an NDepend project.
public interface IProjectReport
- Extension Methods
Properties (10)
DefaultTheme
The default theme for reports generated from this project.
ReportTheme DefaultTheme { get; set; }
Property Value
MaxNbSourceFiles
When the flag ReportOptionsFlags.ShowAllSourceFiles is not-set, this value is used to know the maximum of source files to list in report.
uint MaxNbSourceFiles { get; set; }
Property Value
NbItemsPerRule
When the flag ReportOptionsFlags.DontShowTooManyCodeRulesMatchedItems is not-set, this value is used to know the maximum of items shown in the report per rule or query.
uint NbItemsPerRule { get; set; }
Property Value
NbItemsToUnfold
When the flag ReportOptionsFlags.DontUnfoldMultiItemsCell is not-set, this value is used to know the maximum of items to unfold.
uint NbItemsToUnfold { get; set; }
Property Value
NbTestsPerSourceFile
When the flag ReportOptionsFlags.DontShowTooManyTestsPerSourceFile is set, this value is the maximum number of tests listed in a source file page of the report (the "Used by X tests" pane, where the tests are folded under their test class). The count of tests is never capped.
uint NbTestsPerSourceFile { get; set; }
Property Value
ReportFilePath
Gets the report file path in the directory project.Properties.OutputDir.
IAbsoluteFilePath ReportFilePath { get; }
Property Value
ReportFormat
Gets or sets a value that determines the report format.
ReportFormat ReportFormat { get; set; }
Property Value
Remarks
When this value is changed, the event IProject.SettingsChanged is triggered with the flag ProjectSettings.Report_Format activated.
ReportOptionsFlags
Gets or sets an array of flags that indicates various boolean report options.
ReportOptionsFlags ReportOptionsFlags { get; set; }
Property Value
ReportSectionsEnabled
Gets or sets an array of flags that indicates enabled report sections.
ReportSections ReportSectionsEnabled { get; set; }
Property Value
Remarks
When this value is changed, the event IProject.SettingsChanged is triggered with the flag ProjectSettings.Report_SectionsEnabled activated.
ReportXslPath
Gets or sets the path to the report XSL file. A null value for this path means that the user wants to use the default Xsl sheet to build report.
IFilePath ReportXslPath { get; set; }
Property Value
Remarks
When the report XSL file path is changed, the event IProject.SettingsChanged is triggered with the flag ProjectSettings.Report_XslPath activated.
Method (1)
RebaseSourcePathsInReport(string, string, string)
This method can be called before analyzing with report creation, to update the paths in the report.
void RebaseSourcePathsInReport(string fromPath, string toPath, string lineSuffix)
Parameters
fromPathstringA sub-string of the source path that defines which portion to replace.
toPathstringThe portion replacement in the new path.
lineSuffixstringA string to append at the end of the path with the tag \(LineNumber\) that is replaced with the line number. Empty string is accepted if the updated path shouldn't be suffixed with the line number.
Remarks
For example to transform this path:
C:\a\root\ClassLibrary\test.cs Line 76
to
https://github.com/myproject/testcore/blob/main/ClassLibrary/test.cs#L76
this method can be called with these arguments:
"root", "https://github.com/myproject/testcore/blob/main", "#L$LineNumber$"
Notice that the provided information are not stored in the project file.
They are just used on next calls to RunAnalysisAndBuildReport(IProject, string) on this IProject object.
Exceptions
- ArgumentException
Such exception can be thrown if provided arguments are not valid.