Skip to content

Commit a3d6a08

Browse files
Update generic-host.md (#48080)
changes the name of `IHostEnvironment`'s extension methods
1 parent c561d7b commit a3d6a08

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/core/extensions/generic-host.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ Inject the <xref:Microsoft.Extensions.Hosting.IHostEnvironment> service into a c
185185

186186
Additionally, the `IHostEnvironment` service exposes the ability to evaluate the environment with the help of these extension methods:
187187

188-
- <xref:Microsoft.Extensions.Hosting.HostingEnvironmentExtensions.IsDevelopment%2A?displayProperty=nameWithType>
189-
- <xref:Microsoft.Extensions.Hosting.HostingEnvironmentExtensions.IsEnvironment%2A?displayProperty=nameWithType>
190-
- <xref:Microsoft.Extensions.Hosting.HostingEnvironmentExtensions.IsProduction%2A?displayProperty=nameWithType>
191-
- <xref:Microsoft.Extensions.Hosting.HostingEnvironmentExtensions.IsStaging%2A?displayProperty=nameWithType>
188+
- <xref:Microsoft.Extensions.Hosting.HostEnvironmentEnvExtensions.IsDevelopment%2A?displayProperty=nameWithType>
189+
- <xref:Microsoft.Extensions.Hosting.HostEnvironmentEnvExtensions.IsEnvironment%2A?displayProperty=nameWithType>
190+
- <xref:Microsoft.Extensions.Hosting.HostEnvironmentEnvExtensions.IsProduction%2A?displayProperty=nameWithType>
191+
- <xref:Microsoft.Extensions.Hosting.HostEnvironmentEnvExtensions.IsStaging%2A?displayProperty=nameWithType>
192192

193193
## Host configuration
194194

@@ -212,7 +212,7 @@ The preceding code:
212212

213213
# [IHostBuilder](#tab/hostbuilder)
214214

215-
The host configuration is available in [HostBuilderContext.Configuration](xref:Microsoft.Extensions.Hosting.HostBuilderContext.Configuration) within the <xref:Microsoft.Extensions.Hosting.HostBuilder.ConfigureAppConfiguration%2A> method. When you call the `ConfigureAppConfiguration` method, the `HostBuilderContext` and `IConfigurationBuilder` are passed into the `configureDelegate`. The `configureDelegate` is defined as an `Action<HostBuilderContext, IConfigurationBuilder>`. The host builder context exposes the `Configuration` property, which is an instance of `IConfiguration`. It represents the configuration built from the host, whereas the `IConfigurationBuilder` is the builder object used to configure the app.
215+
The host configuration is available in [HostBuilderContext.Configuration](xref:Microsoft.Extensions.Hosting.HostBuilderContext.Configuration) within the <xref:Microsoft.Extensions.Hosting.HostBuilder.ConfigureAppConfiguration%2A> method. When you call the `ConfigureAppConfiguration` method, the `HostBuilderContext` and `IConfigurationBuilder` are passed into the `configureDelegate`. The `configureDelegate` is defined as an `Action<HostBuilderContext, IConfigurationBuilder>`. The `HostBuilderContext` exposes the `Configuration` property, which is an instance of `IConfiguration`. It represents the configuration built from the host, whereas the `IConfigurationBuilder` is the builder object used to configure the app.
216216

217217
> [!TIP]
218218
> After `ConfigureAppConfiguration` is called the `HostBuilderContext.Configuration` is replaced with the [app config](#app-configuration).

0 commit comments

Comments
 (0)