BaseConfigModel.cs 959 B

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