Delen via


RazorViewEngine Class

Definition

Default implementation of IRazorViewEngine.

public ref class RazorViewEngine : Microsoft::AspNetCore::Mvc::Razor::IRazorViewEngine, Microsoft::AspNetCore::Mvc::ViewEngines::IViewEngine
public class RazorViewEngine : Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine, Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine
type RazorViewEngine = class
    interface IRazorViewEngine
    interface IViewEngine
Public Class RazorViewEngine
Implements IRazorViewEngine, IViewEngine
Inheritance
RazorViewEngine
Implements

Remarks

For ViewResults returned from controllers, views should be located in ViewLocationFormats by default. For the controllers in an area, views should exist in AreaViewLocationFormats.

Constructors

RazorViewEngine(IRazorPageFactoryProvider, IRazorPageActivator, HtmlEncoder, IOptions<RazorViewEngineOptions>, ILoggerFactory, DiagnosticListener)

Initializes a new instance of the RazorViewEngine.

RazorViewEngine(IRazorPageFactoryProvider, IRazorPageActivator, HtmlEncoder, IOptions<RazorViewEngineOptions>, ILoggerFactory)

Initializes a new instance of the RazorViewEngine.

RazorViewEngine(IRazorPageFactoryProvider, IRazorPageActivator, HtmlEncoder, IOptions<RazorViewEngineOptions>, RazorProject, ILoggerFactory, DiagnosticSource)
Obsolete.

Initializes a new instance of the RazorViewEngine.

RazorViewEngine(IRazorPageFactoryProvider, IRazorPageActivator, HtmlEncoder, IOptions<RazorViewEngineOptions>, RazorProjectFileSystem, ILoggerFactory, DiagnosticSource)

Initializes a new instance of the RazorViewEngine

Fields

ViewExtension

The view extension

Properties

ViewLookupCache

A cache for results of view lookups.

Methods

FindPage(ActionContext, String)

Finds the page with the given pageName using view locations and information from the context.

FindView(ActionContext, String, Boolean)

Finds the view with the given viewName using view locations and information from the context.

GetAbsolutePath(String, String)

Converts the given pagePath to be absolute, relative to executingFilePath unless pagePath is already absolute.

GetNormalizedRouteValue(ActionContext, String)

Gets the case-normalized route value for the specified route key.

GetPage(String, String)

Gets the page with the given pagePath, relative to executingFilePath unless pagePath is already absolute.

GetView(String, String, Boolean)

Gets the view with the given viewPath, relative to executingFilePath unless viewPath is already absolute.

Applies to