# EndpointReferenceAnnotation Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [EndpointReferenceAnnotation](/reference/api/csharp/aspire.hosting/endpointreferenceannotation.md)
- Kind: `Properties`
- Members: `4`

An annotation that represents a reference from one resource to the endpoints of another resource.

## ContextNetworkID

- Name: `ContextNetworkID`
- Modifiers: `get; set`
- Returns: [NetworkIdentifier](/reference/api/csharp/aspire.hosting/networkidentifier.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/ApplicationModel/EndpointReferenceAnnotation.cs)

Gets or sets the network identifier used as context for resolving endpoint addresses.

```csharp
public NetworkIdentifier ContextNetworkID { get; set; }
```

## EndpointNames

- Name: `EndpointNames`
- Modifiers: `get`
- Returns: `HashSet<string>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/ApplicationModel/EndpointReferenceAnnotation.cs#L27)

Gets the set of specific endpoint names that are referenced. When [EndpointReferenceAnnotation.UseAllEndpoints](/reference/api/csharp/aspire.hosting/endpointreferenceannotation/properties.md#useallendpoints) is `true`, this set is ignored.

```csharp
public HashSet<string> EndpointNames { get; }
```

## Resource

- Name: `Resource`
- Modifiers: `get`
- Returns: [IResourceWithEndpoints](/reference/api/csharp/aspire.hosting/iresourcewithendpoints.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/ApplicationModel/EndpointReferenceAnnotation.cs#L17)

Gets the resource whose endpoints are being referenced.

```csharp
public IResourceWithEndpoints Resource { get; }
```

## UseAllEndpoints

- Name: `UseAllEndpoints`
- Modifiers: `get; set`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/ApplicationModel/EndpointReferenceAnnotation.cs)

Gets or sets a value indicating whether all endpoints on the referenced resource are included.

```csharp
public bool UseAllEndpoints { get; set; }
```
