private IFixedStringsArray GetDimensionValues(HDimensions dimensions) { return(dimensions.Count switch { 3 => DimensionValues.Create( dimensions[0].Item2, dimensions[1].Item2, dimensions[2].Item2), 5 => DimensionValues.Create( dimensions[0].Item2, dimensions[1].Item2, dimensions[2].Item2, dimensions[3].Item2, dimensions[4].Item2), 10 => DimensionValues.Create( dimensions[0].Item2, dimensions[1].Item2, dimensions[2].Item2, dimensions[3].Item2, dimensions[4].Item2, dimensions[5].Item2, dimensions[6].Item2, dimensions[7].Item2, dimensions[8].Item2, dimensions[9].Item2), _ => throw new ArgumentOutOfRangeException(nameof(dimensions)) });
public CounterMetricH(IMdmCumulativeMetric <TDimensionValues, ulong> cumulativeMetric, HDimensions dimensions) { CumulativeMetric = cumulativeMetric ?? throw new ArgumentNullException(nameof(cumulativeMetric)); if (dimensions != null) { _keyHashCode = dimensions.KeyHashCode; _valueHashCode = dimensions.HashCode; } }