Class Descriptor
Descriptor defines a potential problem and a recommended course of action.
Implements
Inherited Members
Namespace: Unity.ProjectAuditor .Editor
Assembly: Unity.ProjectAuditor.Editor.dll
Syntax
[Serializable]
public sealed class Descriptor : IEquatable<Descriptor>
Constructors
Descriptor(string, string, Areas, string, string)
Initializes and returns an instance of Descriptor.
Declaration
public Descriptor(string id, string title, Areas areas, string description, string recommendation)
Parameters
Type | Name | Description |
---|---|---|
string | id | The Issue ID string. |
string | title | A short human-readable 'name' for the issue |
Areas | areas | The area(s) affected by this issue. |
string | description | A description of the issue. |
string | recommendation | Advice on how to resolve the issue. |
Fields
Areas
Affected areas
Declaration
public Areas Areas
Field Value
Type | Description |
---|---|
Areas |
DefaultSeverity
Default Severity of the issue.
Declaration
public Severity DefaultSeverity
Field Value
Type | Description |
---|---|
Severity |
Description
Description of the issue.
Declaration
public string Description
Field Value
Type | Description |
---|---|
string |
DocumentationUrl
URL to documentation.
Declaration
public string DocumentationUrl
Field Value
Type | Description |
---|---|
string |
Fixer
Optional Auto-Fixer
Declaration
[JsonIgnore]
public Action<ReportItem, AnalysisParams> Fixer
Field Value
Type | Description |
---|---|
Action<Report |
Id
An unique identifier for the issue. IDs must have exactly 3 upper case characters, followed by 4 digits.
Declaration
public string Id
Field Value
Type | Description |
---|---|
string |
IsEnabledByDefault
Returns true if the issue is enabled by default.
Declaration
public bool IsEnabledByDefault
Field Value
Type | Description |
---|---|
bool |
MaximumVersion
Maximum Unity version this issue applies to. If not specified, the issue applies to all versions.
Declaration
public string MaximumVersion
Field Value
Type | Description |
---|---|
string |
MessageFormat
Message used to describe a specific instance of the issue.
Declaration
public string MessageFormat
Field Value
Type | Description |
---|---|
string |
Method
Name of the method of a known code API issue.
Declaration
public string Method
Field Value
Type | Description |
---|---|
string |
MinimumVersion
Minimum Unity version this issue applies to. If not specified, the issue applies to all versions.
Declaration
public string MinimumVersion
Field Value
Type | Description |
---|---|
string |
Platforms
Affected platforms. If null, the issue applies to all platforms.
Declaration
[JsonConverter(typeof(BuildTargetJsonConverter))]
public BuildTarget[] Platforms
Field Value
Type | Description |
---|---|
Build |
Recommendation
Recommendation to fix the issue.
Declaration
public string Recommendation
Field Value
Type | Description |
---|---|
string |
Title
Issue title
Declaration
public string Title
Field Value
Type | Description |
---|---|
string |
Type
Name of the type (namespace and class/struct) of a known code API issue.
Declaration
public string Type
Field Value
Type | Description |
---|---|
string |
Value
The evaluated value of a know code API issue.
Declaration
public string Value
Field Value
Type | Description |
---|---|
string |
Methods
Equals(object)
Returns true if the Descriptor is equal to a given object, false otherwise.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare equality with. |
Returns
Type | Description |
---|---|
bool | The result of the equality comparison. |
Overrides
Equals(Descriptor)
Returns true if the Descriptor is equal to a given Descriptor, false otherwise.
Declaration
public bool Equals(Descriptor other)
Parameters
Type | Name | Description |
---|---|---|
Descriptor | other | The Descriptor to compare equality with. |
Returns
Type | Description |
---|---|
bool | The result of the equality comparison. |
GetHashCode()
Returns the hash code for the Descriptor's Issue ID.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | The computed hash code. |