private bool Equals(RocketMessage other)
 {
     return(string.Equals(Id, other.Id) && string.Equals(RoomId, other.RoomId) &&
            string.Equals(Message, other.Message) && IsBot == other.IsBot && Equals(CreatedBy, other.CreatedBy) &&
            CreatedOn.Equals(other.CreatedOn) && Equals(EditedBy, other.EditedBy) &&
            EditedOn.Equals(other.EditedOn) && IsBotMentioned == other.IsBotMentioned &&
            IsFromMyself == other.IsFromMyself && string.Equals(Type, other.Type) &&
            Mentions.Equals(other.Mentions) && Starred.Equals(other.Starred));
 }
Exemple #2
0
        /// <summary>
        /// Returns true if Route instances are equal
        /// </summary>
        /// <param name="other">Instance of Route to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Route other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Athlete == other.Athlete ||
                     Athlete != null &&
                     Athlete.Equals(other.Athlete)
                     ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     Distance == other.Distance ||
                     Distance != null &&
                     Distance.Equals(other.Distance)
                 ) &&
                 (
                     ElevationGain == other.ElevationGain ||
                     ElevationGain != null &&
                     ElevationGain.Equals(other.ElevationGain)
                 ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     IdStr == other.IdStr ||
                     IdStr != null &&
                     IdStr.Equals(other.IdStr)
                 ) &&
                 (
                     Map == other.Map ||
                     Map != null &&
                     Map.Equals(other.Map)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     _Private == other._Private ||
                     _Private != null &&
                     _Private.Equals(other._Private)
                 ) &&
                 (
                     Starred == other.Starred ||
                     Starred != null &&
                     Starred.Equals(other.Starred)
                 ) &&
                 (
                     Timestamp == other.Timestamp ||
                     Timestamp != null &&
                     Timestamp.Equals(other.Timestamp)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     SubType == other.SubType ||
                     SubType != null &&
                     SubType.Equals(other.SubType)
                 ) &&
                 (
                     CreatedAt == other.CreatedAt ||
                     CreatedAt != null &&
                     CreatedAt.Equals(other.CreatedAt)
                 ) &&
                 (
                     UpdatedAt == other.UpdatedAt ||
                     UpdatedAt != null &&
                     UpdatedAt.Equals(other.UpdatedAt)
                 ) &&
                 (
                     EstimatedMovingTime == other.EstimatedMovingTime ||
                     EstimatedMovingTime != null &&
                     EstimatedMovingTime.Equals(other.EstimatedMovingTime)
                 ) &&
                 (
                     Segments == other.Segments ||
                     Segments != null &&
                     Segments.SequenceEqual(other.Segments)
                 ));
        }