/// <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 (Uuid != null) { hashCode = hashCode * 59 + Uuid.GetHashCode(); } if (Username != null) { hashCode = hashCode * 59 + Username.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (Surname != null) { hashCode = hashCode * 59 + Surname.GetHashCode(); } if (Email != null) { hashCode = hashCode * 59 + Email.GetHashCode(); } if (PhoneNumber != null) { hashCode = hashCode * 59 + PhoneNumber.GetHashCode(); } if (Password != null) { hashCode = hashCode * 59 + Password.GetHashCode(); } if (HashedPassword != null) { hashCode = hashCode * 59 + HashedPassword.GetHashCode(); } hashCode = hashCode * 59 + IsDeleted.GetHashCode(); if (DeletedTime != null) { hashCode = hashCode * 59 + DeletedTime.GetHashCode(); } if (Avatar != null) { hashCode = hashCode * 59 + Avatar.GetHashCode(); } if (LdapAuthenticationMode != null) { hashCode = hashCode * 59 + LdapAuthenticationMode.GetHashCode(); } if (Roles != null) { hashCode = hashCode * 59 + Roles.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if SecurityContractDefaultConfigurationUser instances are equal /// </summary> /// <param name="other">Instance of SecurityContractDefaultConfigurationUser to be compared</param> /// <returns>Boolean</returns> public bool Equals(SecurityContractDefaultConfigurationUser other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Uuid == other.Uuid || Uuid != null && Uuid.Equals(other.Uuid) ) && ( Username == other.Username || Username != null && Username.Equals(other.Username) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Surname == other.Surname || Surname != null && Surname.Equals(other.Surname) ) && ( Email == other.Email || Email != null && Email.Equals(other.Email) ) && ( PhoneNumber == other.PhoneNumber || PhoneNumber != null && PhoneNumber.Equals(other.PhoneNumber) ) && ( Password == other.Password || Password != null && Password.Equals(other.Password) ) && ( HashedPassword == other.HashedPassword || HashedPassword != null && HashedPassword.Equals(other.HashedPassword) ) && ( IsDeleted == other.IsDeleted || IsDeleted.Equals(other.IsDeleted) ) && ( DeletedTime == other.DeletedTime || DeletedTime != null && DeletedTime.Equals(other.DeletedTime) ) && ( Avatar == other.Avatar || Avatar != null && Avatar.Equals(other.Avatar) ) && ( LdapAuthenticationMode == other.LdapAuthenticationMode || LdapAuthenticationMode != null && LdapAuthenticationMode.Equals(other.LdapAuthenticationMode) ) && ( Roles == other.Roles || Roles != null && other.Roles != null && Roles.SequenceEqual(other.Roles) )); }