}//TryLoadBooks() // // // // ***************************************************** // **** Dispose() **** // ***************************************************** public void Dispose() { if (m_ArcBookWriter != null) { m_ArcBookWriter.RequestStop(); m_ArcBookWriter = null; } }
// // #endregion//Constructors #region Properties // ***************************************************************** // **** Properties **** // ***************************************************************** // // #endregion//Properties #region Public Methods // ***************************************************************** // **** Public Methods **** // ***************************************************************** // // // // // // #endregion//Public Methods #region Private Methods // ***************************************************************** // **** Private Methods **** // ***************************************************************** // // private void Shutdown() { m_IsShuttingDown = true; if (m_Writer != null) { m_Writer.RequestStop(); m_Writer = null; } if (m_TTService != null) { m_TTService.Dispose(); m_TTService = null; } if (m_PriceListener != null) { m_PriceListener.Dispose(); m_PriceListener = null; } if (m_FillListener != null) { m_FillListener.Dispose(); m_FillListener = null; } if (m_OrderListener != null) { m_OrderListener.Dispose(); m_OrderListener = null; } if (Log != null) { Log.RequestStop(); Log = null; } }
}//TryLoadBooks() // // // // ***************************************************** // **** Dispose() **** // ***************************************************** public void Dispose() { if (m_FillWriter != null) { m_FillWriter.RequestStop(); // this will purge any drop lines in buffer. m_FillWriter = null; } if (m_LocalBookWriter != null) { m_LocalBookWriter.RequestStop(); m_LocalBookWriter = null; } if (m_ArcBookWriter != null) { m_ArcBookWriter.RequestFlushNow(); // Following procedure as above, make current file up to date... if (PushToRepository) // Now its up-to-date, push it to the repository group-shared drive. { string repoPath = GetRepositoryPath(DropFileStartDateTime); m_ArcBookWriter.RequestCopyTo(repoPath, string.Empty);// push current file to repository now, keep same filename. m_ArcBookWriter.RequestCopyAllFiles(repoPath, string.Format("*{0}", GetArchiveFileNameBase(DropType_FillBook))); } m_ArcBookWriter.RequestStop(); m_ArcBookWriter = null; } }