Ejemplo n.º 1
0
 internal BrokeredMessage(Stream body, WebHeaderCollection headers)
     : this(body, WebHeadersToDictionary(headers))
 {
     if (!string.IsNullOrEmpty(headers["BrokerProperties"]))
     {
         this.brokerProperties = BrokerProperties.Deserialize(headers["BrokerProperties"]);
     }
 }
Ejemplo n.º 2
0
        public BrokeredMessage(Stream body, IDictionary <string, object> headers)
        {
            if (body == null)
            {
                throw new ArgumentNullException("body");
            }

            if (headers == null)
            {
                throw new ArgumentNullException("headers");
            }

            this.bodyStream     = body;
            this.messageHeaders = headers;

            this.brokerProperties = new BrokerProperties();
        }