Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetHashCode() [33/34]

int System.Tuple< T1, T2, T3, T4, T5, T6, T7, TRest >.GetHashCode ( IEqualityComparer comparer)
inlineprivate

Definition at line 1292 of file Tuple.cs.

1293 {
1294 ITupleInternal tupleInternal = (ITupleInternal)(object)m_Rest;
1295 if (tupleInternal.Length >= 8)
1296 {
1297 return tupleInternal.GetHashCode(comparer);
1298 }
1299 return (8 - tupleInternal.Length) switch
1300 {
1301 1 => Tuple.CombineHashCodes(comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer)),
1302 2 => Tuple.CombineHashCodes(comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer)),
1303 3 => Tuple.CombineHashCodes(comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer)),
1304 4 => Tuple.CombineHashCodes(comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer)),
1305 5 => Tuple.CombineHashCodes(comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer)),
1306 6 => Tuple.CombineHashCodes(comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer)),
1307 7 => Tuple.CombineHashCodes(comparer.GetHashCode(m_Item1), comparer.GetHashCode(m_Item2), comparer.GetHashCode(m_Item3), comparer.GetHashCode(m_Item4), comparer.GetHashCode(m_Item5), comparer.GetHashCode(m_Item6), comparer.GetHashCode(m_Item7), tupleInternal.GetHashCode(comparer)),
1308 _ => -1,
1309 };
1310 }
readonly T6 m_Item6
Definition Tuple.cs:782
readonly T3 m_Item3
Definition Tuple.cs:329
Tuple(T1 item1)
Definition Tuple.cs:108
readonly T7 m_Item7
Definition Tuple.cs:959
readonly T4 m_Item4
Definition Tuple.cs:467
readonly T5 m_Item5
Definition Tuple.cs:618
readonly T1 m_Item1
Definition Tuple.cs:90
readonly T2 m_Item2
Definition Tuple.cs:204
readonly TRest m_Rest
Definition Tuple.cs:1149

References System.Tuple< T1, T2, T3, T4, T5, T6, T7, TRest >.CombineHashCodes(), System.comparer, System.Tuple< T1, T2, T3, T4, T5, T6, T7, TRest >.m_Item1, System.Tuple< T1, T2, T3, T4, T5, T6, T7, TRest >.m_Item2, System.Tuple< T1, T2, T3, T4, T5, T6, T7, TRest >.m_Item3, System.Tuple< T1, T2, T3, T4, T5, T6, T7, TRest >.m_Item4, System.Tuple< T1, T2, T3, T4, T5, T6, T7, TRest >.m_Item5, System.Tuple< T1, T2, T3, T4, T5, T6, T7, TRest >.m_Item6, System.Tuple< T1, T2, T3, T4, T5, T6, T7, TRest >.m_Item7, and System.Tuple< T1, T2, T3, T4, T5, T6, T7, TRest >.m_Rest.