private void ProviderEventHappened(XProvider s, XProviderEventType type) { switch (type) { case XProviderEventType.TraderCreated: LoadPositions(); break; case XProviderEventType.ConnectDone: break; case XProviderEventType.DisconnectDone: break; case XProviderEventType.AutoDisconnect: break; default: _logger.Debug($"{AgentId}, status={type}"); TradingStatus = type; var reminder = new Reminder(OnMarketStatusEvent, DateTime.Now, type); reminder.SetClock(_eventClock); _eventQueue.Enqueue(reminder); break; } }
private void AddProviderEventReminder(XProviderEventType type) { _logger.Debug($"{AgentId}, status={type}"); TradingStatus = type; var reminder = new Reminder(OnMarketStatusEvent, DateTime.Now, type); reminder.SetClock(_eventClock); _eventQueue.Enqueue(reminder); }
private void ProviderEventHappened(XProvider s, XProviderEventType type) { switch (type) { case XProviderEventType.ConnectDone: InitProcessor(); break; case XProviderEventType.DisconnectDone: break; case XProviderEventType.AutoDisconnect: break; case XProviderEventType.TraderCreated: break; default: AddProviderEventReminder(type); break; } }