EndpointReference.GetValueAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| GetValueAsync(CancellationToken) |
Gets the URL of the endpoint asynchronously. Waits for the endpoint to be allocated if necessary. |
| GetValueAsync(ValueProviderContext, CancellationToken) |
Gets the URL of the endpoint asynchronously. Waits for the endpoint to be allocated if necessary. |
GetValueAsync(CancellationToken)
- Source:
- EndpointReference.cs
Gets the URL of the endpoint asynchronously. Waits for the endpoint to be allocated if necessary.
public System.Threading.Tasks.ValueTask<string?> GetValueAsync(System.Threading.CancellationToken cancellationToken = default);
abstract member GetValueAsync : System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<string>
override this.GetValueAsync : System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<string>
Public Function GetValueAsync (Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of String)
Parameters
- cancellationToken
- CancellationToken
The cancellation token.
Returns
The URL of the endpoint.
Implements
Applies to
GetValueAsync(ValueProviderContext, CancellationToken)
- Source:
- EndpointReference.cs
Gets the URL of the endpoint asynchronously. Waits for the endpoint to be allocated if necessary.
public System.Threading.Tasks.ValueTask<string?> GetValueAsync(Aspire.Hosting.ApplicationModel.ValueProviderContext context, System.Threading.CancellationToken cancellationToken = default);
abstract member GetValueAsync : Aspire.Hosting.ApplicationModel.ValueProviderContext * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<string>
override this.GetValueAsync : Aspire.Hosting.ApplicationModel.ValueProviderContext * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<string>
Public Function GetValueAsync (context As ValueProviderContext, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of String)
Parameters
- context
- ValueProviderContext
The context for value resolution.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
The URL of the endpoint.