protected void Dispose(bool disposing) { if (disposing) { if (m_reader != null) { m_reader.Dispose(); m_reader = null; } if (m_writer != null) { m_writer.Dispose(); m_writer = null; } if (m_hugoConnection != null) { m_hugoConnection.Dispose(); m_hugoConnection = null; } if (m_configDbConnection != null) { m_configDbConnection.Dispose(); m_configDbConnection = null; } } }
private bool SelectWriter(string writer) { try { m_writer = WriterFactory.GetWriter(writer); if (m_writer == null) { OnInfo(String.Format("Unable to instantiate corporate actions writer {0}", writer)); return(false); } else { m_writer.OnInfo += new EventHandler <LoggingEventArgs>(CorporateActionsLib_OnInfo); m_writer.OnError += new EventHandler <LoggingEventArgs>(CorporateActionsLib_OnError); return(true); } } catch (Exception ex) { OnError("Unable to instantiate report writer", ex); return(false); } }