예제 #1
0
        public override int GetHashCode()
        {
            var prime  = 31;
            var result = 1;

            result = (prime * result) + ((AppId == null) ? 0 : AppId.GetHashCode());
            result = (prime * result) + ((ClusterId == null) ? 0 : ClusterId.GetHashCode());
            result = (prime * result) + ((ContentEncoding == null) ? 0 : ContentEncoding.GetHashCode());
            result = (prime * result) + (int)(ContentLength ^ (ContentLength >> INT_MASK));
            result = (prime * result) + ((ContentType == null) ? 0 : ContentType.GetHashCode());
            result = (prime * result) + ((CorrelationId == null) ? 0 : CorrelationId.GetHashCode());
            result = (prime * result) + ((DeliveryMode == null) ? 0 : DeliveryMode.GetHashCode());
            result = (prime * result) + (int)(DeliveryTag ^ (DeliveryTag >> INT_MASK));
            result = (prime * result) + ((Expiration == null) ? 0 : Expiration.GetHashCode());
            result = (prime * result) + Headers.GetHashCode();
            result = (prime * result) + ((MessageCount == null) ? 0 : MessageCount.GetHashCode());
            result = (prime * result) + ((MessageId == null) ? 0 : MessageId.GetHashCode());
            result = (prime * result) + ((Priority == null) ? 0 : Priority.GetHashCode());
            result = (prime * result) + ((ReceivedExchange == null) ? 0 : ReceivedExchange.GetHashCode());
            result = (prime * result) + ((ReceivedRoutingKey == null) ? 0 : ReceivedRoutingKey.GetHashCode());
            result = (prime * result) + ((Redelivered == null) ? 0 : Redelivered.GetHashCode());
            result = (prime * result) + ((ReplyTo == null) ? 0 : ReplyTo.GetHashCode());
            result = (prime * result) + ((Timestamp == null) ? 0 : Timestamp.GetHashCode());
            result = (prime * result) + ((Type == null) ? 0 : Type.GetHashCode());
            result = (prime * result) + ((UserId == null) ? 0 : UserId.GetHashCode());
            return(result);
        }
예제 #2
0
        public override string ToString()
        {
            string data = RecordId.ToString("0000") + "  " + TimeStamp.ToString("dd-MM-yy HH:mm:ss") + "  " + FrequencyBand.ToString("00000") + "  " + Mode.PadRight(5) + "  " + Callsign.PadRight(8) + "  " + TransmittedExchange.PadRight(5) + "  " + ReceivedExchange.PadRight(5) + "  " + TransmittedReport.PadRight(5) + "  " + ReceivedReport.PadRight(5) + "  " + Comments;

            return(data);
        }
예제 #3
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }

            if (obj == null)
            {
                return(false);
            }

            if (GetType() != obj.GetType())
            {
                return(false);
            }

            var other = (MessageProperties)obj;

            if (AppId == null)
            {
                if (other.AppId != null)
                {
                    return(false);
                }
            }
            else if (!AppId.Equals(other.AppId))
            {
                return(false);
            }

            if (ClusterId == null)
            {
                if (other.ClusterId != null)
                {
                    return(false);
                }
            }
            else if (!ClusterId.Equals(other.ClusterId))
            {
                return(false);
            }

            if (ContentEncoding == null)
            {
                if (other.ContentEncoding != null)
                {
                    return(false);
                }
            }
            else if (!ContentEncoding.Equals(other.ContentEncoding))
            {
                return(false);
            }

            if (ContentLength != other.ContentLength)
            {
                return(false);
            }

            if (ContentType == null)
            {
                if (other.ContentType != null)
                {
                    return(false);
                }
            }
            else if (!ContentType.Equals(other.ContentType))
            {
                return(false);
            }

            if (CorrelationId == null)
            {
                if (other.CorrelationId != null)
                {
                    return(false);
                }
            }
            else if (!CorrelationId.Equals(other.CorrelationId))
            {
                return(false);
            }

            if (DeliveryMode != other.DeliveryMode)
            {
                return(false);
            }

            if (DeliveryTag != other.DeliveryTag)
            {
                return(false);
            }

            if (Expiration == null)
            {
                if (other.Expiration != null)
                {
                    return(false);
                }
            }
            else if (!Expiration.Equals(other.Expiration))
            {
                return(false);
            }

            if (!Headers.Equals(other.Headers))
            {
                return(false);
            }

            if (MessageCount == null)
            {
                if (other.MessageCount != null)
                {
                    return(false);
                }
            }
            else if (!MessageCount.Equals(other.MessageCount))
            {
                return(false);
            }

            if (MessageId == null)
            {
                if (other.MessageId != null)
                {
                    return(false);
                }
            }
            else if (!MessageId.Equals(other.MessageId))
            {
                return(false);
            }

            if (Priority == null)
            {
                if (other.Priority != null)
                {
                    return(false);
                }
            }
            else if (!Priority.Equals(other.Priority))
            {
                return(false);
            }

            if (ReceivedExchange == null)
            {
                if (other.ReceivedExchange != null)
                {
                    return(false);
                }
            }
            else if (!ReceivedExchange.Equals(other.ReceivedExchange))
            {
                return(false);
            }

            if (ReceivedRoutingKey == null)
            {
                if (other.ReceivedRoutingKey != null)
                {
                    return(false);
                }
            }
            else if (!ReceivedRoutingKey.Equals(other.ReceivedRoutingKey))
            {
                return(false);
            }

            if (Redelivered == null)
            {
                if (other.Redelivered != null)
                {
                    return(false);
                }
            }
            else if (!Redelivered.Equals(other.Redelivered))
            {
                return(false);
            }

            if (ReplyTo == null)
            {
                if (other.ReplyTo != null)
                {
                    return(false);
                }
            }
            else if (!ReplyTo.Equals(other.ReplyTo))
            {
                return(false);
            }

            if (Timestamp == null)
            {
                if (other.Timestamp != null)
                {
                    return(false);
                }
            }
            else if (!Timestamp.Equals(other.Timestamp))
            {
                return(false);
            }

            if (Type == null)
            {
                if (other.Type != null)
                {
                    return(false);
                }
            }
            else if (!Type.Equals(other.Type))
            {
                return(false);
            }

            if (UserId == null)
            {
                if (other.UserId != null)
                {
                    return(false);
                }
            }
            else if (!UserId.Equals(other.UserId))
            {
                return(false);
            }

            return(true);
        }