INamedContextualOptions<TOptions,TContext>.GetAsync 方法

定义

获取已命名配置的 TOptions 实例。

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

参数

name
String

要获取的选项的名称。

context
TContext

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

cancellationToken
CancellationToken

要监视取消请求的标记。

返回

ValueTask<TOptions>

的已配置实例 TOptions

适用于