8 references to UseStartup
Microsoft.AspNetCore.Hosting (1)
Infrastructure\ISupportsStartup.cs (1)
12
/// <see cref="WebHostBuilderExtensions.UseStartup(IWebHostBuilder, Type)"/> and <see cref="WebHostBuilderExtensions.
UseStartup
{TStartup}(IWebHostBuilder, Func{WebHostBuilderContext, TStartup})"/>
Microsoft.AspNetCore.Hosting.Tests (6)
WebHostBuilderTests.cs (6)
69
Assert.Throws<ArgumentNullException>(() => builder.UseServer(server).
UseStartup
((Func<WebHostBuilderContext, object>)null));
77
var ex = Assert.Throws<InvalidOperationException>(() => builder.UseServer(server).
UseStartup
<object>(context => null).Build());
88
.
UseStartup
<object>(context => throw new InvalidOperationException("This doesn't run"))
120
.
UseStartup
(context => new DelegatingStartup(ConfigureServices, Configure))
794
.
UseStartup
(context => new DelegatingStartup(s => { }, app => { }))
859
.
UseStartup
(context => new DelegatingStartupWithIStartup(ConfigureServices, Configure))
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
1835
var ex4 = Assert.Throws<NotSupportedException>(() => builder.WebHost.
UseStartup
(context => new MyStartup()));