CompilerCacheEntry Class

Summary

An entry in [Microsoft.AspNet.Mvc.Razor.Compilation.ICompilerCache](Microsoft.AspNet.Mvc.Razor.Compilation.ICompilerCache.yml) that contain metadata about precompiled and dynamically compiled file.

Syntax

public class CompilerCacheEntry

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCacheEntry

Constructors

CompilerCacheEntry(Microsoft.AspNet.Mvc.Razor.Compilation.RelativeFileInfo, System.Type)

Initializes a new instance of [Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCacheEntry](Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCacheEntry.yml) for a file that was dynamically compiled.

Arguments:
public CompilerCacheEntry(RelativeFileInfo info, Type compiledType)
CompilerCacheEntry(Microsoft.AspNet.Mvc.Razor.Precompilation.RazorFileInfo, System.Type)

Initializes a new instance of [Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCacheEntry](Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCacheEntry.yml) for a file that was precompiled.

Arguments:
public CompilerCacheEntry(RazorFileInfo info, Type compiledType)

Properties

AssociatedGlobalFileEntry()

Gets or sets the [Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCacheEntry](Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCacheEntry.yml) for the nearest _ViewImports that the compiled type depends on.

Return type:Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCacheEntry
public CompilerCacheEntry AssociatedGlobalFileEntry { get; set; }
CompiledType()

Gets the [System.Type]() produced as a result of compilation.

Return type:System.Type
public Type CompiledType { get; }
Hash()

Gets the file hash, should only be available for pre compiled files.

Return type:System.String
public string Hash { get; }
HashAlgorithmVersion()

Gets the version of the hash algorithm used to generate [Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCacheEntry.Hash](Microsoft.AspNet.Mvc.Razor.Compilation.CompilerCacheEntry.yml).

Return type:System.Int32
public int HashAlgorithmVersion { get; }
IsPreCompiled()

Gets a flag that indicates if the file is precompiled.

Return type:System.Boolean
public bool IsPreCompiled { get; }
IsValidatedPreCompiled()

Gets or sets a flag that determines if the validity of this cache entry was performed at runtime.

Return type:System.Boolean
public bool IsValidatedPreCompiled { get; set; }
LastModified()

Gets or sets the last modified [System.DateTimeOffset]() for the file at the time of compilation.

Return type:System.DateTimeOffset
public DateTimeOffset LastModified { get; set; }
Length()

Gets the size of file (in bytes) on disk.

Return type:System.Int64
public long Length { get; }
RelativePath()

Gets the path of the compiled file relative to the root of the application.

Return type:System.String
public string RelativePath { get; }