Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

HostEnvironment.IsEnvironment

Method
📦 Aspire.Hosting v17.0.0
type HostEnvironment interface {
// ... omitted for brevity
IsEnvironment(environmentName string) (bool, error)
}

Signature

methodIsEnvironment
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).

Defined on

This method is defined on the following type: