HostingHostBuilderExtensions.UseEnvironment(IHostBuilder, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specify the environment to be used by the host. To avoid the environment being overwritten by a default value, ensure this is called after defaults are configured.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Hosting::IHostBuilder ^ UseEnvironment(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, System::String ^ environment);
public static Microsoft.Extensions.Hosting.IHostBuilder UseEnvironment (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, string environment);
static member UseEnvironment : Microsoft.Extensions.Hosting.IHostBuilder * string -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function UseEnvironment (hostBuilder As IHostBuilder, environment As String) As IHostBuilder
Parameters
- hostBuilder
- IHostBuilder
The IHostBuilder to configure.
- environment
- String
The environment to host the application in.
Returns
The IHostBuilder.
Applies to
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.