/// <summary>
        /// Constructor - AzureBrokeredMessage 
        /// </summary>
        public AzureBrokeredMessageEnvelopInbound(IPinkoApplication pinkoApplication, BrokeredMessage azureMsg)
            : base(pinkoApplication)
        {
            _message = azureMsg;

            Message = _message.GetBody();
            ReplyTo = string.IsNullOrEmpty(_message.ReplyTo) ? string.Empty : _message.ReplyTo;

            azureMsg.Properties.ForEach(x => PinkoProperties[x.Key] = x.Value.ToString());
        }
 /// <summary>
 /// Constructor - PinkoServiceMessage 
 /// </summary>
 public PinkoServiceMessageEnvelop(IPinkoApplication application)
     : this()
 {
     PinkoProperties[PinkoMessagePropTag.MachineName] = application.MachineName;
     PinkoProperties[PinkoMessagePropTag.SenderName] = application.UserName;
 }
        /// <summary>
        /// Constructor - AzureBrokeredMessage 
        /// </summary>
        public MsMqMessageEnvelopInbound(IPinkoApplication pinkoApplication, Message msg)
            : base(pinkoApplication)
        {
            _message = msg;

            Trace.TraceInformation("Message Label: {0}", msg.Label);
            MsMqMessageEnvelopInbound inbound = null;

            if (msg.Label == typeof(PinkoMsgRoleHeartbeat).ToString())
                inbound = this.FromMsMqWrapper<PinkoMsgRoleHeartbeat>(msg);

            if (msg.Label == typeof(PinkoMsgPing).ToString())
                inbound =this.FromMsMqWrapper<PinkoMsgPing>(msg);

            if (msg.Label == typeof(PinkoMsgCalculateExpression).ToString())
                inbound = this.FromMsMqWrapper<PinkoMsgCalculateExpression>(msg);

            if (msg.Label == typeof(PinkoMsgCalculateExpressionResult).ToString())
                inbound = this.FromMsMqWrapper<PinkoMsgCalculateExpressionResult>(msg);

            if (msg.Label == typeof(PinkoMsgClientConnect).ToString())
                inbound = this.FromMsMqWrapper<PinkoMsgClientConnect>(msg);

            if (msg.Label == typeof(PinkoMsgClientTimeout).ToString())
                inbound = this.FromMsMqWrapper<PinkoMsgClientTimeout>(msg);

            if (msg.Label == typeof(PinkoMsgClientPing).ToString())
                inbound = this.FromMsMqWrapper<PinkoMsgClientPing>(msg);

            if (inbound.IsNull())
                throw new PinkoExceptionMsMqNotFound("Missing MsMq handler in MsMqMessageEnvelopInbound()");
        }