static Opcoes LerOpcoes() { var builder = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); IConfiguration configuration = builder.Build(); var opcoes = new Opcoes() { Teste = configuration.GetValue <string>("Teste") }; return(opcoes); }
static void Main(string[] args) { ConfigurarLogs(); SetGlobalCultureInfo(); _opcoes = LerOpcoes(); }