Skip to content
Docs Try Aspire

ReferenceEnvironmentInjectionFlags

Enum net10.0
📦 Aspire.Hosting v13.1.2
Specifies which connection or endpoint information should be injected into environment variables when WithReference() is invoked.
namespace Aspire.Hosting.ApplicationModel;
public sealed enum ReferenceEnvironmentInjectionFlags
None = 0
No connection information will be injected.
ConnectionString = 1
The connection string will be injected as an environment variable.
ConnectionProperties = 2
Individual connection properties will be injected as environment variables.
ServiceDiscovery = 4
Each endpoint defined on the resource will be injected using the format "services__{resourceName}__{endpointName}__{endpointIndex}".
Endpoints = 8
Each endpoint defined on the resource will be injected using the format "{RESOURCENAME}_{ENDPOINTNAME}".
All = 15
Connection string, connection properties and service endpoints will be injected as environment variables.