IContextualOptions<TOptions,TContext>.GetAsync 方法

定义

获取配置的 TOptions 实例。

public:
 System::Threading::Tasks::ValueTask<TOptions> GetAsync(TContext& ^ context, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.ValueTask<TOptions> GetAsync (in TContext context, System.Threading.CancellationToken cancellationToken);
abstract member GetAsync : 'Context * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'Options (requires 'Options : null)>
Public Function GetAsync (context As TContext, cancellationToken As CancellationToken) As ValueTask(Of TOptions)

参数

context
TContext

将用于创建选项的上下文。

cancellationToken
CancellationToken

要监视取消请求的标记。

返回

ValueTask<TOptions>

的已配置实例 TOptions

适用于