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.

56 lines
1.4 KiB

1 year ago
  1. using System.Configuration;
  2. namespace Common.Helper
  3. {
  4. public static class ApplicationConfig
  5. {
  6. public static string GetDocumentUploadPath()
  7. {
  8. return ReadWebConfig("docUploadPath");
  9. }
  10. public static string GetDocumentUploadUrl()
  11. {
  12. return ReadWebConfig("docUploadURL");
  13. }
  14. public static string GetTelecomsIconRelativePath()
  15. {
  16. return ReadWebConfig("telecomsIconRelativePath");
  17. }
  18. public static string GetCountryFlagRelativePath()
  19. {
  20. return ReadWebConfig("countryFlagRelativePath");
  21. }
  22. public static string GetKycImageRelativePath()
  23. {
  24. return ReadWebConfig("kycImageRelativePath");
  25. }
  26. public static string GetRewardImageRelativePath()
  27. {
  28. return ReadWebConfig("rewardImageRelativePath");
  29. }
  30. public static string GetRootURL()
  31. {
  32. return ReadWebConfig("rootUrl");
  33. }
  34. public static string GetMaximumFileSize()
  35. {
  36. return ReadWebConfig("maxFileSize");
  37. }
  38. public static string ReadWebConfig(string key)
  39. {
  40. return ReadWebConfig(key, "");
  41. }
  42. public static string ReadWebConfig(string key, string defValue)
  43. {
  44. return ConfigurationManager.AppSettings[key] ?? defValue;
  45. }
  46. }
  47. }