Udostępnij za pośrednictwem


DefaultChunkTreeCache.GetOrAdd Metoda

Definicja

Pobierz istniejący ChunkTreeelement lub utwórz i dodaj nowy, jeśli nie jest dostępny w pamięci podręcznej lub wygasł.

public:
 virtual Microsoft::AspNetCore::Razor::Chunks::ChunkTree ^ GetOrAdd(System::String ^ pagePath, Func<Microsoft::Extensions::FileProviders::IFileInfo ^, Microsoft::AspNetCore::Razor::Chunks::ChunkTree ^> ^ getChunkTree);
public Microsoft.AspNetCore.Razor.Chunks.ChunkTree GetOrAdd (string pagePath, Func<Microsoft.Extensions.FileProviders.IFileInfo,Microsoft.AspNetCore.Razor.Chunks.ChunkTree> getChunkTree);
abstract member GetOrAdd : string * Func<Microsoft.Extensions.FileProviders.IFileInfo, Microsoft.AspNetCore.Razor.Chunks.ChunkTree> -> Microsoft.AspNetCore.Razor.Chunks.ChunkTree
override this.GetOrAdd : string * Func<Microsoft.Extensions.FileProviders.IFileInfo, Microsoft.AspNetCore.Razor.Chunks.ChunkTree> -> Microsoft.AspNetCore.Razor.Chunks.ChunkTree
Public Function GetOrAdd (pagePath As String, getChunkTree As Func(Of IFileInfo, ChunkTree)) As ChunkTree

Parametry

pagePath
String

Ścieżka względna aplikacji na stronie Razor.

getChunkTree
Func<IFileInfo,ChunkTree>

Delegat, który tworzy nowy ChunkTreeelement .

Zwraca

Jeśli ChunkTree plik istnieje w lokalizacji pagePath, null w przeciwnym razie.

Implementuje

Dotyczy