IRazorViewEngine Interface¶
An Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine
used to render pages that use the Razor syntax.
- Namespace
Microsoft.AspNetCore.Mvc.Razor
- Assemblies
- Microsoft.AspNetCore.Mvc.Razor
Syntax¶
public interface IRazorViewEngine : IViewEngine
-
interface
Microsoft.AspNetCore.Mvc.Razor.
IRazorViewEngine
Methods¶
-
FindPage
(Microsoft.AspNetCore.Mvc.ActionContext, System.String)¶ Finds the page with the given <em>pageName</em> using view locations and information from the <em>context</em>.
Arguments: - context (Microsoft.AspNetCore.Mvc.ActionContext) – The
Microsoft.AspNetCore.Mvc.ActionContext
. - pageName (System.String) – The name of the page.
Return type: Returns: The
Microsoft.AspNetCore.Mvc.Razor.RazorPageResult
of locating the page.RazorPageResult FindPage(ActionContext context, string pageName)
- context (Microsoft.AspNetCore.Mvc.ActionContext) – The
-
GetAbsolutePath
(System.String, System.String)¶ Converts the given <em>pagePath</em> to be absolute, relative to <em>executingFilePath</em> unless <em>pagePath</em> is already absolute.
Arguments: - executingFilePath (System.String) – The absolute path to the currently-executing page, if any.
- pagePath (System.String) – The path to the page.
Return type: System.String
Returns: The combination of <em>executingFilePath</em> and <em>pagePath</em> if <em>pagePath</em> is a relative path. The <em>pagePath</em> value (unchanged) otherwise.
string GetAbsolutePath(string executingFilePath, string pagePath)
-
GetPage
(System.String, System.String)¶ Gets the page with the given <em>pagePath</em>, relative to <em>executingFilePath</em> unless <em>pagePath</em> is already absolute.
Arguments: - executingFilePath (System.String) – The absolute path to the currently-executing page, if any.
- pagePath (System.String) – The path to the page.
Return type: Returns: The
Microsoft.AspNetCore.Mvc.Razor.RazorPageResult
of locating the page.RazorPageResult GetPage(string executingFilePath, string pagePath)
-