INamedContextualOptions<TOptions,TContext>.GetAsync Method

Definition

Gets the named configured TOptions instance.

C#
public System.Threading.Tasks.ValueTask<TOptions> GetAsync(string name, in TContext context, System.Threading.CancellationToken cancellationToken);

Parameters

name
String

The name of the options to get.

context
TContext

The context that will be used to create the options.

cancellationToken
CancellationToken

The token to monitor for cancellation requests.

Returns

ValueTask<TOptions>

A configured instance of TOptions.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)