Esempio 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 (Id != null)
                {
                    hashCode = hashCode * 59 + Id.GetHashCode();
                }
                if (When != null)
                {
                    hashCode = hashCode * 59 + When.GetHashCode();
                }
                if (Where != null)
                {
                    hashCode = hashCode * 59 + Where.GetHashCode();
                }
                if (Requirements != null)
                {
                    hashCode = hashCode * 59 + Requirements.GetHashCode();
                }
                if (ClientDeptId != null)
                {
                    hashCode = hashCode * 59 + ClientDeptId.GetHashCode();
                }
                if (SubDiscipline != null)
                {
                    hashCode = hashCode * 59 + SubDiscipline.GetHashCode();
                }
                if (Grade != null)
                {
                    hashCode = hashCode * 59 + Grade.GetHashCode();
                }
                if (FallbackGrade != null)
                {
                    hashCode = hashCode * 59 + FallbackGrade.GetHashCode();
                }
                if (VacancyReason != null)
                {
                    hashCode = hashCode * 59 + VacancyReason.GetHashCode();
                }

                hashCode = hashCode * 59 + PoNumber.GetHashCode();

                hashCode = hashCode * 59 + UniqueNumber.GetHashCode();
                if (Agency != null)
                {
                    hashCode = hashCode * 59 + Agency.GetHashCode();
                }
                return(hashCode);
            }
        }
Esempio n. 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 (DutyId != null)
                {
                    hashCode = hashCode * 59 + DutyId.GetHashCode();
                }
                if (SlaveDutyId != null)
                {
                    hashCode = hashCode * 59 + SlaveDutyId.GetHashCode();
                }
                if (BlockId != null)
                {
                    hashCode = hashCode * 59 + BlockId.GetHashCode();
                }
                if (ClientDeptId != null)
                {
                    hashCode = hashCode * 59 + ClientDeptId.GetHashCode();
                }
                if (SubDiscipline != null)
                {
                    hashCode = hashCode * 59 + SubDiscipline.GetHashCode();
                }

                hashCode = hashCode * 59 + RequestGender.GetHashCode();
                if (Grade != null)
                {
                    hashCode = hashCode * 59 + Grade.GetHashCode();
                }
                if (FallbackGrade != null)
                {
                    hashCode = hashCode * 59 + FallbackGrade.GetHashCode();
                }
                if (VacancyReason != null)
                {
                    hashCode = hashCode * 59 + VacancyReason.GetHashCode();
                }
                if (Date != null)
                {
                    hashCode = hashCode * 59 + Date.GetHashCode();
                }
                if (StartTime != null)
                {
                    hashCode = hashCode * 59 + StartTime.GetHashCode();
                }
                if (EndTime != null)
                {
                    hashCode = hashCode * 59 + EndTime.GetHashCode();
                }

                hashCode = hashCode * 59 + BreakDuration.GetHashCode();

                hashCode = hashCode * 59 + PoNumber.GetHashCode();

                hashCode = hashCode * 59 + UniqueNumber.GetHashCode();
                if (Agency != null)
                {
                    hashCode = hashCode * 59 + Agency.GetHashCode();
                }
                if (Skill != null)
                {
                    hashCode = hashCode * 59 + Skill.GetHashCode();
                }
                if (Specialty != null)
                {
                    hashCode = hashCode * 59 + Specialty.GetHashCode();
                }
                if (FallbackSkill != null)
                {
                    hashCode = hashCode * 59 + FallbackSkill.GetHashCode();
                }
                if (FallbackSpeciality != null)
                {
                    hashCode = hashCode * 59 + FallbackSpeciality.GetHashCode();
                }

                hashCode = hashCode * 59 + Status.GetHashCode();
                if (Rates != null)
                {
                    hashCode = hashCode * 59 + Rates.GetHashCode();
                }
                if (TimeIntervalRates != null)
                {
                    hashCode = hashCode * 59 + TimeIntervalRates.GetHashCode();
                }
                if (Person != null)
                {
                    hashCode = hashCode * 59 + Person.GetHashCode();
                }
                return(hashCode);
            }
        }