IRazorPage Interface

Represents properties and methods that are used by Microsoft.AspNetCore.Mvc.Razor.RazorView for execution.

Namespace
Microsoft.AspNetCore.Mvc.Razor
Assemblies
  • Microsoft.AspNetCore.Mvc.Razor

Syntax

public interface IRazorPage
interface Microsoft.AspNetCore.Mvc.Razor.IRazorPage

Properties

Microsoft.AspNetCore.Mvc.Razor.IRazorPage.BodyContent

Gets or sets the body content.

Return type:Microsoft.AspNetCore.Html.IHtmlContent
IHtmlContent BodyContent { get; set; }
Microsoft.AspNetCore.Mvc.Razor.IRazorPage.IsLayoutBeingRendered

Gets or sets a flag that determines if the layout of this page is being rendered.

Return type:System.Boolean
bool IsLayoutBeingRendered { get; set; }
Microsoft.AspNetCore.Mvc.Razor.IRazorPage.Layout

Gets or sets the path of a layout page.

Return type:System.String
string Layout { get; set; }
Microsoft.AspNetCore.Mvc.Razor.IRazorPage.Path

Gets the application base relative path to the page.

Return type:System.String
string Path { get; set; }
Microsoft.AspNetCore.Mvc.Razor.IRazorPage.PreviousSectionWriters

Gets or sets the sections that can be rendered by this page.

Return type:System.Collections.Generic.IDictionary<System.String>
IDictionary<string, RenderAsyncDelegate> PreviousSectionWriters { get; set; }
Microsoft.AspNetCore.Mvc.Razor.IRazorPage.SectionWriters

Gets the sections that are defined by this page.

Return type:System.Collections.Generic.IDictionary<System.String>
IDictionary<string, RenderAsyncDelegate> SectionWriters { get; }
Microsoft.AspNetCore.Mvc.Razor.IRazorPage.ViewContext

Gets or sets the view context of the renderign view.

Return type:Microsoft.AspNetCore.Mvc.Rendering.ViewContext
ViewContext ViewContext { get; set; }

Methods

EnsureRenderedBodyOrSections()

Verifies that all sections defined in Microsoft.AspNetCore.Mvc.Razor.IRazorPage.PreviousSectionWriters were rendered, or the body was rendered if no sections were defined.

void EnsureRenderedBodyOrSections()
ExecuteAsync()

Renders the page and writes the output to the Microsoft.AspNetCore.Mvc.Rendering.ViewContext.Writer.

Return type:System.Threading.Tasks.Task
Returns:A task representing the result of executing the page.
Task ExecuteAsync()