9 implementations of IStartup
InMemory.FunctionalTests (1)
TestTransport\TestServer.cs (1)
31internal class TestServer : IAsyncDisposable, IStartup
IStartupInjectionAssemblyName (1)
Startup.cs (1)
10public class Startup : IStartup
Microsoft.AspNetCore.Hosting (2)
Startup\ConventionBasedStartup.cs (1)
11internal sealed class ConventionBasedStartup : IStartup
Startup\StartupBase.cs (1)
12public abstract class StartupBase : IStartup
Microsoft.AspNetCore.Hosting.Tests (2)
WebHostBuilderTests.cs (1)
1703private class DelegatingStartupWithIStartup : IStartup
WebHostTests.cs (1)
1291private class TestStartup : IStartup
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
2956private class MyStartup : IStartup
Sockets.BindTests (1)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (1)
30internal class TestServer : IAsyncDisposable, IStartup
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (1)
30internal class TestServer : IAsyncDisposable, IStartup
31 references to IStartup
InMemory.FunctionalTests (3)
TestTransport\TestServer.cs (3)
88services.AddSingleton<IStartup>(this); 130void IStartup.Configure(IApplicationBuilder app) 135IServiceProvider IStartup.ConfigureServices(IServiceCollection services)
IStartupInjectionAssemblyName (1)
Program.cs (1)
23.ConfigureServices(services => services.AddSingleton<IStartup, Startup>());
Microsoft.AspNetCore.Hosting (18)
GenericHost\GenericWebHostBuilder.cs (2)
226if (typeof(IStartup).IsAssignableFrom(startupType)) 228throw new NotSupportedException($"{typeof(IStartup)} isn't supported");
Internal\WebHost.cs (4)
27private IStartup? _startup; 189var startup = _hostingServiceProvider.GetService<IStartup>(); 193throw new InvalidOperationException($"No application configured. Please specify startup via IWebHostBuilder.UseStartup, IWebHostBuilder.Configure, injecting {nameof(IStartup)} or specifying the startup assembly via {nameof(WebHostDefaults.StartupAssemblyKey)} in the web host configuration.");
Startup\StartupBase.cs (1)
20IServiceProvider IStartup.ConfigureServices(IServiceCollection services)
WebHostBuilder.cs (4)
320if (typeof(IStartup).IsAssignableFrom(startupType)) 322services.AddSingleton(typeof(IStartup), startupType); 326services.AddSingleton(typeof(IStartup), RegisterStartup); 340services.AddSingleton<IStartup>(_ =>
WebHostBuilderExtensions.cs (7)
47services.AddSingleton<IStartup>(sp => 76services.AddSingleton<IStartup>(sp => 107services.AddSingleton(typeof(IStartup), GetStartupInstance); 117if (instance is IStartup startup) 150if (typeof(IStartup).IsAssignableFrom(startupType)) 152services.AddSingleton(typeof(IStartup), startupType); 156services.AddSingleton(typeof(IStartup), sp =>
Microsoft.AspNetCore.Hosting.Tests (3)
WebHostBuilderTests.cs (2)
1715IServiceProvider IStartup.ConfigureServices(IServiceCollection services) => _configureServices(services); 1716void IStartup.Configure(IApplicationBuilder app) => _configure(app);
WebHostTests.cs (1)
729services.AddTransient<IStartup, TestStartup>();
Sockets.BindTests (3)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (3)
88services.AddSingleton<IStartup>(this); 129void IStartup.Configure(IApplicationBuilder app) 134IServiceProvider IStartup.ConfigureServices(IServiceCollection services)
Sockets.FunctionalTests (3)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (3)
88services.AddSingleton<IStartup>(this); 129void IStartup.Configure(IApplicationBuilder app) 134IServiceProvider IStartup.ConfigureServices(IServiceCollection services)