internal void Add(TradingCommand command)
 {
     lock (_mutex)
     {
         _commands.Enqueue(command);
         _resetEvent.Set();
     }
 }
Exemple #2
0
 protected override void HandleTradingCommand(TradingCommand tradingCommand)
 {
     try
     {
         CommandManager.Default.ProcessTradingCommand(tradingCommand);
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
     }
 }
        private void DoProccess(TradingCommand command)
        {
            if (string.IsNullOrEmpty(command.Content))
            {
                return;
            }
            XElement    accountXElement = XElement.Parse(command.Content);
            Guid        accountId       = accountXElement.AttrToGuid("ID");
            var         account         = AccountRepository.Default.Get(accountId);
            ChangedFund changedFund;

            if (account != null)
            {
                List <OrderPhaseChange> orderChangs = account.Update(accountXElement, out changedFund);
                this.NotifyOrderChanged(orderChangs);
            }
        }
Exemple #4
0
 protected override void HandleTradingCommand(TradingCommand tradingCommand)
 {
 }