Beispiel #1
0
        public void MobileSendingCallback(object sender, EventArgs args)
        {
            var     eventArg = args as Mobile.SendCommandEventArg;
            Session sessionId;

            if (!Session.TryParse(eventArg.SessionId, out sessionId))
            {
                return;
            }
            Trader.Server.Ssl.Client client = AgentController.GetSender(sessionId);
            UnmanagedMemory          mem    = Serialization.SerializeManager.Default.Serialize(Serialization.SerializedInfo.CreateForXml(sessionId, null, eventArg.XElement));
            var commandForClient            = new ValueObjects.CommandForClient(mem, null, null);

            client.Send(commandForClient);
        }
 public void MobileSendingCallback(object sender, EventArgs args)
 {
     var eventArg = args as Mobile.SendCommandEventArg;
     Session sessionId;
     if (!Session.TryParse(eventArg.SessionId,out sessionId))
     {
         return;
     }
     Trader.Server.Ssl.Client client = AgentController.GetSender(sessionId);
     UnmanagedMemory mem = Serialization.SerializeManager.Default.Serialize(Serialization.SerializedInfo.CreateForXml(sessionId, null, eventArg.XElement));
     var commandForClient = new ValueObjects.CommandForClient(mem, null, null);
     client.Send(commandForClient);
 }