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