1 write to Host
Microsoft.AspNetCore (1)
WebApplicationBuilder.cs (1)
213Host = new ConfigureHostBuilder(bootstrapHostBuilder.Context, Configuration, Services);
28 references to Host
Microsoft.AspNetCore (2)
WebApplicationBuilder.cs (2)
201[MemberNotNull(nameof(Environment), nameof(Host), nameof(WebHost))] 381Host.ApplyServiceProviderFactory(_hostApplicationBuilder);
Microsoft.AspNetCore.Tests (26)
WebApplicationTests.cs (26)
373Assert.Throws<NotSupportedException>(() => ((IHostBuilder)createBuilder().Host).Build()); 474builder.Host.UseContentRoot(contentRoot + Path.DirectorySeparatorChar); 475builder.Host.UseContentRoot(contentRoot.ToUpperInvariant()); 476builder.Host.UseContentRoot(contentRoot.ToLowerInvariant()); 619builder.Host.UseContentRoot(AppContext.BaseDirectory); 620builder.Host.UseContentRoot(Path.TrimEndingDirectorySeparator(AppContext.BaseDirectory)); 621builder.Host.UseContentRoot(""); 939builder.Host.ConfigureAppConfiguration((context, config) => 981builder.Host.ConfigureAppConfiguration((context, config) => 1054builder.Host.ConfigureAppConfiguration((context, config) => 1080Assert.Throws<NotSupportedException>(() => builder.Host.ConfigureHostConfiguration(builder => 1088Assert.Throws<NotSupportedException>(() => builder.Host.UseEnvironment(envName)); 1089Assert.Throws<NotSupportedException>(() => builder.Host.UseContentRoot(contentRoot)); 1344builder.Host.Properties["lowercase"] = nameof(WebApplicationTests); 1346Assert.Equal(nameof(WebApplicationTests), builder.Host.Properties["lowercase"]); 1347Assert.False(builder.Host.Properties.ContainsKey("Lowercase")); 1843var ex5 = Assert.Throws<NotSupportedException>(() => builder.Host.ConfigureWebHost(webHostBuilder => { })); 1844var ex6 = Assert.Throws<NotSupportedException>(() => builder.Host.ConfigureWebHost(webHostBuilder => { }, options => { })); 1845var ex7 = Assert.Throws<NotSupportedException>(() => builder.Host.ConfigureSlimWebHost(webHostBuilder => { }, options => { })); 1846var ex8 = Assert.Throws<NotSupportedException>(() => builder.Host.ConfigureWebHostDefaults(webHostBuilder => { })); 2183builder.Host.Properties["hello"] = "world"; 2186builder.Host.ConfigureAppConfiguration((context, config) => 2192builder.Host.ConfigureServices((context, config) => 2198builder.Host.ConfigureContainer<IServiceCollection>((context, config) => 2519builder.Host.Properties["MyProp"] = 1; 2522Assert.Same(builder.Host.Properties, iHostApplicationBuilder.Properties);