BaseConfigModel.cs 936 B

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