Skip to content

Instantly share code, notes, and snippets.

@johndowns
Created November 7, 2018 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johndowns/974214ea71fad5370aeb6dca44d1c925 to your computer and use it in GitHub Desktop.
Save johndowns/974214ea71fad5370aeb6dca44d1c925 to your computer and use it in GitHub Desktop.
public static Settings Settings
{
get
{
if (_settings != null)
{
return _settings;
}
var configurationRoot = new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.AddEnvironmentVariables()
.Build();
_settings = new Settings();
configurationRoot.Bind(_settings);
return _settings;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment