RazorViewEngineOptions Class

Definition

Provides programmatic configuration for the RazorViewEngine.

public ref class RazorViewEngineOptions
public class RazorViewEngineOptions
type RazorViewEngineOptions = class
Public Class RazorViewEngineOptions
Inheritance
RazorViewEngineOptions

Constructors

RazorViewEngineOptions()

Properties

AdditionalCompilationReferences

Gets the MetadataReference instances that should be included in Razor compilation, along with those discovered by MetadataReferenceFeatureProviders.

AllowRecompilingViewsOnFileChange

Gets or sets a value that determines if Razor files (Razor Views and Razor Pages) are recompiled and updated if files change on disk.

When true, MVC will use Microsoft.Extensions.FileProviders.IFileProvider.Watch(String) to watch for changes to Razor files in configured Microsoft.Extensions.FileProviders.IFileProvider instances.

AreaPageViewLocationFormats

Gets the locations where RazorViewEngine will search for views (such as layouts and partials) when searched from the context of rendering a Razor Page within an area.

AreaViewLocationFormats

Gets the locations where RazorViewEngine will search for views within an area.

CompilationCallback

Gets or sets the callback that is used to customize Razor compilation to change compilation settings you can update Compilation property.

CompilationOptions

Gets or sets the CSharpCompilationOptions used by Razor view compilation.

FileProviders

Gets the sequence of Microsoft.Extensions.FileProviders.IFileProvider instances used by RazorViewEngine to locate Razor files.

PageViewLocationFormats

Gets the locations where RazorViewEngine will search for views (such as layouts and partials) when searched from the context of rendering a Razor Page.

ParseOptions

Gets or sets the CSharpParseOptions options used by Razor view compilation.

ViewLocationExpanders

Gets a IList<T> used by the RazorViewEngine.

ViewLocationFormats

Gets the locations where RazorViewEngine will search for views.

Explicit Interface Implementations

IEnumerable.GetEnumerator()
IEnumerable<ICompatibilitySwitch>.GetEnumerator()

Applies to