Пример #1
0
        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);
        }
Пример #2
0
 static void Main(string[] args)
 {
     ConfigurarLogs();
     SetGlobalCultureInfo();
     _opcoes = LerOpcoes();
 }