Taal

IOptionsMonitorCache<TOptions>.GetOrAdd Methode

Definitie

Hiermee haalt u een exemplaar met benoemde opties op of voegt u een nieuw exemplaar toe dat is gemaakt met createOptions.

public:
 TOptions GetOrAdd(System::String ^ name, Func<TOptions> ^ createOptions);
public TOptions GetOrAdd(string? name, Func<TOptions> createOptions);
abstract member GetOrAdd : string * Func<'Options (requires 'Options : null)> -> 'Options
Public Function GetOrAdd (name As String, createOptions As Func(Of TOptions)) As TOptions

Parameters

name
String

De naam van het exemplaar van de opties.

createOptions
Func<TOptions>

De func die wordt gebruikt om het nieuwe exemplaar te maken.

Retouren

TOptions

Het exemplaar van de opties.

Van toepassing op