/// <summary> /// Returns true if MsalClientConfiguration instances are equal /// </summary> /// <param name="other">Instance of MsalClientConfiguration to be compared</param> /// <returns>Boolean</returns> public bool Equals(MsalClientConfiguration other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((DefaultClientId == other.DefaultClientId || DefaultClientId != null && DefaultClientId.Equals(other.DefaultClientId)) && (DefaultAuthority == other.DefaultAuthority || DefaultAuthority != null && DefaultAuthority.Equals(other.DefaultAuthority))); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; // Suitable nullity checks etc, of course :) if (DefaultClientId != null) { hashCode = hashCode * 59 + DefaultClientId.GetHashCode(); } if (DefaultAuthority != null) { hashCode = hashCode * 59 + DefaultAuthority.GetHashCode(); } return(hashCode); } }