예제 #1
0
 /// <summary>
 /// 获取配置文件信息
 /// </summary>
 private void readConfig()
 {
     try
     {
         _repository = _context.GetRepository <DecryptionRepository>();
         //获取配置时间
         configPath = _context.GetCustomData <string>("configPath");
         string[] times = File.ReadAllLines(configPath);
         //获取配置时间
         foreach (var time in times)
         {
             if (time.Contains("TFLSLJ"))
             {
                 updateTimeTFLSLJ = time.Substring(7, 23);
             }
             if (time.Contains("TFYBLJ"))
             {
                 updateTimeTFYBLJ = time.Substring(7, 23);
             }
         }
     }
     catch (Exception ex)
     {
         _logger.LogWarning($"这里是readConfig方法,出错误的原因是{ex.Message}");
     }
 }