/// <summary> /// Determines whether the specified Object is equal to the current Object. /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { if (obj == null) { return(false); } if (Object.ReferenceEquals(this, obj)) { return(true); } if (this.GetType() != obj.GetType()) { return(false); } var other = (VLMessage)obj; //reference types if (!Object.Equals(Sender, other.Sender)) { return(false); } if (!Object.Equals(Subject, other.Subject)) { return(false); } if (!Object.Equals(Body, other.Body)) { return(false); } if (!Object.Equals(CustomKeyword, other.CustomKeyword)) { return(false); } if (!Object.Equals(Error, other.Error)) { return(false); } if (!Object.Equals(SenderVerificationCode, other.SenderVerificationCode)) { return(false); } //value types if (!Collector.Equals(other.Collector)) { return(false); } if (!MessageId.Equals(other.MessageId)) { return(false); } if (!Status.Equals(other.Status)) { return(false); } if (!AttributeFlags.Equals(other.AttributeFlags)) { return(false); } if (!ScheduledAt.Equals(other.ScheduledAt)) { return(false); } if (!SentCounter.Equals(other.SentCounter)) { return(false); } if (!FailedCounter.Equals(other.FailedCounter)) { return(false); } if (!SkipCounter.Equals(other.SkipCounter)) { return(false); } if (!DeliveryMethod.Equals(other.DeliveryMethod)) { return(false); } if (!CustomSearchField.Equals(other.CustomSearchField)) { return(false); } if (!CustomOperator.Equals(other.CustomOperator)) { return(false); } if (!PendingAt.Equals(other.PendingAt)) { return(false); } if (!PreparingAt.Equals(other.PreparingAt)) { return(false); } if (!PreparedAt.Equals(other.PreparedAt)) { return(false); } if (!ExecutingAt.Equals(other.ExecutingAt)) { return(false); } if (!TerminatedAt.Equals(other.TerminatedAt)) { return(false); } return(true); }