# EndpointReferenceExpression

- Kind: `class`
- 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/EndpointReference.cs)
- Implements: [IExpressionValue](/reference/api/csharp/aspire.hosting/iexpressionvalue.md), [IManifestExpressionProvider](/reference/api/csharp/aspire.hosting/imanifestexpressionprovider.md), [IValueProvider](/reference/api/csharp/aspire.hosting/ivalueprovider.md), [IValueWithReferences](/reference/api/csharp/aspire.hosting/ivaluewithreferences.md)

Represents a property expression for an endpoint reference.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public class EndpointReferenceExpression
    : Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting/EndpointReferenceExpression`
- Public instance properties are exported as ATS capabilities.

## Constructors

- [EndpointReferenceExpression(EndpointReference, EndpointProperty)](/reference/api/csharp/aspire.hosting/endpointreferenceexpression/constructors.md#constructor-endpointreference-endpointproperty) -- Represents a property expression for an endpoint reference.

## Properties

- [Endpoint](/reference/api/csharp/aspire.hosting/endpointreferenceexpression/properties.md#endpoint) : [EndpointReference](/reference/api/csharp/aspire.hosting/endpointreference.md) `get` -- Gets the [EndpointReference](/reference/api/csharp/aspire.hosting/endpointreference.md).
- [Property](/reference/api/csharp/aspire.hosting/endpointreferenceexpression/properties.md#property) : [EndpointProperty](/reference/api/csharp/aspire.hosting/endpointproperty.md) `get` -- Gets the [EndpointProperty](/reference/api/csharp/aspire.hosting/endpointproperty.md) for the property expression.
- [ValueExpression](/reference/api/csharp/aspire.hosting/endpointreferenceexpression/properties.md#valueexpression) : `string` `get` -- Gets the expression of the property of the endpoint.

## Methods

- [GetValueAsync(CancellationToken)](/reference/api/csharp/aspire.hosting/endpointreferenceexpression/methods.md#getvalueasync-cancellationtoken) : `ValueTask<string?>` -- Gets the value of the property of the endpoint.
- [GetValueAsync(ValueProviderContext, CancellationToken)](/reference/api/csharp/aspire.hosting/endpointreferenceexpression/methods.md#getvalueasync-valueprovidercontext-cancellationtoken) : `ValueTask<string?>` -- Gets the value of the property of the endpoint.
