/// <summary> /// Returns true if CharacterTokiResponse instances are equal /// </summary> /// <param name="other">Instance of CharacterTokiResponse to be compared</param> /// <returns>Boolean</returns> public bool Equals(CharacterTokiResponse other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( UnlimitedRecordCount == other.UnlimitedRecordCount || UnlimitedRecordCount != null && UnlimitedRecordCount.Equals(other.UnlimitedRecordCount) ) && ( CharacterInfos == other.CharacterInfos || CharacterInfos != null && other.CharacterInfos != null && CharacterInfos.SequenceEqual(other.CharacterInfos) ) && ( LastPage == other.LastPage || LastPage != null && LastPage.Equals(other.LastPage) )); }
/// <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 (UnlimitedRecordCount != null) { hashCode = hashCode * 59 + UnlimitedRecordCount.GetHashCode(); } if (CharacterInfos != null) { hashCode = hashCode * 59 + CharacterInfos.GetHashCode(); } return(hashCode); } }