docs.unity3d.com
    Show / Hide Table of Contents

    Struct ArgumentInfo

    Parsed Argument/Hole data. See https://messagetemplates.org/ for Holes

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Logging
    Syntax
    public readonly struct ArgumentInfo

    Constructors

    ArgumentInfo(Int32, FixedString512Bytes, ArgumentInfo.DestructingType, FixedString512Bytes, Int32)

    Constructor of the ArgumentInfo

    Declaration
    public ArgumentInfo(int index, FixedString512Bytes name, ArgumentInfo.DestructingType destructingType, FixedString512Bytes format, int alignment)
    Parameters
    Type Name Description
    Int32 index

    Integer in the hole, like {0} or {42}, if not set see Name

    FixedString512Bytes name

    Name of the hole, like {thisIsName} or default if Index is used instead

    ArgumentInfo.DestructingType destructingType

    @, $ or default

    FixedString512Bytes format

    Format - custom string after :

    Int32 alignment

    Integer after comma, before :

    Fields

    Alignment

    Alignment that is specified after ','

    Declaration
    public readonly int Alignment
    Field Value
    Type Description
    Int32

    BuiltInLevelId

    Builtin code for the level context argument

    Declaration
    public const int BuiltInLevelId = -101
    Field Value
    Type Description
    Int32

    BuiltInMessage

    Builtin code for the message context argument

    Declaration
    public const int BuiltInMessage = -102
    Field Value
    Type Description
    Int32

    BuiltInNewLine

    Builtin code for the newline context argument

    Declaration
    public const int BuiltInNewLine = -104
    Field Value
    Type Description
    Int32

    BuiltInProperties

    Builtin code for the properties context argument

    Declaration
    public const int BuiltInProperties = -105
    Field Value
    Type Description
    Int32

    BuiltInStackTrace

    Builtin code for the stacktrace context argument

    Declaration
    public const int BuiltInStackTrace = -103
    Field Value
    Type Description
    Int32

    BuiltInTimestampId

    Builtin code for the timestamp context argument

    Declaration
    public const int BuiltInTimestampId = -100
    Field Value
    Type Description
    Int32

    Destructing

    See ArgumentInfo.DestructingType

    Declaration
    public readonly ArgumentInfo.DestructingType Destructing
    Field Value
    Type Description
    ArgumentInfo.DestructingType

    Format

    Format that is specified after ':'

    Declaration
    public readonly FixedString512Bytes Format
    Field Value
    Type Description
    FixedString512Bytes

    Index

    Indexed hole (if no Name was specified)

    Declaration
    public readonly int Index
    Field Value
    Type Description
    Int32

    IsValidByte

    Non-Zero if created

    Declaration
    public readonly byte IsValidByte
    Field Value
    Type Description
    Byte

    Name

    Name of the hole

    Declaration
    public readonly FixedString512Bytes Name
    Field Value
    Type Description
    FixedString512Bytes

    Type

    ArgumentInfo.HoleType of this hole.

    Declaration
    public readonly ArgumentInfo.HoleType Type
    Field Value
    Type Description
    ArgumentInfo.HoleType

    Properties

    IsBuiltIn

    True if the ArgumentInfo.HoleType is not built-in, but user defined.

    Declaration
    public readonly bool IsBuiltIn { get; }
    Property Value
    Type Description
    Boolean

    IsValid

    True if created

    Declaration
    public readonly bool IsValid { get; }
    Property Value
    Type Description
    Boolean

    Methods

    Number(Int32)

    Create a hole from a number (index)

    Declaration
    public static ArgumentInfo Number(int i)
    Parameters
    Type Name Description
    Int32 i

    index to use

    Returns
    Type Description
    ArgumentInfo

    ArgumentInfo with Index == i

    ParseArgument(Byte*, Int32, in ParseSegment)

    Parses ArgumentInfo from UTF8 string's segment

    Declaration
    public static ArgumentInfo ParseArgument(byte *rawMsgBuffer, int rawMsgBufferLength, in ParseSegment currArgSegment)
    Parameters
    Type Name Description
    Byte* rawMsgBuffer

    Pointer to UTF8 string

    Int32 rawMsgBufferLength

    Full length of the UTF8 string

    ParseSegment currArgSegment

    Segment to parse inside the UTF8 string

    Returns
    Type Description
    ArgumentInfo

    Parsed ArgumentInfo or default if error occured

    RetrieveContextArgumentIndex(in Byte*, in ParseSegment, Boolean)

    Returns an index of the context argument to use in WriteMessage or builtin code

    Declaration
    public static int RetrieveContextArgumentIndex(in byte *rawBuffer, in ParseSegment argSlotSegment, bool isThisTemplate)
    Parameters
    Type Name Description
    Byte* rawBuffer

    Pointer to argument UTF8 string

    ParseSegment argSlotSegment

    Segment inside the UTF8 string

    Boolean isThisTemplate

    True if this is a template (so {Message} is valid)

    Returns
    Type Description
    Int32

    Index of the context argument to use in WriteMessage or builtin code

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023