Ejemplo n.º 1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (CatName != null)
         {
             hashCode = hashCode * 59 + CatName.GetHashCode();
         }
         if (CatRoletype != null)
         {
             hashCode = hashCode * 59 + CatRoletype.GetHashCode();
         }
         if (CatGtmEntryodataBind != null)
         {
             hashCode = hashCode * 59 + CatGtmEntryodataBind.GetHashCode();
         }
         if (CatTeamMemberodataBind != null)
         {
             hashCode = hashCode * 59 + CatTeamMemberodataBind.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns true if Body3 instances are equal
        /// </summary>
        /// <param name="other">Instance of Body3 to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Body3 other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     CatName == other.CatName ||
                     CatName != null &&
                     CatName.Equals(other.CatName)
                     ) &&
                 (
                     CatRoletype == other.CatRoletype ||
                     CatRoletype != null &&
                     CatRoletype.Equals(other.CatRoletype)
                 ) &&
                 (
                     CatGtmEntryodataBind == other.CatGtmEntryodataBind ||
                     CatGtmEntryodataBind != null &&
                     CatGtmEntryodataBind.Equals(other.CatGtmEntryodataBind)
                 ) &&
                 (
                     CatTeamMemberodataBind == other.CatTeamMemberodataBind ||
                     CatTeamMemberodataBind != null &&
                     CatTeamMemberodataBind.Equals(other.CatTeamMemberodataBind)
                 ));
        }