Esempio n. 1
0
        public static BinaryMessageEnvelope From(IOutboundMessage context)
        {
            var envelope = new BinaryMessageEnvelope();

            envelope.CopyFrom(context);

            return(envelope);
        }
Esempio n. 2
0
        public static BinaryMessageEnvelope From(Header[] headers)
        {
            var envelope = new BinaryMessageEnvelope();

            if (headers != null)
            {
                for (int i = 0; i < headers.Length; i++)
                {
                    envelope.MapNameValuePair(headers[i].Name, headers[i].Value);
                }
            }

            return(envelope);
        }