/// <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 (ActivityId != null)
         {
             hashCode = hashCode * 59 + ActivityId.GetHashCode();
         }
         if (User != null)
         {
             hashCode = hashCode * 59 + User.GetHashCode();
         }
         if (Bot != null)
         {
             hashCode = hashCode * 59 + Bot.GetHashCode();
         }
         if (Conversation != null)
         {
             hashCode = hashCode * 59 + Conversation.GetHashCode();
         }
         if (ChannelId != null)
         {
             hashCode = hashCode * 59 + ChannelId.GetHashCode();
         }
         if (ServiceUrl != null)
         {
             hashCode = hashCode * 59 + ServiceUrl.GetHashCode();
         }
         return(hashCode);
     }
 }
示例#2
0
 /// <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 (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Timestamp != null)
         {
             hashCode = hashCode * 59 + Timestamp.GetHashCode();
         }
         if (LocalTimestamp != null)
         {
             hashCode = hashCode * 59 + LocalTimestamp.GetHashCode();
         }
         if (ServiceUrl != null)
         {
             hashCode = hashCode * 59 + ServiceUrl.GetHashCode();
         }
         if (ChannelId != null)
         {
             hashCode = hashCode * 59 + ChannelId.GetHashCode();
         }
         if (From != null)
         {
             hashCode = hashCode * 59 + From.GetHashCode();
         }
         if (Conversation != null)
         {
             hashCode = hashCode * 59 + Conversation.GetHashCode();
         }
         if (Recipient != null)
         {
             hashCode = hashCode * 59 + Recipient.GetHashCode();
         }
         if (TextFormat != null)
         {
             hashCode = hashCode * 59 + TextFormat.GetHashCode();
         }
         if (AttachmentLayout != null)
         {
             hashCode = hashCode * 59 + AttachmentLayout.GetHashCode();
         }
         if (MembersAdded != null)
         {
             hashCode = hashCode * 59 + MembersAdded.GetHashCode();
         }
         if (MembersRemoved != null)
         {
             hashCode = hashCode * 59 + MembersRemoved.GetHashCode();
         }
         if (TopicName != null)
         {
             hashCode = hashCode * 59 + TopicName.GetHashCode();
         }
         if (HistoryDisclosed != null)
         {
             hashCode = hashCode * 59 + HistoryDisclosed.GetHashCode();
         }
         if (Locale != null)
         {
             hashCode = hashCode * 59 + Locale.GetHashCode();
         }
         if (Text != null)
         {
             hashCode = hashCode * 59 + Text.GetHashCode();
         }
         if (Speak != null)
         {
             hashCode = hashCode * 59 + Speak.GetHashCode();
         }
         if (InputHint != null)
         {
             hashCode = hashCode * 59 + InputHint.GetHashCode();
         }
         if (Summary != null)
         {
             hashCode = hashCode * 59 + Summary.GetHashCode();
         }
         if (SuggestedActions != null)
         {
             hashCode = hashCode * 59 + SuggestedActions.GetHashCode();
         }
         if (Attachments != null)
         {
             hashCode = hashCode * 59 + Attachments.GetHashCode();
         }
         if (Entities != null)
         {
             hashCode = hashCode * 59 + Entities.GetHashCode();
         }
         if (ChannelData != null)
         {
             hashCode = hashCode * 59 + ChannelData.GetHashCode();
         }
         if (Action != null)
         {
             hashCode = hashCode * 59 + Action.GetHashCode();
         }
         if (ReplyToId != null)
         {
             hashCode = hashCode * 59 + ReplyToId.GetHashCode();
         }
         if (Value != null)
         {
             hashCode = hashCode * 59 + Value.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (RelatesTo != null)
         {
             hashCode = hashCode * 59 + RelatesTo.GetHashCode();
         }
         if (Code != null)
         {
             hashCode = hashCode * 59 + Code.GetHashCode();
         }
         return(hashCode);
     }
 }