Ejemplo n.º 1
0
        // Token: 0x0600046C RID: 1132 RVA: 0x0000DA6C File Offset: 0x0000BC6C
        private int GetHashCodeCore(IEqualityComparer comparer)
        {
            IValueTupleInternal valueTupleInternal = this.Rest as IValueTupleInternal;

            if (valueTupleInternal == null)
            {
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item1), comparer.GetHashCode(this.Item2), comparer.GetHashCode(this.Item3), comparer.GetHashCode(this.Item4), comparer.GetHashCode(this.Item5), comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7)));
            }
            int length = valueTupleInternal.Length;

            if (length >= 8)
            {
                return(valueTupleInternal.GetHashCode(comparer));
            }
            switch (8 - length)
            {
            case 1:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item7), valueTupleInternal.GetHashCode(comparer)));

            case 2:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7), valueTupleInternal.GetHashCode(comparer)));

            case 3:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item5), comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7), valueTupleInternal.GetHashCode(comparer)));

            case 4:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item4), comparer.GetHashCode(this.Item5), comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7), valueTupleInternal.GetHashCode(comparer)));

            case 5:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item3), comparer.GetHashCode(this.Item4), comparer.GetHashCode(this.Item5), comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7), valueTupleInternal.GetHashCode(comparer)));

            case 6:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item2), comparer.GetHashCode(this.Item3), comparer.GetHashCode(this.Item4), comparer.GetHashCode(this.Item5), comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7), valueTupleInternal.GetHashCode(comparer)));

            case 7:
            case 8:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item1), comparer.GetHashCode(this.Item2), comparer.GetHashCode(this.Item3), comparer.GetHashCode(this.Item4), comparer.GetHashCode(this.Item5), comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7), valueTupleInternal.GetHashCode(comparer)));

            default:
                return(-1);
            }
        }
Ejemplo n.º 2
0
        /// <summary>Calculates the hash code for the current <see cref="T:System.ValueTuple`8" /> instance.</summary>
        /// <returns>The hash code for the current <see cref="T:System.ValueTuple`8" /> instance. </returns>
        // Token: 0x0600046A RID: 1130 RVA: 0x0000D774 File Offset: 0x0000B974
        public override int GetHashCode()
        {
            IValueTupleInternal valueTupleInternal = this.Rest as IValueTupleInternal;

            if (valueTupleInternal == null)
            {
                return(ValueTuple.CombineHashCodes(EqualityComparer <T1> .Default.GetHashCode(this.Item1), EqualityComparer <T2> .Default.GetHashCode(this.Item2), EqualityComparer <T3> .Default.GetHashCode(this.Item3), EqualityComparer <T4> .Default.GetHashCode(this.Item4), EqualityComparer <T5> .Default.GetHashCode(this.Item5), EqualityComparer <T6> .Default.GetHashCode(this.Item6), EqualityComparer <T7> .Default.GetHashCode(this.Item7)));
            }
            int length = valueTupleInternal.Length;

            if (length >= 8)
            {
                return(valueTupleInternal.GetHashCode());
            }
            switch (8 - length)
            {
            case 1:
                return(ValueTuple.CombineHashCodes(EqualityComparer <T7> .Default.GetHashCode(this.Item7), valueTupleInternal.GetHashCode()));

            case 2:
                return(ValueTuple.CombineHashCodes(EqualityComparer <T6> .Default.GetHashCode(this.Item6), EqualityComparer <T7> .Default.GetHashCode(this.Item7), valueTupleInternal.GetHashCode()));

            case 3:
                return(ValueTuple.CombineHashCodes(EqualityComparer <T5> .Default.GetHashCode(this.Item5), EqualityComparer <T6> .Default.GetHashCode(this.Item6), EqualityComparer <T7> .Default.GetHashCode(this.Item7), valueTupleInternal.GetHashCode()));

            case 4:
                return(ValueTuple.CombineHashCodes(EqualityComparer <T4> .Default.GetHashCode(this.Item4), EqualityComparer <T5> .Default.GetHashCode(this.Item5), EqualityComparer <T6> .Default.GetHashCode(this.Item6), EqualityComparer <T7> .Default.GetHashCode(this.Item7), valueTupleInternal.GetHashCode()));

            case 5:
                return(ValueTuple.CombineHashCodes(EqualityComparer <T3> .Default.GetHashCode(this.Item3), EqualityComparer <T4> .Default.GetHashCode(this.Item4), EqualityComparer <T5> .Default.GetHashCode(this.Item5), EqualityComparer <T6> .Default.GetHashCode(this.Item6), EqualityComparer <T7> .Default.GetHashCode(this.Item7), valueTupleInternal.GetHashCode()));

            case 6:
                return(ValueTuple.CombineHashCodes(EqualityComparer <T2> .Default.GetHashCode(this.Item2), EqualityComparer <T3> .Default.GetHashCode(this.Item3), EqualityComparer <T4> .Default.GetHashCode(this.Item4), EqualityComparer <T5> .Default.GetHashCode(this.Item5), EqualityComparer <T6> .Default.GetHashCode(this.Item6), EqualityComparer <T7> .Default.GetHashCode(this.Item7), valueTupleInternal.GetHashCode()));

            case 7:
            case 8:
                return(ValueTuple.CombineHashCodes(EqualityComparer <T1> .Default.GetHashCode(this.Item1), EqualityComparer <T2> .Default.GetHashCode(this.Item2), EqualityComparer <T3> .Default.GetHashCode(this.Item3), EqualityComparer <T4> .Default.GetHashCode(this.Item4), EqualityComparer <T5> .Default.GetHashCode(this.Item5), EqualityComparer <T6> .Default.GetHashCode(this.Item6), EqualityComparer <T7> .Default.GetHashCode(this.Item7), valueTupleInternal.GetHashCode()));

            default:
                return(-1);
            }
        }
