Table of Contents

Class HostEnvironmentExtensions

Namespace
Cuemon.Extensions.Hosting
Assembly
Cuemon.Extensions.Hosting.dll

Extension methods for the Microsoft.Extensions.Hosting.IHostEnvironment interface.

public static class HostEnvironmentExtensions
Inheritance
Object
HostEnvironmentExtensions

Methods

IsLocalDevelopment(IHostEnvironment)

Determines whether the specified environment is equal to LocalDevelopment.

public static bool IsLocalDevelopment(this IHostEnvironment environment)

Parameters

environment IHostEnvironment

The Microsoft.Extensions.Hosting.IHostingEnvironment to extend.

Returns

Boolean

true if environment is LocalDevelopment; otherwise false

IsNonProduction(IHostEnvironment)

Determines whether the specified environment is different from Production.

public static bool IsNonProduction(this IHostEnvironment environment)

Parameters

environment IHostEnvironment

The Microsoft.Extensions.Hosting.IHostingEnvironment to extend.

Returns

Boolean

true if environment is not Production; otherwise false