コード例 #1
0
ファイル: Message.cs プロジェクト: winhu/Steeltoe
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }

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

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

            var other = (Message)obj;

            if (!ObjectUtils.NullSafeEquals(Body, other.Body))
            {
                return(false);
            }

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

            return(true);
        }
コード例 #2
0
 public void Copy(MessageProperties source)
 {
     AppId                 = source.AppId;
     ClusterId             = source.ClusterId;
     ConsumerQueue         = source.ConsumerQueue;
     ConsumerTag           = source.ConsumerTag;
     ContentEncoding       = source.ContentEncoding;
     ContentLength         = source.ContentLength;
     ContentType           = source.ContentType;
     CorrelationId         = source.CorrelationId;
     DeliveryMode          = source.DeliveryMode;
     DeliveryTag           = source.DeliveryTag;
     Expiration            = source.Expiration;
     InferredArgumentType  = source.InferredArgumentType;
     MessageCount          = source.MessageCount;
     Priority              = source.Priority;
     PublishSequenceNumber = source.PublishSequenceNumber;
     ReceivedDeliveryMode  = source.ReceivedDeliveryMode;
     ReceivedExchange      = source.ReceivedExchange;
     ReceivedRoutingKey    = source.ReceivedRoutingKey;
     ReceivedUserId        = source.ReceivedUserId;
     Redelivered           = source.Redelivered;
     ReplyTo               = source.ReplyTo;
     ReplyToAddress        = source.ReplyToAddress;
     Target                = source.Target;
     TargetMethod          = source.TargetMethod;
     Timestamp             = source.Timestamp;
     Type   = source.Type;
     UserId = source.UserId;
     FinalRetryForMessageWithNoId = source.FinalRetryForMessageWithNoId;
     LastInBatch = source.LastInBatch;
     foreach (var entry in source.Headers)
     {
         Headers[entry.Key] = entry.Value;
     }
 }
コード例 #3
0
ファイル: MessageBuilder.cs プロジェクト: winhu/Steeltoe
 public MessageBuilder AndProperties(MessageProperties properties)
 {
     Properties = properties;
     return(this);
 }
コード例 #4
0
ファイル: MessageBuilder.cs プロジェクト: winhu/Steeltoe
 private MessageBuilder(byte[] body, MessageProperties properties)
 {
     _body = body;
     CopyProperties(properties);
 }
コード例 #5
0
ファイル: Message.cs プロジェクト: winhu/Steeltoe
 public Message(byte[] body, MessageProperties messageProperties)
 {
     Body = body;
     MessageProperties = messageProperties;
 }
コード例 #6
0
 protected AbstractMessageBuilder(MessageProperties properties)
 {
     Properties = properties;
 }