/// <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();
        }
Example #2
0
        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>
        /// Constructor.
        /// </summary>
        public FXCMConnectionManager(FXCMAdapter adapter)
        {
            ChangeOperationalState(OperationalStateEnum.Constructed);

            _subscriptionResponse = -1;
            _adapter = adapter;
            _messageLoopOperator = new BackgroundMessageLoopOperator(false);
            _orders = new FXCMOrders(_messageLoopOperator);

            _messageLoopOperator.Start();
        }
Example #5
0
        /// <summary>
        ///
        /// </summary>
        public override void Dispose()
        {
            DisposeManager();

            FXCMData data = _data;

            if (data != null)
            {
                data.Dispose();
                _data = null;
            }

            if (_orders != null)
            {
                _orders.Dispose();
                _orders = null;
            }
        }
        /// <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>
        /// 
        /// </summary>
        public override void Dispose()
        {
            DisposeManager();

            FXCMData data = _data;
            if (data != null)
            {
                data.Dispose();
                _data = null;
            }

            if (_orders != null)
            {
                _orders.Dispose();
                _orders = null;
            }
        }