/// <summary>Serves as the default hash function.</summary> /// <returns>A hash code for the current object.</returns> public override int GetHashCode() { unchecked { int hashCode = ConvoId.GetHashCode(); hashCode = (hashCode * 397) ^ ConvoPasswordSHA512.GetHashCode(); hashCode = (hashCode * 397) ^ SenderName.GetHashCode(); hashCode = (hashCode * 397) ^ EncryptedBody.GetHashCode(); return(hashCode); } }
/// <inheritdoc /> public override int GetHashCode() { unchecked { int hashCode = ChatId != null?ChatId.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (Id != null ? Id.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Body != null ? Body.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Type != null ? Type.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (SenderName != null ? SenderName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ FromMe.GetHashCode(); hashCode = (hashCode * 397) ^ (Author != null ? Author.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Time.GetHashCode(); hashCode = (hashCode * 397) ^ MessageNumber.GetHashCode(); hashCode = (hashCode * 397) ^ Self.GetHashCode(); hashCode = (hashCode * 397) ^ IsForwarded.GetHashCode(); hashCode = (hashCode * 397) ^ (QuotedMessageBody != null ? QuotedMessageBody.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (QuotedMessageId != null ? QuotedMessageId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (QuotedMessageType != null ? QuotedMessageType.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ChatName != null ? ChatName.GetHashCode() : 0); return(hashCode); } }