# EndpointReferenceAnnotation Constructors

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

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

## EndpointReferenceAnnotation(IResourceWithEndpoints)

- Name: `Constructor(IResourceWithEndpoints)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/ApplicationModel/EndpointReferenceAnnotation.cs#L12-L32)

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

```csharp
public sealed class EndpointReferenceAnnotation
{
    public EndpointReferenceAnnotation(
        IResourceWithEndpoints resource)
    {
        // ...
    }
}
```

## Parameters

- `resource` ([IResourceWithEndpoints](/reference/api/csharp/aspire.hosting/iresourcewithendpoints.md))
