int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
        {
            ITuple rest = (ITuple)this.m_Rest;

            if (rest.Size >= 8)
            {
                return(rest.GetHashCode(comparer));
            }
            switch ((8 - rest.Size))
            {
            case 1:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item7), rest.GetHashCode(comparer)));

            case 2:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item6), comparer.GetHashCode(this.m_Item7), rest.GetHashCode(comparer)));

            case 3:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item5), comparer.GetHashCode(this.m_Item6), comparer.GetHashCode(this.m_Item7), rest.GetHashCode(comparer)));

            case 4:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item4), comparer.GetHashCode(this.m_Item5), comparer.GetHashCode(this.m_Item6), comparer.GetHashCode(this.m_Item7), rest.GetHashCode(comparer)));

            case 5:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item3), comparer.GetHashCode(this.m_Item4), comparer.GetHashCode(this.m_Item5), comparer.GetHashCode(this.m_Item6), comparer.GetHashCode(this.m_Item7), rest.GetHashCode(comparer)));

            case 6:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item2), comparer.GetHashCode(this.m_Item3), comparer.GetHashCode(this.m_Item4), comparer.GetHashCode(this.m_Item5), comparer.GetHashCode(this.m_Item6), comparer.GetHashCode(this.m_Item7), rest.GetHashCode(comparer)));

            case 7:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item1), comparer.GetHashCode(this.m_Item2), comparer.GetHashCode(this.m_Item3), comparer.GetHashCode(this.m_Item4), comparer.GetHashCode(this.m_Item5), comparer.GetHashCode(this.m_Item6), comparer.GetHashCode(this.m_Item7), rest.GetHashCode(comparer)));
            }
            return(-1);
        }
        int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
        {
            ITupleInternal tupleInternal = (ITupleInternal)((object)this.m_Rest);

            if (tupleInternal.Length >= 8)
            {
                return(tupleInternal.GetHashCode(comparer));
            }
            switch (8 - tupleInternal.Length)
            {
            case 1:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item7), tupleInternal.GetHashCode(comparer)));

            case 2:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item6), comparer.GetHashCode(this.m_Item7), tupleInternal.GetHashCode(comparer)));

            case 3:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item5), comparer.GetHashCode(this.m_Item6), comparer.GetHashCode(this.m_Item7), tupleInternal.GetHashCode(comparer)));

            case 4:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item4), comparer.GetHashCode(this.m_Item5), comparer.GetHashCode(this.m_Item6), comparer.GetHashCode(this.m_Item7), tupleInternal.GetHashCode(comparer)));

            case 5:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item3), comparer.GetHashCode(this.m_Item4), comparer.GetHashCode(this.m_Item5), comparer.GetHashCode(this.m_Item6), comparer.GetHashCode(this.m_Item7), tupleInternal.GetHashCode(comparer)));

            case 6:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item2), comparer.GetHashCode(this.m_Item3), comparer.GetHashCode(this.m_Item4), comparer.GetHashCode(this.m_Item5), comparer.GetHashCode(this.m_Item6), comparer.GetHashCode(this.m_Item7), tupleInternal.GetHashCode(comparer)));

            case 7:
                return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item1), comparer.GetHashCode(this.m_Item2), comparer.GetHashCode(this.m_Item3), comparer.GetHashCode(this.m_Item4), comparer.GetHashCode(this.m_Item5), comparer.GetHashCode(this.m_Item6), comparer.GetHashCode(this.m_Item7), tupleInternal.GetHashCode(comparer)));

            default:
                return(-1);
            }
        }
Beispiel #3
0
 int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
 {
     return(Tuple.CombineHashCodes(comparer.GetHashCode(this.m_Item1), comparer.GetHashCode(this.m_Item2)));
 }
Beispiel #4
0
 int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
 {
     return(Tuple.CombineHashCodes(comparer.GetHashCode((object)this.m_Item1), comparer.GetHashCode((object)this.m_Item2), comparer.GetHashCode((object)this.m_Item3), comparer.GetHashCode((object)this.m_Item4), comparer.GetHashCode((object)this.m_Item5), comparer.GetHashCode((object)this.m_Item6), comparer.GetHashCode((object)this.m_Item7)));
 }
Beispiel #5
0
 internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5, int h6, int h7, int h8)
 {
     return(Tuple.CombineHashCodes(Tuple.CombineHashCodes(h1, h2, h3, h4), Tuple.CombineHashCodes(h5, h6, h7, h8)));
 }
Beispiel #6
0
 internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5)
 {
     return(Tuple.CombineHashCodes(Tuple.CombineHashCodes(h1, h2, h3, h4), h5));
 }
Beispiel #7
0
 internal static int CombineHashCodes(int h1, int h2, int h3, int h4)
 {
     return(Tuple.CombineHashCodes(Tuple.CombineHashCodes(h1, h2), Tuple.CombineHashCodes(h3, h4)));
 }
Beispiel #8
0
 internal static int CombineHashCodes(int h1, int h2, int h3)
 {
     return(Tuple.CombineHashCodes(Tuple.CombineHashCodes(h1, h2), h3));
 }