private void ProcessExecution(Message message) { if (message.Type != MessageTypes.Execution) { return; } var execMsg = (ExecutionMessage)message; var latency = LatencyManager.ProcessMessage(execMsg); if (latency != null) { execMsg.Latency = latency; } if (execMsg.Commission == null) { execMsg.Commission = CommissionManager.ProcessExecution(execMsg); } }
void IMessageChannel.SendInMessage(Message message) { if (message.LocalTime.IsDefault()) { message.LocalTime = _innerAdapter.CurrentTime.LocalDateTime; } if (message.Type == MessageTypes.Connect) { LatencyManager.Reset(); CommissionManager.Reset(); RiskManager.Reset(); } else { LatencyManager.ProcessMessage(message); ProcessRisk(message); } _innerAdapter.SendInMessage(message); }