internal Protocal.Command GetUpdateInstrumentStatusCommand()
        {
            var instruments = _instrumentDict.Values.ToList();
            var content     = JsonConvert.SerializeObject(instruments);
            var command     = new Protocal.Command();

            command.Type    = Protocal.CommandType.UpdateInstrumentStateFromDB;
            command.AppType = iExchange.Common.AppType.TransactionServer;
            command.Content = content;
            return(command);
        }
Ejemplo n.º 2
0
        public void Broadcast(Protocal.Command command)
        {
            try
            {
                Logger.WarnFormat("Receive command, type={0}", command.GetType());
                var tradingCommand = command as Protocal.TradingCommand;
                if (tradingCommand != null)
                {
                    Logger.WarnFormat("Receive tradingCommand, content = {0}", tradingCommand.Content);
                }

                Broadcaster.Default.AddCommand(command);
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
            }
        }
Ejemplo n.º 3
0
 public void Broadcast(Protocal.Command command)
 {
     this.Call(() => this.Service.Broadcast(command));
 }