docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ReportItemBuilder

    Provides methods to construct a ReportItem object for a Report.

    Inheritance
    object
    ReportItemBuilder
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.ProjectAuditor.Editor.Core
    Assembly: Unity.ProjectAuditor.Editor.dll
    Syntax
    public class ReportItemBuilder

    Constructors

    ReportItemBuilder(IssueCategory, string)

    Constructor for an object to build ReportItems representing Insights.

    Declaration
    public ReportItemBuilder(IssueCategory category, string description)
    Parameters
    Type Name Description
    IssueCategory category

    The IssueCategory of the reported Insight

    string description

    The primary descriptive string for this Insight

    ReportItemBuilder(IssueCategory, DescriptorId, params object[])

    Constructor for an object to build ReportItems representing Issues.

    Declaration
    public ReportItemBuilder(IssueCategory category, DescriptorId id, params object[] args)
    Parameters
    Type Name Description
    IssueCategory category

    The IssueCategory of the reported Issue

    DescriptorId id

    Identifies the Descriptor object containing information about the Issue

    object[] args

    Arguments to be used in the message formatting

    Methods

    WithCustomProperties(int, object)

    Initialize all custom properties to the same value.

    Declaration
    public ReportItemBuilder WithCustomProperties(int numProperties, object property)
    Parameters
    Type Name Description
    int numProperties

    total number of custom properties

    object property

    value the properties will be set to

    Returns
    Type Description
    ReportItemBuilder

    The ReportItemBuilder object with the custom properties set.

    WithCustomProperties(object[])

    Initialize custom properties.

    Declaration
    public ReportItemBuilder WithCustomProperties(object[] properties)
    Parameters
    Type Name Description
    object[] properties

    Issue-specific properties

    Returns
    Type Description
    ReportItemBuilder

    The ReportItemBuilder object with the custom properties initialized.

    WithDependencies(DependencyNode)

    Adds a DependencyNode to the ReportItem being built.

    Declaration
    public ReportItemBuilder WithDependencies(DependencyNode dependencies)
    Parameters
    Type Name Description
    DependencyNode dependencies

    The root DependencyNode of a dependency chain to add

    Returns
    Type Description
    ReportItemBuilder

    The ReportItemBuilder object with the DependencyNode added

    WithDescription(string)

    Adds a description string to the ReportItem being built.

    Declaration
    public ReportItemBuilder WithDescription(string description)
    Parameters
    Type Name Description
    string description

    Description string to add

    Returns
    Type Description
    ReportItemBuilder

    The ReportItemBuilder object with the description string added

    WithLocation(string, int)

    Constructs a Location object and adds it to the ReportItem being built.

    Declaration
    public ReportItemBuilder WithLocation(string path, int line = 0)
    Parameters
    Type Name Description
    string path

    File path within the project describing where the specific item was found

    int line

    A line number within the file

    Returns
    Type Description
    ReportItemBuilder

    The ReportItemBuilder object with the Location added

    WithLocation(Location)

    Adds a Location to the ReportItem being built.

    Declaration
    public ReportItemBuilder WithLocation(Location location)
    Parameters
    Type Name Description
    Location location

    Location object describing where the specific item was found within the project

    Returns
    Type Description
    ReportItemBuilder

    The ReportItemBuilder object with the Location added

    WithLogLevel(LogLevel)

    Adds a LogLevel to the ReportItem being built.

    Declaration
    public ReportItemBuilder WithLogLevel(LogLevel logLevel)
    Parameters
    Type Name Description
    LogLevel logLevel

    Log Level of the item

    Returns
    Type Description
    ReportItemBuilder

    The ReportItemBuilder object with the LogLevel added

    WithSeverity(Severity)

    Adds a Severity to the ReportItem being built.

    Declaration
    public ReportItemBuilder WithSeverity(Severity severity)
    Parameters
    Type Name Description
    Severity severity

    Severity of the item

    Returns
    Type Description
    ReportItemBuilder

    The ReportItemBuilder object with the LogLevel added

    Operators

    implicit operator ReportItem(ReportItemBuilder)

    Implicit conversion of ReportItemBuilder to ReportItem.

    Declaration
    public static implicit operator ReportItem(ReportItemBuilder builder)
    Parameters
    Type Name Description
    ReportItemBuilder builder

    A ReportItemBuilder to convert

    Returns
    Type Description
    ReportItem

    A ReportItem

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)