CommonConfigManager.cs 1013 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using Newtonsoft.Json;
  3. using System.Collections.Concurrent;
  4. using System.Collections.Generic;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Net.Http.Json;
  8. using System.Net.Mail;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using System.Windows;
  12. namespace Flyinsono.Client.Test.Utilities
  13. {
  14. internal class CommonConfigManager
  15. {
  16. public static List<string> DllList { get; set; }
  17. /// <summary>
  18. /// 初始化读取数据
  19. /// </summary>
  20. static CommonConfigManager()
  21. {
  22. //GetCountryData();
  23. //LoadExportToExcelData();
  24. var jsonContent = File.ReadAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Config", "Config.json"));
  25. var testConfig = JsonConvert.DeserializeObject<DllConfig>(jsonContent);
  26. DllList = testConfig.DllList.Split(',').ToList();
  27. }
  28. public class DllConfig
  29. {
  30. public string DllList { get; set; }
  31. }
  32. }
  33. }