BaseConfigModel.cs 888 B

12345678910111213141516171819202122232425262728293031
  1. using Microsoft.Extensions.Configuration;
  2. namespace TEAMModelOS.SDK.Context.Configuration
  3. {
  4. public class BaseConfigModel
  5. {
  6. public static IConfiguration Configuration { get; set; }
  7. /// <summary>
  8. ///
  9. /// </summary>
  10. public static string ContentRootPath { get; set; }
  11. /// <summary>
  12. ///
  13. /// </summary>
  14. public static string WebRootPath { get; set; }
  15. /// <summary>
  16. ///
  17. /// </summary>
  18. /// <param name="config"></param>
  19. /// <param name="contentRootPath"></param>
  20. /// <param name="webRootPath"></param>
  21. public static void SetBaseConfig(IConfiguration config, string contentRootPath, string webRootPath)
  22. {
  23. Configuration = config;
  24. ContentRootPath = contentRootPath;
  25. WebRootPath = webRootPath;
  26. }
  27. }
  28. }