12345678910111213141516171819202122232425262728293031323334 |
- using Microsoft.Extensions.Configuration;
- namespace CZFW.Core
- {
- public class ConfigHelper
- {
- public static IConfiguration Configs;
- public static string GetValue(string key)
- {
- return Configs[key];
- }
- public static TVal GetValue<TVal>(string key)
- {
- var res = Utility.Parse<TVal>(Configs[key]);
- return res;
- }
- public static string UserSessionName
- {
- get {
- return GetValue("UserSessionName");
- }
- }
- public static string TestUrlBase
- {
- get
- {
- return GetValue("HostRoot");
- }
- }
- }
- }
|