예제 #1
0
        private void ConfigureServices()
        {
            var services = new ServiceCollection();

            var configuration = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build();

            services.AddSingleton <IConfiguration>(configuration).AddFeatureManagement().AddFeatureFilter <PercentageFilter>();//.AddFeatureFilter<AccountIdFilter>();

            ServicoConfig.ConfigurarEscopo(services);

            serviceProvider = services.BuildServiceProvider();

            configuracaoApp = serviceProvider.GetRequiredService <IConfiguracaoApp>();
            configuracaoApp.SetBancoDados_InMemory(true);

            Constantes.ChaveAutenticacao = configuration["Jwt:Key"];
        }
예제 #2
0
 public iCustomContexto(IConfiguracaoApp configuracaoApp) : base()
 {
     _configuracaoApp = configuracaoApp;
 }