コード例 #1
0
        public Startup(IWebHostEnvironment env, ILoggerFactory loggerFactory)
        {
            var builder = new ConfigurationBuilder()
                          .SetBasePath(env.ContentRootPath)
                          .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                          .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
                          .AddJsonFile("cognitivemodels.json", optional: true)
                          .AddJsonFile($"cognitivemodels.{env.EnvironmentName}.json", optional: true)
                          .AddEnvironmentVariables();

            Configuration = builder.Build();

            DBHelper.Configuration = Configuration;
            TextAnalyticsHelper.Configure(Configuration);
            JournalHelper.Configure(Configuration);
            TokensController.Configuration = Configuration;
            GraphHelper.Configure(Configuration);
            this.HostingEnvironment = env;
        }