Sdílet prostřednictvím


ResourceNamesCache.GetOrAdd Metoda

Definice

Přidá sadu názvů prostředků do mezipaměti pomocí zadané funkce, pokud název ještě neexistuje.

public:
 virtual System::Collections::Generic::IList<System::String ^> ^ GetOrAdd(System::String ^ name, Func<System::String ^, System::Collections::Generic::IList<System::String ^> ^> ^ valueFactory);
public System.Collections.Generic.IList<string>? GetOrAdd(string name, Func<string,System.Collections.Generic.IList<string>?> valueFactory);
abstract member GetOrAdd : string * Func<string, System.Collections.Generic.IList<string>> -> System.Collections.Generic.IList<string>
override this.GetOrAdd : string * Func<string, System.Collections.Generic.IList<string>> -> System.Collections.Generic.IList<string>
Public Function GetOrAdd (name As String, valueFactory As Func(Of String, IList(Of String))) As IList(Of String)

Parametry

name
String

Název prostředku, pro který se mají přidat názvy řetězců.

valueFactory
Func<String,IList<String>>

Funkce, která slouží k vygenerování názvů řetězců pro prostředek.

Návraty

Seznam obsahující názvy řetězců pro prostředek.

Implementuje

Platí pro