Environments Class
Definition
- Namespace
- Cuemon.Extensions.Hosting
- Assemblies
- Cuemon.Extensions.Hosting.dll
Provides a set of constants for commonly used environment names.
public static class Environments
- Inheritance
-
Environments
Examples
The following example shows how to configure a .NET generic host to use the Environments.LocalDevelopment environment. The host is built and run with this environment setting.
using Cuemon.Extensions.Hosting;
using Microsoft.Extensions.Hosting;
namespace Cuemon.Extensions.Hosting;
public class EnvironmentsExample
{
public void Demonstrate()
{
var builder = Host.CreateDefaultBuilder()
.UseEnvironment(Environments.LocalDevelopment);
using var host = builder.Build();
host.Run();
}
}
Fields
| Name | Description |
|---|---|
| LocalDevelopment | Defines a local development environment. |