Ejemplo n.º 1
0
        private void buttonDispatchFromRsp_Click(object sender, EventArgs e)
        {
            string msgXml = _ctlRcvIn.GetXmlString();

            HYS.Messaging.Objects.Message rsp = null;
            HYS.Messaging.Objects.Message req = XObjectManager.CreateObject <HYS.Messaging.Objects.Message>(msgXml);

            DateTime dtBegin = DateTime.Now;
            bool     res     = _controler.DispatchResponserMessage(req, out rsp);
            DateTime dtEnd   = DateTime.Now;
            TimeSpan ts      = dtEnd.Subtract(dtBegin);

            this.labelRspPerform.Text = ts.TotalMilliseconds.ToString() + "ms";

            if (!res)
            {
                MessageBox.Show("result: " + res.ToString());
            }
            if (rsp != null)
            {
                _ctlRcvOut.Open("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + rsp.ToXMLString());
            }
        }
Ejemplo n.º 2
0
 public bool NotifyMessageRequest(HYS.Messaging.Objects.Message request, out HYS.Messaging.Objects.Message response)
 {
     _form._ctlSndOut.Open("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + request.ToXMLString());
     response = XObjectManager.CreateObject <HYS.Messaging.Objects.Message>(_form._ctlSndIn.GetXmlString());
     return(response != null);
 }
Ejemplo n.º 3
0
 public bool NotifyMessagePublish(HYS.Messaging.Objects.Message message)
 {
     _form._ctlSndOut.Open("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + message.ToXMLString());
     return(true);
 }