# RadiusEnvironmentResource Methods

- Package: [Aspire.Hosting.Radius](/reference/api/csharp/aspire.hosting.radius.md)
- Type: [RadiusEnvironmentResource](/reference/api/csharp/aspire.hosting.radius/radiusenvironmentresource.md)
- Kind: `Methods`
- Members: `1`

Represents a Radius compute environment in the Aspire app model.

<a id="gethostaddressexpression"></a>
<a id="gethostaddressexpression-endpointreference"></a>

## GetHostAddressExpression(EndpointReference)

> **Experimental:** ASPIRECOMPUTE002 - [Learn more](/diagnostics/aspirecompute002/)

- Name: `GetHostAddressExpression(EndpointReference)`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/b5f143315ffb6968ea939a9978797a5b20e4c688/src/Aspire.Hosting.Radius/RadiusEnvironmentResource.cs#L97-L119)

Gets a `ApplicationModel.ReferenceExpression` representing the host address or host name for the specified `ApplicationModel.EndpointReference`.

```csharp
public sealed class RadiusEnvironmentResource
{
    public ReferenceExpression GetHostAddressExpression(
        EndpointReference endpointReference)
    {
        // ...
    }
}
```

## Parameters

- `endpointReference` (`EndpointReference`)
  The endpoint reference for which to retrieve the host address or host name.

## Returns

`ReferenceExpression` -- A `ApplicationModel.ReferenceExpression` representing the host address or host name (not a full URL).

## Remarks

The returned value typically contains only the host name or address, without scheme, port, or path information.
