/// <summary> /// /// </summary> public void Dispose() { lock (this) { if (_orders != null) { _orders.UnInitialize(); _orders.Dispose(); _orders = null; } if (_adapter != null) { _adapter = null; } if (_core != null) { _desk = null; _core = null; } if (_messageLoopOperator != null) { _messageLoopOperator.Stop(); _messageLoopOperator.Dispose(); _messageLoopOperator = null; } ChangeOperationalState(OperationalStateEnum.Disposed); } //GC.Collect(); }
bool Construct() { _data = new FXCMData(this, DataSourceStub); _orders = new FXCMOrders(this, OrderExecutionStub); StatusSynchronizationEnabled = false; StatusSynchronizationSource = null; return(true); }
/// <summary> /// Constructor. /// </summary> public FXCMConnectionManager(FXCMAdapter adapter) { ChangeOperationalState(OperationalStateEnum.Constructed); _subscriptionResponse = -1; _adapter = adapter; _messageLoopOperator = new BackgroundMessageLoopOperator(false); _orders = new FXCMOrders(_messageLoopOperator); _messageLoopOperator.Start(); }
/// <summary> /// /// </summary> public override void Dispose() { DisposeManager(); FXCMData data = _data; if (data != null) { data.Dispose(); _data = null; } if (_orders != null) { _orders.Dispose(); _orders = null; } }
bool Construct() { _data = new FXCMData(this, DataSourceStub); _orders = new FXCMOrders(this, OrderExecutionStub); StatusSynchronizationEnabled = false; StatusSynchronizationSource = null; return true; }