Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Login != null ? Login.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Password != null ? Password.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ AuthenticationModeId.GetHashCode();
         hashCode = (hashCode * 397) ^ CreatedOn.GetHashCode();
         hashCode = (hashCode * 397) ^ LastLoginOn.GetHashCode();
         hashCode = (hashCode * 397) ^ (ApiKey != null ? ApiKey.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)Status;
         hashCode = (hashCode * 397) ^ MustChangePassword.GetHashCode();
         hashCode = (hashCode * 397) ^ (CustomFields != null ? CustomFields.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Memberships != null ? Memberships.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Groups != null ? Groups.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (MailNotification != null ? MailNotification.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemplo n.º 2
0
 public bool Equals(User other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(base.Equals(other) && string.Equals(Login, other.Login) && string.Equals(Password, other.Password) && string.Equals(FirstName, other.FirstName) && string.Equals(LastName, other.LastName) && string.Equals(Email, other.Email) && AuthenticationModeId == other.AuthenticationModeId && CreatedOn.Equals(other.CreatedOn) && LastLoginOn.Equals(other.LastLoginOn) && string.Equals(ApiKey, other.ApiKey) && Status == other.Status && MustChangePassword == other.MustChangePassword && Equals(CustomFields, other.CustomFields) && Equals(Memberships, other.Memberships) && Equals(Groups, other.Groups) && string.Equals(MailNotification, other.MailNotification));
 }