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 SelectReader(string reader)
 {
     try
     {
         m_reader = ReaderFactory.GetReader(reader);
         if (m_reader == null)
         {
             OnInfo(String.Format("Unable to instantiate corporate actions reader {0}", reader));
             return(false);
         }
         else
         {
             m_reader.OnInfo  += new EventHandler <LoggingEventArgs>(CorporateActionsLib_OnInfo);
             m_reader.OnError += new EventHandler <LoggingEventArgs>(CorporateActionsLib_OnError);
             m_reader.WaitMs   = m_parms.Timeout;
             return(true);
         }
     }
     catch (Exception ex)
     {
         OnError("Unable to instantiate report reader", ex);
         return(false);
     }
 }