17 lines
470 B
C#
17 lines
470 B
C#
namespace Common.UI.Infrastructure
|
|
{
|
|
using System.Configuration;
|
|
|
|
public static class Appsettings
|
|
{
|
|
private static readonly Configuration configuration = ConfigurationManager.OpenExeConfiguration(typeof(Appsettings).Assembly.Location);
|
|
|
|
public static string Get(string name)
|
|
{
|
|
ConfigurationManager.RefreshSection("appSettings");
|
|
|
|
return configuration?.AppSettings?.Settings?[name]?.Value;
|
|
}
|
|
}
|
|
}
|