StructMultiKey<T1, T2>
using System;
using System.Runtime.CompilerServices;
namespace Newtonsoft.Json.Utilities
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
internal readonly struct StructMultiKey<[System.Runtime.CompilerServices.Nullable(2)] T1, [System.Runtime.CompilerServices.Nullable(2)] T2> : IEquatable<StructMultiKey<T1, T2>>
{
public readonly T1 Value1;
public readonly T2 Value2;
public StructMultiKey(T1 v1, T2 v2)
{
Value1 = v1;
Value2 = v2;
}
public override int GetHashCode()
{
T1 value = Value1;
ref T1 reference = ref value;
T1 val = default(T1);
int num;
if (val == null) {
val = reference;
ref reference = ref val;
if (val == null) {
num = 0;
goto IL_0038;
}
}
num = reference.GetHashCode();
goto IL_0038;
IL_0038:
T2 value2 = Value2;
ref T2 reference2 = ref value2;
T2 val2 = default(T2);
int num2;
if (val2 == null) {
val2 = reference2;
ref reference2 = ref val2;
if (val2 == null) {
num2 = 0;
goto IL_0070;
}
}
num2 = reference2.GetHashCode();
goto IL_0070;
IL_0070:
return num ^ num2;
}
public override bool Equals(object obj)
{
if (!(obj is StructMultiKey<T1, T2>))
return false;
StructMultiKey<T1, T2> other = (StructMultiKey<T1, T2>)obj;
return Equals(other);
}
public bool Equals([System.Runtime.CompilerServices.Nullable(new byte[] {
0,
1,
1
})] StructMultiKey<T1, T2> other)
{
if (object.Equals(Value1, other.Value1))
return object.Equals(Value2, other.Value2);
return false;
}
}
}