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.

68 lines
1.3 KiB

2 years ago
  1. using System.Configuration;
  2. using System.Runtime.CompilerServices;
  3. namespace EasyBL.WebApi.Common
  4. {
  5. public class WebSettingsConfig
  6. {
  7. public static string UrlExpireTime
  8. {
  9. get
  10. {
  11. return AppSettingValue();
  12. }
  13. }
  14. public static string TokenApi
  15. {
  16. get
  17. {
  18. return AppSettingValue();
  19. }
  20. }
  21. public static string GetApi
  22. {
  23. get
  24. {
  25. return AppSettingValue();
  26. }
  27. }
  28. public static string OrgId
  29. {
  30. get
  31. {
  32. return AppSettingValue();
  33. }
  34. }
  35. public static string UserId
  36. {
  37. get
  38. {
  39. return AppSettingValue();
  40. }
  41. }
  42. public static string PassWd
  43. {
  44. get
  45. {
  46. return AppSettingValue();
  47. }
  48. }
  49. public static string ExpireTime
  50. {
  51. get
  52. {
  53. return AppSettingValue();
  54. }
  55. }
  56. private static string AppSettingValue([CallerMemberName] string key = null)
  57. {
  58. return ConfigurationManager.AppSettings[key];
  59. }
  60. }
  61. }