示例#1
0
        protected override void ConfigureWebHost(IWebHostBuilder builder)
        {
            if (!string.IsNullOrEmpty(SolutionRelativeContentDirectory))
            {
                builder.UseSolutionRelativeContentRoot(SolutionRelativeContentDirectory);
            }

            builder
            .ConfigureAppConfiguration((hostContext, builder) =>
            {
                if (UseBaseProjectUserSecrets)
                {
                    builder.AddUserSecrets(baseAssembly);
                }
            })
            .UseEnvironment(EnvironmentToUse)
            .ConfigureServices(b =>
            {
            })
            .UseStartup <TStartup>((x) =>
            {
                Startup = ConstructStartup(x.HostingEnvironment);
                return(Startup);
            })
            .UseUrls(BaseUrl);
        }