ILoadContextualOptions<TOptions>.LoadAsync<TContext> Methode

Definition

Ruft die Daten ab, um eine Instanz von 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))

Typparameter

TContext

Ein Typ, der den Kontext für diese Anforderung definiert.

Parameter

name
String

Der Name der zu konfigurierenden Optionen.

context
TContext

Der Kontext, der zum Konfigurieren der Optionen verwendet wird.

cancellationToken
CancellationToken

Das Token, das auf Abbruchanforderungen überwacht werden soll.

Gibt zurück

Ein Objekt zum Konfigurieren einer Instanz von TOptions.

Gilt für: