ILoadContextualOptions<TOptions>.LoadAsync<TContext> Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ruft die Daten ab, um eine instance von TOptions
zu konfigurieren.
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 zum Überwachen von Abbruchanforderungen.
Gibt zurück
Ein Objekt zum Konfigurieren einer instance von TOptions
.