Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

HostEnvironment

Interface
📦 Aspire.Hosting v17.0.0
type HostEnvironment interface{}

Methods

Checks if the environment is Development.
IsDevelopment() (bool, error)
(bool, error)

True if running in Development environment.

Returns (bool, error).

Checks if the environment matches the specified name.
IsEnvironment(environmentName string) (bool, error)
environmentNamestringThe environment name to compare against.
(bool, error)

True if the environment matches the specified name.

Returns (bool, error).

Checks if the environment is Production.
IsProduction() (bool, error)
(bool, error)

True if running in Production environment.

Returns (bool, error).

methodIsStaging
Checks if the environment is Staging.
IsStaging() (bool, error)
(bool, error)

True if running in Staging environment.

Returns (bool, error).

Applies to

This interface applies to the following types: