Skip to content
DocsTry Aspire
DocsTry

ReferenceEnvironmentInjectionFlags

Enumnet8.0
📦 Aspire.Hosting v13.4.0
Specifies which connection or endpoint information should be injected into environment variables when WithReference() is invoked.
namespace Aspire.Hosting.ApplicationModel;
public enum ReferenceEnvironmentInjectionFlags

[Flags] Values can be combined with bitwise OR.

None= 0
No connection information will be injected.
ConnectionString= 10x1
The connection string will be injected as an environment variable.
ConnectionProperties= 20x2
Individual connection properties will be injected as environment variables.
ServiceDiscovery= 40x4
Each endpoint defined on the resource will be injected using the format "services__{resourceName}__{endpointScheme}__{endpointIndex}".
Endpoints= 80x8
Each endpoint defined on the resource will be injected using the format "{RESOURCENAME}_{ENDPOINTNAME}".
All= 150xF
Connection string, connection properties and service endpoints will be injected as environment variables.