# ReferenceEnvironmentInjectionFlags

- Kind: `enum`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ReferenceEnvironmentInjectionFlags.cs)

Specifies which connection or endpoint information should be injected into environment variables when `WithReference()` is invoked.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public enum ReferenceEnvironmentInjectionFlags
```

## Enum Members

Values can be combined with bitwise OR.
| Name | Value | Description |
| --- | --- | --- |
| 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}__{endpointScheme}__{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. |
