Beispiel #1
0
        public bool Equals(TupleStruct <T1, T2> other)
        {
            bool flag;
            bool flag2;

            if ((!TupleStruct <T1, T2> .item1IsValueType && (this.item1 == null)) && (other.item1 == null))
            {
                flag = true;
            }
            else if (!TupleStruct <T1, T2> .item1IsValueType && ((this.item1 == null) || (other.item1 == null)))
            {
                flag = false;
            }
            else
            {
                flag = TupleStruct <T1, T2> .item1Comparer.Equals(this.item1, other.item1);
            }
            if (!flag)
            {
                return(false);
            }
            if ((!TupleStruct <T1, T2> .item2IsValueType && (this.item2 == null)) && (other.item2 == null))
            {
                flag2 = true;
            }
            else if (!TupleStruct <T1, T2> .item2IsValueType && ((this.item2 == null) || (other.item2 == null)))
            {
                flag2 = false;
            }
            else
            {
                flag2 = TupleStruct <T1, T2> .item2Comparer.Equals(this.item2, other.item2);
            }
            return(flag & flag2);
        }
Beispiel #2
0
        public bool Equals(TupleStruct <T1, T2, T3, T4, T5, T6> other)
        {
            bool flag;
            bool flag2;
            bool flag3;
            bool flag4;
            bool flag5;
            bool flag6;

            if ((!TupleStruct <T1, T2, T3, T4, T5, T6> .item1IsValueType && (this.item1 == null)) && (other.item1 == null))
            {
                flag = true;
            }
            else if (!TupleStruct <T1, T2, T3, T4, T5, T6> .item1IsValueType && ((this.item1 == null) || (other.item1 == null)))
            {
                flag = false;
            }
            else
            {
                flag = TupleStruct <T1, T2, T3, T4, T5, T6> .item1Comparer.Equals(this.item1, other.item1);
            }
            if (!flag)
            {
                return(false);
            }
            if ((!TupleStruct <T1, T2, T3, T4, T5, T6> .item2IsValueType && (this.item2 == null)) && (other.item2 == null))
            {
                flag2 = true;
            }
            else if (!TupleStruct <T1, T2, T3, T4, T5, T6> .item2IsValueType && ((this.item2 == null) || (other.item2 == null)))
            {
                flag2 = false;
            }
            else
            {
                flag2 = TupleStruct <T1, T2, T3, T4, T5, T6> .item2Comparer.Equals(this.item2, other.item2);
            }
            if (!flag2)
            {
                return(false);
            }
            if ((!TupleStruct <T1, T2, T3, T4, T5, T6> .item3IsValueType && (this.item3 == null)) && (other.item3 == null))
            {
                flag3 = true;
            }
            else if (!TupleStruct <T1, T2, T3, T4, T5, T6> .item3IsValueType && ((this.item3 == null) || (other.item3 == null)))
            {
                flag3 = false;
            }
            else
            {
                flag3 = TupleStruct <T1, T2, T3, T4, T5, T6> .item3Comparer.Equals(this.item3, other.item3);
            }
            if (!flag3)
            {
                return(false);
            }
            if ((!TupleStruct <T1, T2, T3, T4, T5, T6> .item4IsValueType && (this.item4 == null)) && (other.item4 == null))
            {
                flag4 = true;
            }
            else if (!TupleStruct <T1, T2, T3, T4, T5, T6> .item4IsValueType && ((this.item4 == null) || (other.item4 == null)))
            {
                flag4 = false;
            }
            else
            {
                flag4 = TupleStruct <T1, T2, T3, T4, T5, T6> .item4Comparer.Equals(this.item4, other.item4);
            }
            if (!flag4)
            {
                return(false);
            }
            if ((!TupleStruct <T1, T2, T3, T4, T5, T6> .item5IsValueType && (this.item5 == null)) && (other.item5 == null))
            {
                flag5 = true;
            }
            else if (!TupleStruct <T1, T2, T3, T4, T5, T6> .item5IsValueType && ((this.item5 == null) || (other.item5 == null)))
            {
                flag5 = false;
            }
            else
            {
                flag5 = TupleStruct <T1, T2, T3, T4, T5, T6> .item5Comparer.Equals(this.item5, other.item5);
            }
            if (!flag5)
            {
                return(false);
            }
            if ((!TupleStruct <T1, T2, T3, T4, T5, T6> .item6IsValueType && (this.item6 == null)) && (other.item6 == null))
            {
                flag6 = true;
            }
            else if (!TupleStruct <T1, T2, T3, T4, T5, T6> .item6IsValueType && ((this.item6 == null) || (other.item6 == null)))
            {
                flag6 = false;
            }
            else
            {
                flag6 = TupleStruct <T1, T2, T3, T4, T5, T6> .item6Comparer.Equals(this.item6, other.item6);
            }
            return(((((flag & flag2) & flag3) & flag4) & flag5) & flag6);
        }