Class Report
Report contains a list of all issues found by ProjectAuditor.
Inherited Members
Namespace: Unity.ProjectAuditor .Editor
Assembly: Unity.ProjectAuditor.Editor.dll
Syntax
[Serializable]
public sealed class Report
Fields
DisplayName
A name to display along with the Report, configurable by the user.
Declaration
public string DisplayName
Field Value
Type | Description |
---|---|
string |
SessionInfo
Contains information about the session in which this Report was created.
Declaration
[JsonProperty("sessionInfo")]
[SerializeField]
public SessionInfo SessionInfo
Field Value
Type | Description |
---|---|
Session |
Properties
NumTotalIssues
The total number of ProjectIssues included in this report.
Declaration
[JsonIgnore]
public int NumTotalIssues { get; }
Property Value
Type | Description |
---|---|
int |
Version
File format version of the Report (read-only).
Declaration
[JsonIgnore]
public string Version { get; }
Property Value
Type | Description |
---|---|
string |
Methods
ClearIssues(IssueCategory)
Clears all issues that match the specified IssueCategory from the report.
Declaration
public void ClearIssues(IssueCategory Category)
Parameters
Type | Name | Description |
---|---|---|
Issue |
Category | The IssueCategory of the issues to remove. |
FindByCategory(IssueCategory)
find all issues for a specific IssueCategory.
Declaration
public IReadOnlyCollection<ReportItem> FindByCategory(IssueCategory category)
Parameters
Type | Name | Description |
---|---|---|
Issue |
category | Desired IssueCategory |
Returns
Type | Description |
---|---|
IRead |
Array of project issues |
FindByDescriptorId(string)
Find all Issues that match a specific ID.
Declaration
public IReadOnlyCollection<ReportItem> FindByDescriptorId(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | Desired Descriptor ID |
Returns
Type | Description |
---|---|
IRead |
Array of project issues |
GetAllIssues()
Gets a read-only collection of all of the ProjectIssues included in the report.
Declaration
public IReadOnlyCollection<ReportItem> GetAllIssues()
Returns
Type | Description |
---|---|
IRead |
All the issues in the report |
GetNumIssues(IssueCategory)
Get total number of issues for a specific IssueCategory.
Declaration
public int GetNumIssues(IssueCategory category)
Parameters
Type | Name | Description |
---|---|---|
Issue |
category | Desired IssueCategory |
Returns
Type | Description |
---|---|
int | Number of project issues |
HasCategory(IssueCategory)
Checks whether the Report includes analysis for a given IssueCategory.
Declaration
public bool HasCategory(IssueCategory category)
Parameters
Type | Name | Description |
---|---|---|
Issue |
category | The IssuesCategory to check |
Returns
Type | Description |
---|---|
bool | True if ProjectAuditor ran one or more Modules that reports issues of the specified IssueCategory. Otherwise, returns false. |
IsForCurrentProject()
Is this Report for the currently loaded Project?
Declaration
public bool IsForCurrentProject()
Returns
Type | Description |
---|---|
bool | True if this report is for the currently loaded Unity Project. |
IsValid()
Check whether all issues in the report are valid.
Declaration
public bool IsValid()
Returns
Type | Description |
---|---|
bool | True is none of the issues in the report have a null description string. Otherwise returns false. |
Load(string)
Load a Report from a JSON file at the specified path.
Declaration
public static Report Load(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | File path of the report to load |
Returns
Type | Description |
---|---|
Report | A loaded Report object |
Save(string)
Save the Report as a JSON file.
Declaration
public void Save(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The file path at which to save the file |