Ejemplo n.º 3
0
        private int GetHashCodeCore(IEqualityComparer comparer)
        {
            ITupleInternal tupleInternal = this.Rest as ITupleInternal;

            if (tupleInternal == null)
            {
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item1), comparer.GetHashCode(this.Item2), comparer.GetHashCode(this.Item3), comparer.GetHashCode(this.Item4), comparer.GetHashCode(this.Item5), comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7)));
            }
            int size = tupleInternal.Size;

            if (size >= 8)
            {
                return(tupleInternal.GetHashCode(comparer));
            }
            switch (8 - size)
            {
            case 1:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode(comparer)));

            case 2:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode(comparer)));

            case 3:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item5), comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode(comparer)));

            case 4:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item4), comparer.GetHashCode(this.Item5), comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode(comparer)));

            case 5:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item3), comparer.GetHashCode(this.Item4), comparer.GetHashCode(this.Item5), comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode(comparer)));

            case 6:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item2), comparer.GetHashCode(this.Item3), comparer.GetHashCode(this.Item4), comparer.GetHashCode(this.Item5), comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode(comparer)));

            case 7:
            case 8:
                return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item1), comparer.GetHashCode(this.Item2), comparer.GetHashCode(this.Item3), comparer.GetHashCode(this.Item4), comparer.GetHashCode(this.Item5), comparer.GetHashCode(this.Item6), comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode(comparer)));

            default:
                return(-1);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Returns the hash code for the current <see cref="T:System.ValueTuple`8" /> instance.
        /// </summary>
        /// <returns>A 32-bit signed integer hash code.</returns>
        public override int GetHashCode()
        {
            ITupleInternal tupleInternal = this.Rest as ITupleInternal;

            if (tupleInternal == null)
            {
                return(ValueTuple.CombineHashCodes(ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t1Comparer.GetHashCode(this.Item1), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t2Comparer.GetHashCode(this.Item2), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t3Comparer.GetHashCode(this.Item3), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t4Comparer.GetHashCode(this.Item4), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t5Comparer.GetHashCode(this.Item5), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t6Comparer.GetHashCode(this.Item6), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t7Comparer.GetHashCode(this.Item7)));
            }
            int size = tupleInternal.Size;

            if (size >= 8)
            {
                return(tupleInternal.GetHashCode());
            }
            switch (8 - size)
            {
            case 1:
                return(ValueTuple.CombineHashCodes(ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t7Comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode()));

            case 2:
                return(ValueTuple.CombineHashCodes(ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t6Comparer.GetHashCode(this.Item6), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t7Comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode()));

            case 3:
                return(ValueTuple.CombineHashCodes(ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t5Comparer.GetHashCode(this.Item5), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t6Comparer.GetHashCode(this.Item6), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t7Comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode()));

            case 4:
                return(ValueTuple.CombineHashCodes(ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t4Comparer.GetHashCode(this.Item4), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t5Comparer.GetHashCode(this.Item5), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t6Comparer.GetHashCode(this.Item6), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t7Comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode()));

            case 5:
                return(ValueTuple.CombineHashCodes(ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t3Comparer.GetHashCode(this.Item3), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t4Comparer.GetHashCode(this.Item4), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t5Comparer.GetHashCode(this.Item5), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t6Comparer.GetHashCode(this.Item6), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t7Comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode()));

            case 6:
                return(ValueTuple.CombineHashCodes(ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t2Comparer.GetHashCode(this.Item2), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t3Comparer.GetHashCode(this.Item3), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t4Comparer.GetHashCode(this.Item4), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t5Comparer.GetHashCode(this.Item5), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t6Comparer.GetHashCode(this.Item6), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t7Comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode()));

            case 7:
            case 8:
                return(ValueTuple.CombineHashCodes(ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t1Comparer.GetHashCode(this.Item1), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t2Comparer.GetHashCode(this.Item2), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t3Comparer.GetHashCode(this.Item3), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t4Comparer.GetHashCode(this.Item4), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t5Comparer.GetHashCode(this.Item5), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t6Comparer.GetHashCode(this.Item6), ValueTuple <T1, T2, T3, T4, T5, T6, T7, TRest> .s_t7Comparer.GetHashCode(this.Item7), tupleInternal.GetHashCode()));

            default:
                return(-1);
            }
        }
 // Token: 0x06000421 RID: 1057 RVA: 0x0000AFB8 File Offset: 0x000091B8
 private int GetHashCodeCore(IEqualityComparer comparer)
 {
     return(ValueTuple.CombineHashCodes(comparer.GetHashCode(this.Item1), comparer.GetHashCode(this.Item2), comparer.GetHashCode(this.Item3)));
 }
 /// <summary>Calculates the hash code for the current <see cref="T:System.ValueTuple`3" /> instance.</summary>
 /// <returns>The hash code for the current <see cref="T:System.ValueTuple`3" /> instance. </returns>
 // Token: 0x0600041F RID: 1055 RVA: 0x0000AF78 File Offset: 0x00009178
 public override int GetHashCode()
 {
     return(ValueTuple.CombineHashCodes(EqualityComparer <T1> .Default.GetHashCode(this.Item1), EqualityComparer <T2> .Default.GetHashCode(this.Item2), EqualityComparer <T3> .Default.GetHashCode(this.Item3)));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Returns the hash code for the current <see cref="T:System.ValueTuple`5" /> instance.
 /// </summary>
 /// <returns>A 32-bit signed integer hash code.</returns>
 public override int GetHashCode()
 {
     return(ValueTuple.CombineHashCodes(ValueTuple <T1, T2, T3, T4, T5> .s_t1Comparer.GetHashCode(this.Item1), ValueTuple <T1, T2, T3, T4, T5> .s_t2Comparer.GetHashCode(this.Item2), ValueTuple <T1, T2, T3, T4, T5> .s_t3Comparer.GetHashCode(this.Item3), ValueTuple <T1, T2, T3, T4, T5> .s_t4Comparer.GetHashCode(this.Item4), ValueTuple <T1, T2, T3, T4, T5> .s_t5Comparer.GetHashCode(this.Item5)));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Returns the hash code for the current <see cref="T:System.ValueTuple`2" /> instance.
 /// </summary>
 /// <returns>A 32-bit signed integer hash code.</returns>
 public override int GetHashCode()
 {
     return(ValueTuple.CombineHashCodes(ValueTuple <T1, T2> .s_t1Comparer.GetHashCode(this.Item1), ValueTuple <T1, T2> .s_t2Comparer.GetHashCode(this.Item2)));
 }