public void Subscribe() { _tradeDeskEventsSink = new TradeDeskEventsSinkClass(); _tradeDeskEventsSink.ITradeDeskEvents_Event_OnRowChanged += new ITradeDeskEvents_OnRowChangedEventHandler(_adapter.tdSink_ITradeDeskEvents_Event_OnRowChanged); _tradeDeskEventsSink.ITradeDeskEvents_Event_OnSessionStatusChanged += new ITradeDeskEvents_OnSessionStatusChangedEventHandler(_tradeDeskEventsSink_ITradeDeskEvents_Event_OnSessionStatusChanged); _subscriptionResponse = _desk.Subscribe(_tradeDeskEventsSink); SystemMonitor.Report("FXCM Service Subscribed"); }
/// <summary> /// Managed thread entrance only. /// </summary> void Managed_Subscribe() { if (_tradeDeskEventsSink == null) { _tradeDeskEventsSink = new TradeDeskEventsSinkClass(); _tradeDeskEventsSink.ITradeDeskEvents_Event_OnRowChanged += new ITradeDeskEvents_OnRowChangedEventHandler(Managed_tdSink_ITradeDeskEvents_Event_OnRowChanged); _tradeDeskEventsSink.ITradeDeskEvents_Event_OnSessionStatusChanged += new ITradeDeskEvents_OnSessionStatusChangedEventHandler(Managed_tradeDeskEventsSink_ITradeDeskEvents_Event_OnSessionStatusChanged); } TradeDeskAut desk = _desk; if (_desk == null) { return; } _subscriptionId = desk.Subscribe(_tradeDeskEventsSink); }