Пример #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 (DutyId != null)
         {
             hashCode = hashCode * 59 + DutyId.GetHashCode();
         }
         if (BookingId != null)
         {
             hashCode = hashCode * 59 + BookingId.GetHashCode();
         }
         if (AllocatePersonId != null)
         {
             hashCode = hashCode * 59 + AllocatePersonId.GetHashCode();
         }
         if (MasterDutyId != null)
         {
             hashCode = hashCode * 59 + MasterDutyId.GetHashCode();
         }
         if (SlaveDutyId != null)
         {
             hashCode = hashCode * 59 + SlaveDutyId.GetHashCode();
         }
         return(hashCode);
     }
 }
Пример #2
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 (FirstName != null)
                {
                    hashCode = hashCode * 59 + FirstName.GetHashCode();
                }
                if (Surname != null)
                {
                    hashCode = hashCode * 59 + Surname.GetHashCode();
                }
                if (DateOfBirth != null)
                {
                    hashCode = hashCode * 59 + DateOfBirth.GetHashCode();
                }

                hashCode = hashCode * 59 + PersonGender.GetHashCode();
                if (MatchId != null)
                {
                    hashCode = hashCode * 59 + MatchId.GetHashCode();
                }
                if (AllocatePersonId != null)
                {
                    hashCode = hashCode * 59 + AllocatePersonId.GetHashCode();
                }
                if (Email != null)
                {
                    hashCode = hashCode * 59 + Email.GetHashCode();
                }
                if (TelephoneNumber != null)
                {
                    hashCode = hashCode * 59 + TelephoneNumber.GetHashCode();
                }
                if (ExtSystemId != null)
                {
                    hashCode = hashCode * 59 + ExtSystemId.GetHashCode();
                }
                return(hashCode);
            }
        }