// #endregion// members #region Constructors // ***************************************************************** // **** Constructors **** // ***************************************************************** public QueryBuilderHub(DataHub dataHub, DatabaseWriterHub dbWriter) : base("QueryBuilder", UV.Lib.Application.AppInfo.GetInstance().LogPath, true, LogLevel.ShowAllMessages) { m_DataHub = dataHub; m_DatabaseWriter = dbWriter; FrontEndServices m_Services = FrontEndServices.GetInstance(); m_Services.EmailRecipients = new string[1]; m_Services.EmailRecipients[0] = m_DataHub.m_EmailAddr; Log.AllowedMessages = LogLevel.ShowAllMessages; // Output database m_DatabaseInfo = m_DataHub.m_DataBaseInfo; this.Start(); }//constructor
// #endregion// members #region Constructors // ***************************************************************** // **** Constructors **** // ***************************************************************** public DatabaseWriterHub(DatabaseInfo DBInfo) : base("DatabaseWriter", UV.Lib.Application.AppInfo.GetInstance().LogPath, true, LogLevel.ShowAllMessages) { m_Services = FrontEndServices.GetInstance(); if ((!System.IO.Directory.Exists(m_Services.LogPath)) && (!System.IO.Directory.CreateDirectory(m_Services.LogPath).Exists)) { // Failed to create the directory for logs. Log.NewEntry(LogLevel.Error, "Failed to create directory {0}.", m_Services.LogPath); } m_Database = DBInfo; m_EmailSubjectPrefix = m_Services.RunName.ToString(); base.m_WaitListenUpdatePeriod = WritePeriodSecs * 1000; // convert to miliseconds. Initialize(); }//Constructor