<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.0" />

StringSequence2

namespace System.Diagnostics.Metrics { internal struct StringSequence2 : IEquatable<StringSequence2>, IStringSequence { public string Value1; public string Value2; public string this[int i] { get { switch (i) { case 0: return Value1; case 1: return Value2; default: throw new IndexOutOfRangeException(); } } set { switch (i) { case 0: Value1 = value; break; case 1: Value2 = value; break; default: throw new IndexOutOfRangeException(); } } } public int Length => 2; public StringSequence2(string value1, string value2) { Value1 = value1; Value2 = value2; } public bool Equals(StringSequence2 other) { if (Value1 == other.Value1) return Value2 == other.Value2; return false; } public override bool Equals(object obj) { if (obj is StringSequence2) { StringSequence2 other = (StringSequence2)obj; return Equals(other); } return false; } public override int GetHashCode() { return (Value1?.GetHashCode() ?? 0) ^ (Value2?.GetHashCode() ?? 0); } } }