Udostępnij za pośrednictwem


IChunkTreeCache.GetOrAdd(String, Func<IFileInfo,ChunkTree>) 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:
 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
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 tworzący nowy ChunkTreeelement .

Zwraca

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

Uwagi

ChunkTree Wynikowy element nie zawiera odziedziczonych fragmentów z _ViewStart lub domyślnych odziedziczonych fragmentów.

Dotyczy