-
-
Save johndowns/974214ea71fad5370aeb6dca44d1c925 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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