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 (ResourceState != null)
         {
             hashCode = hashCode * 59 + ResourceState.GetHashCode();
         }
         if (Firstname != null)
         {
             hashCode = hashCode * 59 + Firstname.GetHashCode();
         }
         if (Lastname != null)
         {
             hashCode = hashCode * 59 + Lastname.GetHashCode();
         }
         if (ProfileMedium != null)
         {
             hashCode = hashCode * 59 + ProfileMedium.GetHashCode();
         }
         if (Profile != null)
         {
             hashCode = hashCode * 59 + Profile.GetHashCode();
         }
         if (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (State != null)
         {
             hashCode = hashCode * 59 + State.GetHashCode();
         }
         if (Country != null)
         {
             hashCode = hashCode * 59 + Country.GetHashCode();
         }
         if (Sex != null)
         {
             hashCode = hashCode * 59 + Sex.GetHashCode();
         }
         if (Premium != null)
         {
             hashCode = hashCode * 59 + Premium.GetHashCode();
         }
         if (Summit != null)
         {
             hashCode = hashCode * 59 + Summit.GetHashCode();
         }
         if (CreatedAt != null)
         {
             hashCode = hashCode * 59 + CreatedAt.GetHashCode();
         }
         if (UpdatedAt != null)
         {
             hashCode = hashCode * 59 + UpdatedAt.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 (ProfileMedium != null)
         {
             hashCode = hashCode * 59 + ProfileMedium.GetHashCode();
         }
         if (CoverPhoto != null)
         {
             hashCode = hashCode * 59 + CoverPhoto.GetHashCode();
         }
         if (CoverPhotoSmall != null)
         {
             hashCode = hashCode * 59 + CoverPhotoSmall.GetHashCode();
         }
         if (SportType != null)
         {
             hashCode = hashCode * 59 + SportType.GetHashCode();
         }
         if (ActivityTypes != null)
         {
             hashCode = hashCode * 59 + ActivityTypes.GetHashCode();
         }
         if (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (State != null)
         {
             hashCode = hashCode * 59 + State.GetHashCode();
         }
         if (Country != null)
         {
             hashCode = hashCode * 59 + Country.GetHashCode();
         }
         if (_Private != null)
         {
             hashCode = hashCode * 59 + _Private.GetHashCode();
         }
         if (MemberCount != null)
         {
             hashCode = hashCode * 59 + MemberCount.GetHashCode();
         }
         if (Featured != null)
         {
             hashCode = hashCode * 59 + Featured.GetHashCode();
         }
         if (Verified != null)
         {
             hashCode = hashCode * 59 + Verified.GetHashCode();
         }
         if (Url != null)
         {
             hashCode = hashCode * 59 + Url.GetHashCode();
         }
         return(hashCode);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Returns true if SummaryAthlete instances are equal
        /// </summary>
        /// <param name="other">Instance of SummaryAthlete to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SummaryAthlete other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     ResourceState == other.ResourceState ||
                     ResourceState != null &&
                     ResourceState.Equals(other.ResourceState)
                     ) &&
                 (
                     Firstname == other.Firstname ||
                     Firstname != null &&
                     Firstname.Equals(other.Firstname)
                 ) &&
                 (
                     Lastname == other.Lastname ||
                     Lastname != null &&
                     Lastname.Equals(other.Lastname)
                 ) &&
                 (
                     ProfileMedium == other.ProfileMedium ||
                     ProfileMedium != null &&
                     ProfileMedium.Equals(other.ProfileMedium)
                 ) &&
                 (
                     Profile == other.Profile ||
                     Profile != null &&
                     Profile.Equals(other.Profile)
                 ) &&
                 (
                     City == other.City ||
                     City != null &&
                     City.Equals(other.City)
                 ) &&
                 (
                     State == other.State ||
                     State != null &&
                     State.Equals(other.State)
                 ) &&
                 (
                     Country == other.Country ||
                     Country != null &&
                     Country.Equals(other.Country)
                 ) &&
                 (
                     Sex == other.Sex ||
                     Sex != null &&
                     Sex.Equals(other.Sex)
                 ) &&
                 (
                     Premium == other.Premium ||
                     Premium != null &&
                     Premium.Equals(other.Premium)
                 ) &&
                 (
                     Summit == other.Summit ||
                     Summit != null &&
                     Summit.Equals(other.Summit)
                 ) &&
                 (
                     CreatedAt == other.CreatedAt ||
                     CreatedAt != null &&
                     CreatedAt.Equals(other.CreatedAt)
                 ) &&
                 (
                     UpdatedAt == other.UpdatedAt ||
                     UpdatedAt != null &&
                     UpdatedAt.Equals(other.UpdatedAt)
                 ));
        }
Esempio n. 4
0
        /// <summary>
        /// Returns true if SummaryClub instances are equal
        /// </summary>
        /// <param name="other">Instance of SummaryClub to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SummaryClub other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     ProfileMedium == other.ProfileMedium ||
                     ProfileMedium != null &&
                     ProfileMedium.Equals(other.ProfileMedium)
                     ) &&
                 (
                     CoverPhoto == other.CoverPhoto ||
                     CoverPhoto != null &&
                     CoverPhoto.Equals(other.CoverPhoto)
                 ) &&
                 (
                     CoverPhotoSmall == other.CoverPhotoSmall ||
                     CoverPhotoSmall != null &&
                     CoverPhotoSmall.Equals(other.CoverPhotoSmall)
                 ) &&
                 (
                     SportType == other.SportType ||
                     SportType != null &&
                     SportType.Equals(other.SportType)
                 ) &&
                 (
                     ActivityTypes == other.ActivityTypes ||
                     ActivityTypes != null &&
                     ActivityTypes.SequenceEqual(other.ActivityTypes)
                 ) &&
                 (
                     City == other.City ||
                     City != null &&
                     City.Equals(other.City)
                 ) &&
                 (
                     State == other.State ||
                     State != null &&
                     State.Equals(other.State)
                 ) &&
                 (
                     Country == other.Country ||
                     Country != null &&
                     Country.Equals(other.Country)
                 ) &&
                 (
                     _Private == other._Private ||
                     _Private != null &&
                     _Private.Equals(other._Private)
                 ) &&
                 (
                     MemberCount == other.MemberCount ||
                     MemberCount != null &&
                     MemberCount.Equals(other.MemberCount)
                 ) &&
                 (
                     Featured == other.Featured ||
                     Featured != null &&
                     Featured.Equals(other.Featured)
                 ) &&
                 (
                     Verified == other.Verified ||
                     Verified != null &&
                     Verified.Equals(other.Verified)
                 ) &&
                 (
                     Url == other.Url ||
                     Url != null &&
                     Url.Equals(other.Url)
                 ));
        }