Share via


IVariantServiceProvider<TService>.GetServiceAsync Method

Definition

Gets an implementation variant of TService.

public System.Threading.Tasks.ValueTask<TService> GetServiceAsync(System.Threading.CancellationToken cancellationToken);
abstract member GetServiceAsync : System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'Service (requires 'Service : null)>
Public Function GetServiceAsync (cancellationToken As CancellationToken) As ValueTask(Of TService)

Parameters

cancellationToken
CancellationToken

The cancellation token to cancel the operation.

Returns

ValueTask<TService>

An implementation of TService.

Applies to