Пример #1
0
 /// <summary>
 ///
 /// </summary>
 static LoggerManager()
 {
     if (logger == null)
     {
         string logFilePath = Path.Combine(ConfigurationHelper.AppSettingPath("LogFile"), "Logs");
         if (!Directory.Exists(logFilePath))
         {
             Directory.CreateDirectory(logFilePath);
         }
         logger = new FileAgileLogger(Path.Combine(logFilePath, DateTime.Now.ToString("yyyy-MM-dd") + ".log"));
     }
 }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        private static void Reader()
        {
            string filePath = Path.Combine(ConfigurationHelper.AppSettingPath("TableConfig"), ConstExpression.TableConfigConfigName);

            if (System.IO.File.Exists(filePath))
            {
                _TableConfigCollection = TableConfigCollection.LoadFromFile(filePath);
                FileSystemWatcherHelper.StartChanged(filePath, () =>
                {
                    _TableConfigCollection = TableConfigCollection.LoadFromFile(filePath);
                });
            }
        }