平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AppInfoOptions.cs 1.0 KiB

2 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. 
  2. //
  3. using Microsoft.Extensions.Configuration;
  4. using MoYu.ConfigurableOptions;
  5. namespace SafeCampus.Core;
  6. public class AppInfoOptions : IConfigurableOptionsListener<AppInfoOptions>
  7. {
  8. /// <summary>
  9. /// 深象智能API_Host
  10. /// </summary>
  11. public string SXAPIURL { get; set; }
  12. /// <summary>
  13. /// AppKey
  14. /// </summary>
  15. public string AppKey { get; set; }
  16. /// <summary>
  17. /// AppSecret
  18. /// </summary>
  19. public string AppSecret { get; set; }
  20. /// <summary>
  21. /// 场所ID
  22. /// </summary>
  23. public string PoiId { get; set; }
  24. /// <summary>
  25. /// 租户ID
  26. /// </summary>
  27. public string TenantCode { get; set; }
  28. public void PostConfigure(AppInfoOptions options, IConfiguration configuration)
  29. {
  30. }
  31. public void OnListener(AppInfoOptions options, IConfiguration configuration)
  32. {
  33. SXAPIURL = options.SXAPIURL;
  34. AppKey = options.AppKey;
  35. AppSecret = options.AppSecret;
  36. PoiId = options.PoiId;
  37. TenantCode = options.TenantCode;
  38. }
  39. }