/// <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 (ConversationId != null) { hashCode = hashCode * 59 + ConversationId.GetHashCode(); } if (Token != null) { hashCode = hashCode * 59 + Token.GetHashCode(); } if (ExpiresIn != null) { hashCode = hashCode * 59 + ExpiresIn.GetHashCode(); } if (StreamUrl != null) { hashCode = hashCode * 59 + StreamUrl.GetHashCode(); } if (ReferenceGrammarId != null) { hashCode = hashCode * 59 + ReferenceGrammarId.GetHashCode(); } if (ETag != null) { hashCode = hashCode * 59 + ETag.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if Conversation instances are equal /// </summary> /// <param name="other">Instance of Conversation to be compared</param> /// <returns>Boolean</returns> public bool Equals(Conversation other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( ConversationId == other.ConversationId || ConversationId != null && ConversationId.Equals(other.ConversationId) ) && ( Token == other.Token || Token != null && Token.Equals(other.Token) ) && ( ExpiresIn == other.ExpiresIn || ExpiresIn != null && ExpiresIn.Equals(other.ExpiresIn) ) && ( StreamUrl == other.StreamUrl || StreamUrl != null && StreamUrl.Equals(other.StreamUrl) ) && ( ReferenceGrammarId == other.ReferenceGrammarId || ReferenceGrammarId != null && ReferenceGrammarId.Equals(other.ReferenceGrammarId) ) && ( ETag == other.ETag || ETag != null && ETag.Equals(other.ETag) )); }