5 implementations of Build
Microsoft.AspNetCore (1)
ConfigureWebHostBuilder.cs (1)
31IWebHost IWebHostBuilder.Build()
Microsoft.AspNetCore.Hosting (3)
GenericHost\HostingStartupWebHostBuilder.cs (1)
26public IWebHost Build()
GenericHost\WebHostBuilderBase.cs (1)
29public IWebHost Build()
WebHostBuilder.cs (1)
129public IWebHost Build()
Microsoft.AspNetCore.Hosting.Tests (1)
Fakes\GenericWebHostBuilderWrapper.cs (1)
24public IWebHost Build()
177 references to Build
ApiExplorerWebSite (1)
Startup.cs (1)
49.Build();
ApplicationModelWebSite (1)
Startup.cs (1)
38.Build();
Aspire.Dashboard.Tests (1)
Integration\MockOpenIdAuthority.cs (1)
110.Build();
BasicWebSite (1)
Program.cs (1)
8public static void Main(string[] args) => CreateWebHostBuilder(args).Build().Run();
ClaimsTransformation (1)
Program.cs (1)
21.Build()
ControllersFromServicesWebSite (1)
Startup.cs (1)
65.Build();
Cookies (1)
Program.cs (1)
21.Build()
CorsWebSite (1)
Program.cs (1)
11.Build();
CreateDefaultBuilderApp (1)
Program.cs (1)
36.Build().Run();
CreateDefaultBuilderOfTApp (1)
Program.cs (1)
47.Build()
CustomPolicyProvider (1)
Program.cs (1)
13CreateWebHostBuilder(args).Build().Run();
DefaultBuilder.SampleApp (1)
Program.cs (1)
79.Build())
DependencyInjectionApp (1)
Program.cs (1)
39.Build().Run();
DynamicSchemes (1)
Program.cs (1)
21.Build()
ErrorPageMiddlewareWebSite (1)
Startup.cs (1)
28.Build();
FilesWebSite (1)
Startup.cs (1)
27.Build();
FormatterWebSite (1)
Program.cs (1)
11.Build();
HtmlGenerationWebSite (1)
Startup.cs (1)
52.Build();
Identity.ExternalClaims (1)
Program.cs (1)
20CreateWebHostBuilder(args).Build().Run();
IdentitySample.Mvc (1)
Program.cs (1)
11var host = CreateHostBuilder(args).Build();
InProcessWebSite (5)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Program.cs (5)
62.Build(); 74.Build(); 101.Build(); 142.Build(); 202.Build();
Interop.FunctionalTests (2)
Http3\Http3TlsTests.cs (2)
382var host = hostBuilder.Build(); 423var host = hostBuilder.Build();
IStartupInjectionAssemblyName (1)
Program.cs (1)
14var webHost = CreateWebHostBuilder(args).Build();
Microsoft.AspNetCore (1)
WebHost.cs (1)
110var host = builder.Build();
Microsoft.AspNetCore.DataProtection.Tests (1)
HostingTests.cs (1)
37using (var host = builder.Build())
Microsoft.AspNetCore.Hosting.Abstractions (1)
HostingAbstractionsWebHostBuilderExtensions.cs (1)
174var host = hostBuilder.UseUrls(urls).Build();
Microsoft.AspNetCore.Hosting.Tests (107)
WebHostBuilderTests.cs (69)
31using (var host = builder.UseStartup("MyStartupAssembly").Build()) 44using (var host = builder.UseServer(server).UseStartup("MissingStartupAssembly").Build()) 56var host = builder.UseServer(server).UseStartup<StartupStaticCtorThrows>().Build(); 77var ex = Assert.Throws<InvalidOperationException>(() => builder.UseServer(server).UseStartup<object>(context => null).Build()); 100.Build(); 121.Build(); 134var host = builder.UseServer(server).UseStartup<StartupCtorThrows>().Build(); 147var host = builder.UseServer(server).UseStartup<StartupThrowTypeLoadException>().Build(); 160var host = builder.UseServer(server).UseStartup<StartupCtorThrows>().Build(); 177var host = builder.UseServer(server).UseStartup<StartupConfigureServicesThrows>().Build(); 190var host = builder.UseServer(server).UseStartup<StartupConfigureServicesThrows>().Build(); 206using (var host = hostBuilder.Build()) 232using var host = hostBuilder.Build(); 260using var host = hostBuilder.Build(); 282using (hostBuilder.Build()) 310using (var host = builder.Build()) 336using (hostBuilder.Build()) { } 356using (hostBuilder.Build()) { } 367using (var host = hostBuilder.Build()) 387using (hostBuilder.Build()) { } 408using (var host = hostBuilder.Build()) 424var exception = Assert.Throws<InvalidOperationException>(() => hostBuilder.Build()); 441Assert.Throws<InvalidOperationException>(() => hostBuilder.Build()); 454var exception = Assert.Throws<InvalidOperationException>(() => hostBuilder.Build()); 477using (var host = hostBuilder.Build()) 496using (var host = hostBuilder.Build()) 522using (var host = hostBuilder.Build()) 548using (var host = hostBuilder.Build()) 583using (var host = hostBuilder.Build()) 609.Build()) 637.Build()) { } 657.Build()) 676.Build()) 698.Build()) 716using var host = builder.Build(); 730.Build()) 748.Build()) 766.Build(); 779.Build()) 795.Build()) 811.Build()) 825.Build()) 839.Build()) 841var ex = Assert.Throws<InvalidOperationException>(() => builder.Build()); 860.Build()) 877.Build()) 894using (var host = builder.Build()) 914using (var host = builder.Build()) 931using (var host = builder.Build()) 952using (var host = builder.Build()) 983.Build(); 1005var exception = Assert.Throws<NotSupportedException>(() => builder.Build()); 1018builder.Build(); 1052using (var host = builder.Build()) 1073using (var host = builder.Build()) 1090using (var host = builder.Build()) 1126using (var host = builder.Build()) 1154using (builder.Build()) 1169using (builder.Build()) 1185using (builder.Build()) 1206using (var host = builder.Build()) 1226using (var host = builder.Build()) 1250using var host = builder.Build(); 1279using (var host = builder.Build()) 1299using var host = hostBuilder.Build(); 1336using var host = builder.Build(); 1352using (var host = builder.Build()) 1377using var host = builder.Build(); 1406using var host = builder.Build();
WebHostTests.AsyncDisposable.cs (1)
20.Build())
WebHostTests.cs (37)
27var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => CreateBuilder().Build().StartAsync()); 40using (var host = CreateBuilder().UseFakeServer().Build()) 59using (var host = CreateBuilder(config).UseFakeServer().Build()) 78using (var host = CreateBuilder(config).UseFakeServer().Build()) 98using (var host = CreateBuilder(config).UseFakeServer().Build()) 110using (var host = CreateBuilder().UseFakeServer().PreferHostingUrls(true).Build()) 129using (var host = CreateBuilder(config).UseFakeServer().PreferHostingUrls(true).Build()) 161.Build()) 219.Build()) 258.Build()) 294.Build()) 313.Build()) 380.Build()) 407.Build()) 428.Build()) 469.Build()) 506.Build()) 529.Build()) 553.Build()) 596.Build()) 649.Build()) 678.Build()) 711.Build()) 734Assert.Throws<NotImplementedException>(() => builder.Build()); 740using (var host = CreateBuilder().UseFakeServer().ConfigureServices(services => services.AddOptions()).Build()) 764.Build()) 799using (var host = CreateBuilder().UseFakeServer().Build()) 822using (var host = CreateBuilder(config).UseFakeServer().Build()) 845using (var host = CreateBuilder(config).UseFakeServer().Build()) 862using (var host = CreateBuilder().UseFakeServer().Build()) 927.Build()) 990var ex = Assert.Throws<InvalidOperationException>(() => builder.Build()); 1009.Build(); 1033.Build(); 1053.Build()) 1073.Build()) 1101return builder.Build();
Microsoft.AspNetCore.Hosting.TestSites (2)
Program.cs (2)
38var host = builder.Build(); 44using (var host = builder.Build())
Microsoft.AspNetCore.Hosting.WindowsServices.Tests (2)
WebHostServiceTests.cs (2)
22var host = new WebHostBuilder().UseServer(new FakeServer()).Configure(x => { }).Build(); 36var host = new WebHostBuilder().UseServer(new FakeServer()).Configure(x => { }).Build();
Microsoft.AspNetCore.Server.Kestrel.Tests (13)
HttpsConfigurationTests.cs (7)
40var host = hostBuilder.Build(); 69var host = hostBuilder.Build(); 102var host = hostBuilder.Build(); 139var host = hostBuilder.Build(); 172var host = hostBuilder.Build(); 202var host = hostBuilder.Build(); 228var host = hostBuilder.Build();
WebHostBuilderKestrelExtensionsTests.cs (6)
36hostBuilder.Build(); 52hostBuilder.Build(); 62var transportFactories = hostBuilder.Build().Services.GetServices<IConnectionListenerFactory>(); 85var factories = hostBuilder.Build().Services.GetServices<IConnectionListenerFactory>(); 93var factoriesReversed = hostBuilderReversed.Build().Services.GetServices<IConnectionListenerFactory>(); 110Assert.IsType<KestrelServerImpl>(hostBuilder.Build().Services.GetService<IServer>());
Microsoft.AspNetCore.TestHost (1)
TestServer.cs (1)
97var host = builder.UseServer(this).Build();
Microsoft.AspNetCore.TestHost.Tests (1)
TestServerTests.cs (1)
105using var host = builder.Build();
Microsoft.AspNetCore.Tests (6)
WebApplicationTests.cs (1)
380Assert.Throws<NotSupportedException>(() => ((IWebHostBuilder)createBuilder().WebHost).Build());
WebHostTests.cs (5)
37}).Build(); 77}).Build(); 91.Build(); 103.Build(); 119.Build();
Mvc.RoutingWebSite (1)
Program.cs (1)
11.Build();
MvcSandbox (1)
Startup.cs (1)
46.Build();
PathSchemeSelection (1)
Program.cs (1)
20CreateWebHostBuilder(args).Build().Run();
RazorBuildWebSite (1)
StartupWithHostingStartup.cs (1)
38.Build();
RazorPagesWebSite (1)
Program.cs (1)
11.Build();
RazorWebSite (1)
Program.cs (1)
11.Build();
SecurityWebSite (1)
Program.cs (1)
11.Build();
ServerComparison.TestSites (1)
Program.cs (1)
49var host = builder.Build();
SimpleWebSite (1)
Startup.cs (1)
33.Build();
SocialSample (1)
Program.cs (1)
14.Build();
StaticFilesAuth (1)
Program.cs (1)
20CreateWebHostBuilder(args).Build().Run();
TagHelpersWebSite (1)
Startup.cs (1)
27.Build();
VersioningWebSite (1)
Program.cs (1)
11.Build();
XmlFormattersWebSite (1)
Startup.cs (1)
113.Build();