Struct MetricId
Wrapper around an enum with the MetricTypeEnumAttribute. The struct provide a way to create metric that can be used with multiplayer tools.
Implements
Inherited Members
Namespace: Unity.Multiplayer.Tools.NetStats
Assembly: Unity.Multiplayer.Tools.NetStats.dll
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 : unmanaged, Enum
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 |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
Equals(MetricId)
Declaration
public bool Equals(MetricId other)
Parameters
Type | Name | Description |
---|---|---|
MetricId | other |
Returns
Type | Description |
---|---|
bool | true if the specified MetricId is equal to the current MetricId; otherwise, false. |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current MetricId. |
Overrides
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
Operators
implicit operator string(MetricId)
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. |