Skip to content
Docs Try Aspire

EndpointReference Methods

Class Methods 3 members
Represents an endpoint reference for a resource with endpoints.
GetValueAsync(CancellationToken) Section titled GetValueAsync(CancellationToken) ValueTask<string?>
Gets the URL of the endpoint asynchronously. Waits for the endpoint to be allocated if necessary.
public sealed class EndpointReference
{
public ValueTask<string?> GetValueAsync(
CancellationToken cancellationToken = default(CancellationToken))
{
// ...
}
}
cancellationToken CancellationToken optional The cancellation token.
ValueTask<string?> The URL of the endpoint.
GetValueAsync(ValueProviderContext, CancellationToken) Section titled GetValueAsync(ValueProviderContext, CancellationToken) ValueTask<string?>
Gets the URL of the endpoint asynchronously. Waits for the endpoint to be allocated if necessary.
public sealed class EndpointReference
{
public ValueTask<string?> GetValueAsync(
ValueProviderContext context,
CancellationToken cancellationToken = default(CancellationToken))
{
// ...
}
}
context ValueProviderContext The context for value resolution.
cancellationToken CancellationToken optional The cancellation token.
ValueTask<string?> The URL of the endpoint.
Gets the specified property expression of the endpoint. Defaults to the URL if no property is specified.
public sealed class EndpointReference
{
public EndpointReferenceExpression Property(
EndpointProperty property)
{
// ...
}
}
property EndpointProperty The EndpointProperty enum value to use in the reference.