ApplicationParts.Web.Startup.Startup C# (CSharp) Метод

Startup() публичный Метод

public Startup ( IHostingEnvironment env ) : Microsoft.AspNetCore.Builder
env IHostingEnvironment
Результат Microsoft.AspNetCore.Builder
        public Startup(IHostingEnvironment env)
        {
            var builder = new ConfigurationBuilder()
                .SetBasePath(env.ContentRootPath)
                .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);

            if (env.IsDevelopment())
            {
                // For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709
                builder.AddUserSecrets();
            }

            builder.AddEnvironmentVariables();
            Configuration = builder.Build();
        }