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
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
Equals(MetricId)
Declaration
public bool Equals(MetricId other)
Parameters
Type | Name | Description |
---|---|---|
MetricId | other |
Returns
Type | Description |
---|---|
Boolean | true if the specified MetricId is equal to the current MetricId; otherwise, false. |
Implements
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | 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(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. |