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); }
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; } }
public MessageBuilder AndProperties(MessageProperties properties) { Properties = properties; return(this); }
private MessageBuilder(byte[] body, MessageProperties properties) { _body = body; CopyProperties(properties); }
public Message(byte[] body, MessageProperties messageProperties) { Body = body; MessageProperties = messageProperties; }
protected AbstractMessageBuilder(MessageProperties properties) { Properties = properties; }