App Metrics Fork me on GitHub
Show / Hide Table of Contents

Struct MetricSetItem

Metric items provide the ability to track either a count or rate for each item in a counters or meters finite set respectively. They also track the overall percentage of each item in the set.

This is useful for example if we needed to track the total number of emails sent but also the count of each type of emails sent or The total rate of emails sent but also the rate at which type of email was sent.

Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace:App.Metrics.Tagging
Assembly:cs.temp.dll.dll
Syntax
public struct MetricSetItem : IEquatable<MetricSetItem>

Constructors

MetricSetItem(String, String)

Declaration
public MetricSetItem(string key, string value)
Parameters
Type Name Description
System.String key
System.String value

MetricSetItem(String[], String[])

Initializes a new instance of the MetricSetItem struct.

Declaration
public MetricSetItem(string[] keys, string[] values)
Parameters
Type Name Description
System.String[] keys

The keys to use to generate a name for the set item.

System.String[] values

The values to use to generate a name for the set item.

Exceptions
Type Condition
System.InvalidOperationException

keys length must be equal to values length

System.ArgumentNullException

keys cannot be null or values items cannot be null or keys cannot be empty or values cannot be empty

Fields

Empty

Declaration
public static readonly MetricSetItem Empty
Field Value
Type Description
MetricSetItem

Properties

Count

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

Methods

Equals(MetricSetItem)

Declaration
public bool Equals(MetricSetItem other)
Parameters
Type Name Description
MetricSetItem other
Returns
Type Description
System.Boolean
Implements
System.IEquatable<T>.Equals(T)

Equals(MetricSetItem, MetricSetItem)

Declaration
public static bool Equals(MetricSetItem left, MetricSetItem right)
Parameters
Type Name Description
MetricSetItem left
MetricSetItem right
Returns
Type Description
System.Boolean

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.ValueType.Equals(System.Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.ValueType.GetHashCode()

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.ValueType.ToString()

Operators

Equality(MetricSetItem, MetricSetItem)

Declaration
public static bool operator ==(MetricSetItem left, MetricSetItem right)
Parameters
Type Name Description
MetricSetItem left
MetricSetItem right
Returns
Type Description
System.Boolean

Inequality(MetricSetItem, MetricSetItem)

Declaration
public static bool operator !=(MetricSetItem left, MetricSetItem right)
Parameters
Type Name Description
MetricSetItem left
MetricSetItem right
Returns
Type Description
System.Boolean
Back to top Copyright © 2017 Allan Hardy
Generated by DocFX