/// <summary> /// Returns true if Status instances are equal /// </summary> /// <param name="other">Instance of Status to be compared</param> /// <returns>Boolean</returns> public bool Equals(Status other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( ApiEnabled == other.ApiEnabled || ApiEnabled != null && ApiEnabled.Equals(other.ApiEnabled) ) && ( CareportalEnabled == other.CareportalEnabled || CareportalEnabled != null && CareportalEnabled.Equals(other.CareportalEnabled) ) && ( Head == other.Head || Head != null && Head.Equals(other.Head) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Version == other.Version || Version != null && Version.Equals(other.Version) ) && ( Settings == other.Settings || Settings != null && Settings.Equals(other.Settings) ) && ( ExtendedSettings == other.ExtendedSettings || ExtendedSettings != null && ExtendedSettings.Equals(other.ExtendedSettings) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { var hash = 41; // Suitable nullity checks etc, of course :) if (ApiEnabled != null) { hash = hash * 59 + ApiEnabled.GetHashCode(); } if (CareportalEnabled != null) { hash = hash * 59 + CareportalEnabled.GetHashCode(); } if (Head != null) { hash = hash * 59 + Head.GetHashCode(); } if (Name != null) { hash = hash * 59 + Name.GetHashCode(); } if (Version != null) { hash = hash * 59 + Version.GetHashCode(); } if (Settings != null) { hash = hash * 59 + Settings.GetHashCode(); } if (ExtendedSettings != null) { hash = hash * 59 + ExtendedSettings.GetHashCode(); } return(hash); } }