Taal

OptionsCache<TOptions>.GetOrAdd(String, Func<TOptions>) Methode

Definitie

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

public:
 virtual TOptions GetOrAdd(System::String ^ name, Func<TOptions> ^ createOptions);
public virtual TOptions GetOrAdd(string? name, Func<TOptions> createOptions);
abstract member GetOrAdd : string * Func<'Options (requires 'Options : null)> -> 'Options
override this.GetOrAdd : string * Func<'Options (requires 'Options : null)> -> 'Options
Public Overridable 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 functie die wordt gebruikt om het nieuwe exemplaar te maken.

Retouren

TOptions

Het exemplaar van de opties.

Implementeringen

Van toepassing op