2 implementations of IStartup
Microsoft.AspNetCore.Hosting (2)
Startup\ConventionBasedStartup.cs (1)
11internal sealed class ConventionBasedStartup : IStartup
Startup\StartupBase.cs (1)
12public abstract class StartupBase : IStartup
18 references to IStartup
Microsoft.AspNetCore.Hosting (18)
GenericHost\GenericWebHostBuilder.cs (2)
230if (typeof(IStartup).IsAssignableFrom(startupType)) 232throw new NotSupportedException($"{typeof(IStartup)} isn't supported");
Internal\WebHost.cs (4)
28private IStartup? _startup; 190var startup = _hostingServiceProvider.GetService<IStartup>(); 194throw 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)
322if (typeof(IStartup).IsAssignableFrom(startupType)) 324services.AddSingleton(typeof(IStartup), startupType); 328services.AddSingleton(typeof(IStartup), RegisterStartup); 342services.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 =>