public bool Equals(BigMessage other)
 {
     return(Prop1 == other.Prop1 &&
            Prop2 == other.Prop2 &&
            Prop3 == other.Prop3 &&
            Prop4 == other.Prop4 &&
            Prop5 == other.Prop5 &&
            Prop6 == other.Prop6 &&
            Prop7 == other.Prop7 &&
            Prop8 == other.Prop8 &&
            Prop9 == other.Prop9 &&
            Prop10.Equals(other.Prop10) &&
            Prop11.Equals(other.Prop11) &&
            Prop12 == other.Prop12 &&
            Prop13 == other.Prop13 &&
            SequenceEqual(Prop14, other.Prop14) &&
            SequenceEqual(Prop15, other.Prop15) &&
            SequenceEqual(Prop16, other.Prop16) &&
            SequenceEqual(Prop17, other.Prop17) &&
            SequenceEqual(Prop18, other.Prop18) &&
            SequenceEqual(Prop19, other.Prop19) &&
            SequenceEqual(Prop20, other.Prop20) &&
            SequenceEqual(Prop21, other.Prop21) &&
            SequenceEqual(Prop22, other.Prop22) &&
            SequenceEqual(Prop23, other.Prop23) &&
            SequenceEqual(Prop24, other.Prop24) &&
            SequenceEqual(Prop25, other.Prop25) &&
            SequenceEqual(Prop26, other.Prop26) &&
            Prop27 == other.Prop27 &&
            Prop28 == other.Prop28 &&
            Prop29 == other.Prop29 &&
            SequenceEqual(Prop30, other.Prop30) &&
            SequenceEqual(Prop31, other.Prop31) &&
            SequenceEqual(Prop32, other.Prop32));
 }
Exemple #2
0
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj))
            {
                return(false);
            }
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (obj.GetType() != GetType())
            {
                return(false);
            }

            var value = obj as AllObjectCollections;

            if (value == null)
            {
                return(false);
            }

            return
                (Prop0 != null && value.Prop0 != null &&
                 Prop0.Equals(value.Prop0) &&
                 Prop1 != null && value.Prop1 != null &&
                 Prop1.Equals(value.Prop1) &&
                 Prop2 != null && value.Prop2 != null &&
                 Prop2.Equals(value.Prop2) &&
                 Prop3 != null && value.Prop3 != null &&
                 Prop3.Equals(value.Prop3) &&
                 Prop4 != null && value.Prop4 != null &&
                 Prop4.Equals(value.Prop4) &&
                 Prop5 != null && value.Prop5 != null &&
                 Prop5.Equals(value.Prop5) &&
                 Prop6 != null && value.Prop6 != null &&
                 Prop6.Equals(value.Prop6) &&
                 Prop7 != null && value.Prop7 != null &&
                 Prop7.Equals(value.Prop7) &&
                 Prop8 != null && value.Prop8 != null &&
                 Prop8.Equals(value.Prop8) &&
                 Prop9 != null && value.Prop9 != null &&
                 Prop9.Equals(value.Prop9) &&
                 Prop10 != null && value.Prop10 != null &&
                 Prop10.Equals(value.Prop10) &&
                 Prop11 != null && value.Prop11 != null &&
                 Prop11.Equals(value.Prop11));
        }
 public bool Equals(XmlTestObject other)
 {
     return(other != null &&
            Prop1 == other.Prop1 &&
            Prop2 == other.Prop2 &&
            Prop3 == other.Prop3 &&
            Prop4 == other.Prop4 &&
            Prop5 == other.Prop5 &&
            Prop6 == other.Prop6 &&
            Prop7 == other.Prop7 &&
            //Prop8.Equals(other.Prop8) &&
            Prop9 == other.Prop9 &&
            Prop10.Equals(other.Prop10) &&
            Prop11 == other.Prop11 &&
            Prop12 == other.Prop12 &&
            Prop13.Equals(other.Prop13));
 }
Exemple #4
0
        public override int GetHashCode()
        {
            unchecked
            {
                // Choose large primes to avoid hashing collisions
                const int HashingBase       = (int)2166136261;
                const int HashingMultiplier = 16777619;

                int hash = HashingBase;
                hash = (hash * HashingMultiplier) ^
                       (!object.ReferenceEquals(null, Prop0) ? Prop0.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^
                       (!object.ReferenceEquals(null, Prop1) ? Prop1.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^
                       (!object.ReferenceEquals(null, Prop2) ? Prop2.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^
                       (!object.ReferenceEquals(null, Prop3) ? Prop3.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^
                       (!object.ReferenceEquals(null, Prop4) ? Prop4.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^
                       (!object.ReferenceEquals(null, Prop5) ? Prop5.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^
                       (!object.ReferenceEquals(null, Prop6) ? Prop6.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^
                       (!object.ReferenceEquals(null, Prop7) ? Prop7.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^
                       (!object.ReferenceEquals(null, Prop8) ? Prop8.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^
                       (!object.ReferenceEquals(null, Prop9) ? Prop9.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^
                       (!object.ReferenceEquals(null, Prop10) ? Prop10.GetHashCode() : 0);
                hash = (hash * HashingMultiplier) ^
                       (!object.ReferenceEquals(null, Prop11) ? Prop11.GetHashCode() : 0);
                return(hash);
            }
        }