DefaultChunkTreeCache.GetOrAdd Method

Definition

Get an existing ChunkTree, or create and add a new one if it is not available in the cache or is expired.

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

Parameters

pagePath
String

The application relative path of the Razor page.

getChunkTree
Func<IFileInfo,ChunkTree>

A delegate that creates a new ChunkTree.

Returns

The ChunkTree if a file exists at pagePath, null otherwise.

Implements

Applies to