PrecompilationCacheEntry Class¶
Summary¶
An entry in the cache used by [Microsoft.AspNet.Mvc.Razor.Precompilation.RazorPreCompiler](Microsoft.AspNet.Mvc.Razor.Precompilation.RazorPreCompiler.yml).
Constructors¶
-
PrecompilationCacheEntry
(Microsoft.AspNet.Mvc.Razor.Precompilation.RazorFileInfo, SyntaxTree)¶ Initializes a new instance of [Microsoft.AspNet.Mvc.Razor.Precompilation.PrecompilationCacheEntry](Microsoft.AspNet.Mvc.Razor.Precompilation.PrecompilationCacheEntry.yml) for a successful parse.
Arguments: - fileInfo (Microsoft.AspNet.Mvc.Razor.Precompilation.RazorFileInfo) – The [Microsoft.AspNet.Mvc.Razor.Precompilation.RazorFileInfo](Microsoft.AspNet.Mvc.Razor.Precompilation.RazorFileInfo.yml) of the file being cached.
- syntaxTree (SyntaxTree) – The @!:CodeAnalysis.SyntaxTree- to cache.
public PrecompilationCacheEntry(RazorFileInfo fileInfo, SyntaxTree syntaxTree)
-
PrecompilationCacheEntry
(System.Collections.Generic.IReadOnlyList<Diagnostic>) Initializes a new instance of [Microsoft.AspNet.Mvc.Razor.Precompilation.PrecompilationCacheEntry](Microsoft.AspNet.Mvc.Razor.Precompilation.PrecompilationCacheEntry.yml) for a failed parse.
Arguments: - diagnostics (System.Collections.Generic.IReadOnlyList{Diagnostic}) – The [System.Collections.Generic.IReadOnlyList`1]() produced from parsing the Razor file. This does not contain @!:Diagnostic-s produced from compiling the parsed @!:CodeAnalysis.SyntaxTree-.
public PrecompilationCacheEntry(IReadOnlyList<Diagnostic> diagnostics)
-
Properties¶
-
Diagnostics
()¶ Gets the @!:Diagnostic-s produced from parsing the generated contents of the file specified by [Microsoft.AspNet.Mvc.Razor.Precompilation.PrecompilationCacheEntry.FileInfo](Microsoft.AspNet.Mvc.Razor.Precompilation.PrecompilationCacheEntry.yml). This does not contain @!:Diagnostic-s produced from compiling the parsed @!:CodeAnalysis.SyntaxTree-.
Return type: System.Collections.Generic.IReadOnlyList{Diagnostic} public IReadOnlyList<Diagnostic> Diagnostics { get; }
-
FileInfo
()¶ Gets the [Microsoft.AspNet.Mvc.Razor.Precompilation.RazorFileInfo](Microsoft.AspNet.Mvc.Razor.Precompilation.RazorFileInfo.yml) associated with this cache entry instance.
Return type: Microsoft.AspNet.Mvc.Razor.Precompilation.RazorFileInfo public RazorFileInfo FileInfo { get; }
-
Success
()¶ Gets a value that indicates if parsing was successful.
Return type: System.Boolean public bool Success { get; }
-
SyntaxTree
()¶ Gets the [Microsoft.AspNet.Mvc.Razor.Precompilation.PrecompilationCacheEntry.SyntaxTree](Microsoft.AspNet.Mvc.Razor.Precompilation.PrecompilationCacheEntry.yml) produced from parsing the Razor file.
Return type: SyntaxTree public SyntaxTree SyntaxTree { get; }
-