ILoadContextualOptions<TOptions>.LoadAsync<TContext> 方法

定义

获取要配置 实例的数据 TOptions

public:
generic <typename TContext>
 where TContext : Microsoft::Extensions::Options::Contextual::IOptionsContext System::Threading::Tasks::ValueTask<Microsoft::Extensions::Options::Contextual::Provider::IConfigureContextualOptions<TOptions> ^> LoadAsync(System::String ^ name, TContext& ^ context, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.ValueTask<Microsoft.Extensions.Options.Contextual.Provider.IConfigureContextualOptions<TOptions>> LoadAsync<TContext> (string name, in TContext context, System.Threading.CancellationToken cancellationToken) where TContext : Microsoft.Extensions.Options.Contextual.IOptionsContext;
abstract member LoadAsync : string * 'Context * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.Extensions.Options.Contextual.Provider.IConfigureContextualOptions<'Options>> (requires 'Context :> Microsoft.Extensions.Options.Contextual.IOptionsContext)
Public Function LoadAsync(Of TContext As IOptionsContext) (name As String, context As TContext, cancellationToken As CancellationToken) As ValueTask(Of IConfigureContextualOptions(Of TOptions))

类型参数

TContext

定义此请求的上下文的类型。

参数

name
String

要配置的选项的名称。

context
TContext

将用于配置选项的上下文。

cancellationToken
CancellationToken

要监视取消请求的标记。

返回

用于配置 实例的对象 TOptions

适用于