docs.unity3d.com
    Show / Hide Table of Contents

    Struct MetricId

    Wrapper around an enum with the MetricTypeEnumAttribute. The struct provide a way to create metric that can be used with multiplayer tools.

    Inherited Members
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Multiplayer.Tools.NetStats
    Syntax
    [Serializable]
    public struct MetricId : IEquatable<MetricId>

    Methods

    Create<T>(T)

    Static function to create a MetricId.

    Declaration
    public static MetricId Create<T>(T value)
        where T : struct, IConvertible
    Parameters
    Type Name Description
    T value

    Enum value for the metric.

    Returns
    Type Description
    MetricId
    Type Parameters
    Name Description
    T

    An enum with the MetricTypeEnumAttribute

    Equals(Object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The object to compare with the current object..

    Returns
    Type Description
    Boolean

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    ValueType.Equals(Object)

    Equals(MetricId)

    Determines whether the specified MetricId is equal to the current MetricId.

    Declaration
    public bool Equals(MetricId other)
    Parameters
    Type Name Description
    MetricId other

    The MetricId to compare with the current MetricId.

    Returns
    Type Description
    Boolean

    true if the specified MetricId is equal to the current MetricId; otherwise, false.

    Implements
    IEquatable<T>.Equals(T)

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code for the current MetricId.

    Overrides
    ValueType.GetHashCode()

    ToString()

    Returns a string that represents the current MetricId.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string that represents the current MetricId.

    Overrides
    ValueType.ToString()

    Operators

    Implicit(MetricId to String)

    Implicit operator to convert to string.

    Declaration
    public static implicit operator string (MetricId metricId)
    Parameters
    Type Name Description
    MetricId metricId

    The MetricId to convert to string.

    Returns
    Type Description
    String

    The name of the MetricId.

    In This Article
    • Methods
      • Create<T>(T)
      • Equals(Object)
      • Equals(MetricId)
      • GetHashCode()
      • ToString()
    • Operators
      • Implicit(MetricId to String)
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 26 October 2023