コード例 #1
0
ファイル: BrokeredMessage.cs プロジェクト: zhy29563/MyMEF
 internal BrokeredMessage(Stream body, WebHeaderCollection headers)
     : this(body, WebHeadersToDictionary(headers))
 {
     if (!string.IsNullOrEmpty(headers["BrokerProperties"]))
     {
         this.brokerProperties = BrokerProperties.Deserialize(headers["BrokerProperties"]);
     }
 }
コード例 #2
0
ファイル: BrokeredMessage.cs プロジェクト: zhy29563/MyMEF
        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();
        }