Exemplo n.º 1
0
        private static void Dispose(bool disposing)
        {
            if (disposing)
            {
                StopMonitor();

                if (s_tableAdapters != null)
                {
                    foreach (IHugoTableAdapter tableAdapter in s_tableAdapters)
                    {
                        if (tableAdapter != null)
                        {
                            tableAdapter.Dispose();
                        }
                    }
                    s_tableAdapters = null;
                }

                if (s_currentPositions != null)
                {
                    s_currentPositions.Dispose();
                    s_currentPositions = null;
                }
                if (s_trades != null)
                {
                    s_trades.Dispose();
                    s_trades = null;
                }
                Info("PositionMonitorUtilities disposed");
            }
        }
Exemplo n.º 2
0
        private void Dispose(bool disposing)
        {
            if (disposing)
            {
                StopMonitor();

                if (m_tableAdapters != null)
                {
                    foreach (IHugoTableAdapter tableAdapter in m_tableAdapters)
                    {
                        if (tableAdapter != null)
                        {
                            tableAdapter.Dispose();
                        }
                    }
                    m_tableAdapters = null;
                }

                if (m_currentPositions != null)
                {
                    m_currentPositions.Dispose();
                    m_currentPositions = null;
                }
                if (m_trades != null)
                {
                    m_trades.Dispose();
                    m_trades = null;
                }
                if (m_accountData != null)
                {
                    m_accountData.Dispose();
                    m_accountData = null;
                }
                if (m_indexWeights != null)
                {
                    m_indexWeights.Dispose();
                    m_indexWeights = null;
                }
                if (m_tradingSchedule != null)
                {
                    m_tradingSchedule.Dispose();
                    m_tradingSchedule = null;
                }
                Info("PositionMonitorUtilities disposed");
            }
        }