2 instantiations of WebHostBuilderContext
Microsoft.AspNetCore.Hosting (2)
GenericHost\WebHostBuilderBase.cs (1)
80
var webHostBuilderContext = new
WebHostBuilderContext
WebHostBuilder.cs (1)
58
_context = new
WebHostBuilderContext
76 references to WebHostBuilderContext
CreateDefaultBuilderApp (1)
Program.cs (1)
39
private static string GetResponseMessage(
WebHostBuilderContext
context)
CreateDefaultBuilderOfTApp (1)
Program.cs (1)
51
private static string GetResponseMessage(
WebHostBuilderContext
context)
Microsoft.AspNetCore (13)
ConfigureWebHostBuilder.cs (7)
21
private readonly
WebHostBuilderContext
_context;
23
internal ConfigureWebHostBuilder(
WebHostBuilderContext
webHostBuilderContext, ConfigurationManager configuration, IServiceCollection services)
37
public IWebHostBuilder ConfigureAppConfiguration(Action<
WebHostBuilderContext
, IConfigurationBuilder> configureDelegate)
88
public IWebHostBuilder ConfigureServices(Action<
WebHostBuilderContext
, IServiceCollection> configureServices)
98
return ConfigureServices((
WebHostBuilderContext
context, IServiceCollection services) => configureServices(services));
171
IWebHostBuilder ISupportsStartup.Configure(Action<
WebHostBuilderContext
, IApplicationBuilder> configure)
181
IWebHostBuilder ISupportsStartup.UseStartup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TStartup>(Func<
WebHostBuilderContext
, TStartup> startupFactory)
WebApplicationBuilder.cs (5)
210
var
webHostContext = (
WebHostBuilderContext
)bootstrapHostBuilder.Properties[typeof(
WebHostBuilderContext
)];
386
private void ConfigureApplication(
WebHostBuilderContext
context, IApplicationBuilder app) =>
389
private void ConfigureApplication(
WebHostBuilderContext
context, IApplicationBuilder app, bool allowDeveloperExceptionPage)
WebHost.cs (1)
244
private static void ConfigureKestrel(
WebHostBuilderContext
builderContext, KestrelServerOptions options)
Microsoft.AspNetCore.Hosting (50)
GenericHost\GenericWebHostBuilder.cs (10)
47
var
webhostContext = GetWebHostBuilderContext(context);
54
var
webhostContext = GetWebHostBuilderContext(context);
98
private void ScanAssemblyAndRegisterStartup(HostBuilderContext context, IServiceCollection services,
WebHostBuilderContext
webhostContext, WebHostOptions webHostOptions)
189
public IWebHostBuilder UseStartup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TStartup>(Func<
WebHostBuilderContext
, TStartup> startupFactory)
206
var
webHostBuilderContext = GetWebHostBuilderContext(context);
217
var
webHostBuilderContext = GetWebHostBuilderContext(context);
335
public IWebHostBuilder Configure(Action<
WebHostBuilderContext
, IApplicationBuilder> configure)
350
var
webhostBuilderContext = GetWebHostBuilderContext(context);
362
private readonly
WebHostBuilderContext
_context;
364
public HostServiceProvider(
WebHostBuilderContext
context)
GenericHost\HostingStartupWebHostBuilder.cs (9)
18
private Action<
WebHostBuilderContext
, IConfigurationBuilder>? _configureConfiguration;
19
private Action<
WebHostBuilderContext
, IServiceCollection>? _configureServices;
31
public IWebHostBuilder ConfigureAppConfiguration(Action<
WebHostBuilderContext
, IConfigurationBuilder> configureDelegate)
42
public IWebHostBuilder ConfigureServices(Action<
WebHostBuilderContext
, IServiceCollection> configureServices)
56
public void ConfigureServices(
WebHostBuilderContext
context, IServiceCollection services)
61
public void ConfigureAppConfiguration(
WebHostBuilderContext
context, IConfigurationBuilder builder)
66
public IWebHostBuilder UseDefaultServiceProvider(Action<
WebHostBuilderContext
, ServiceProviderOptions> configure)
76
public IWebHostBuilder Configure(Action<
WebHostBuilderContext
, IApplicationBuilder> configure)
88
public IWebHostBuilder UseStartup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TStartup>(Func<
WebHostBuilderContext
, TStartup> startupFactory)
GenericHost\ISupportsUseDefaultServiceProvider.cs (1)
10
IWebHostBuilder UseDefaultServiceProvider(Action<
WebHostBuilderContext
, ServiceProviderOptions> configure);
GenericHost\SlimWebHostBuilder.cs (4)
30
var
webhostContext = GetWebHostBuilderContext(context);
72
public IWebHostBuilder UseStartup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TStartup>(Func<
WebHostBuilderContext
, TStartup> startupFactory)
77
public IWebHostBuilder Configure(Action<
WebHostBuilderContext
, IApplicationBuilder> configure)
87
var
webhostBuilderContext = GetWebHostBuilderContext(context);
GenericHost\WebHostBuilderBase.cs (12)
34
public IWebHostBuilder ConfigureAppConfiguration(Action<
WebHostBuilderContext
, IConfigurationBuilder> configureDelegate)
38
var
webhostBuilderContext = GetWebHostBuilderContext(context);
50
public IWebHostBuilder ConfigureServices(Action<
WebHostBuilderContext
, IServiceCollection> configureServices)
54
var
webhostBuilderContext = GetWebHostBuilderContext(context);
61
public IWebHostBuilder UseDefaultServiceProvider(Action<
WebHostBuilderContext
, ServiceProviderOptions> configure)
65
var
webHostBuilderContext = GetWebHostBuilderContext(context);
74
protected
WebHostBuilderContext
GetWebHostBuilderContext(HostBuilderContext context)
76
if (!context.Properties.TryGetValue(typeof(
WebHostBuilderContext
), out var contextVal))
80
var
webHostBuilderContext = new WebHostBuilderContext
86
context.Properties[typeof(
WebHostBuilderContext
)] = webHostBuilderContext;
92
var
webHostContext = (
WebHostBuilderContext
)contextVal;
Infrastructure\ISupportsStartup.cs (3)
12
/// <see cref="WebHostBuilderExtensions.UseStartup(IWebHostBuilder, Type)"/> and <see cref="WebHostBuilderExtensions.UseStartup{TStartup}(IWebHostBuilder, Func{
WebHostBuilderContext
, TStartup})"/>
29
IWebHostBuilder Configure(Action<
WebHostBuilderContext
, IApplicationBuilder> configure);
44
IWebHostBuilder UseStartup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TStartup>(Func<
WebHostBuilderContext
, TStartup> startupFactory);
WebHostBuilder.cs (6)
27
private readonly
WebHostBuilderContext
_context;
31
private Action<
WebHostBuilderContext
, IServiceCollection>? _configureServices;
32
private Action<
WebHostBuilderContext
, IConfigurationBuilder>? _configureAppConfigurationBuilder;
105
public IWebHostBuilder ConfigureServices(Action<
WebHostBuilderContext
, IServiceCollection> configureServices)
117
/// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="
WebHostBuilderContext
"/> are uninitialized at this stage.
120
public IWebHostBuilder ConfigureAppConfiguration(Action<
WebHostBuilderContext
, IConfigurationBuilder> configureDelegate)
WebHostBuilderExtensions.cs (5)
60
public static IWebHostBuilder Configure(this IWebHostBuilder hostBuilder, Action<
WebHostBuilderContext
, IApplicationBuilder> configureApp)
90
public static IWebHostBuilder UseStartup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TStartup>(this IWebHostBuilder hostBuilder, Func<
WebHostBuilderContext
, TStartup> startupFactory) where TStartup : class
193
public static IWebHostBuilder UseDefaultServiceProvider(this IWebHostBuilder hostBuilder, Action<
WebHostBuilderContext
, ServiceProviderOptions> configure)
216
/// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="
WebHostBuilderContext
"/> are uninitialized at this stage.
241
public static IWebHostBuilder ConfigureLogging(this IWebHostBuilder hostBuilder, Action<
WebHostBuilderContext
, ILoggingBuilder> configureLogging)
Microsoft.AspNetCore.Hosting.Abstractions (3)
IWebHostBuilder.cs (3)
26
/// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="
WebHostBuilderContext
"/> are uninitialized at this stage.
29
IWebHostBuilder ConfigureAppConfiguration(Action<
WebHostBuilderContext
, IConfigurationBuilder> configureDelegate);
45
IWebHostBuilder ConfigureServices(Action<
WebHostBuilderContext
, IServiceCollection> configureServices);
Microsoft.AspNetCore.Hosting.Tests (6)
Fakes\GenericWebHostBuilderWrapper.cs (5)
36
public IWebHostBuilder Configure(Action<
WebHostBuilderContext
, IApplicationBuilder> configure)
42
public IWebHostBuilder ConfigureAppConfiguration(Action<
WebHostBuilderContext
, IConfigurationBuilder> configureDelegate)
54
public IWebHostBuilder ConfigureServices(Action<
WebHostBuilderContext
, IServiceCollection> configureServices)
65
public IWebHostBuilder UseDefaultServiceProvider(Action<
WebHostBuilderContext
, ServiceProviderOptions> configure)
83
public IWebHostBuilder UseStartup<TStartup>(Func<
WebHostBuilderContext
, TStartup> startupFactory)
WebHostBuilderTests.cs (1)
69
Assert.Throws<ArgumentNullException>(() => builder.UseServer(server).UseStartup((Func<
WebHostBuilderContext
, object>)null));
Microsoft.AspNetCore.Server.Kestrel (2)
WebHostBuilderKestrelExtensions.cs (2)
149
public static IWebHostBuilder UseKestrel(this IWebHostBuilder hostBuilder, Action<
WebHostBuilderContext
, KestrelServerOptions> configureOptions)
164
public static IWebHostBuilder ConfigureKestrel(this IWebHostBuilder hostBuilder, Action<
WebHostBuilderContext
, KestrelServerOptions> configureOptions)