RazorView Class¶
Default implementation for Microsoft.AspNetCore.Mvc.ViewEngines.IView
that executes one or more Microsoft.AspNetCore.Mvc.Razor.IRazorPage
as parts of its execution.
- Namespace
Microsoft.AspNetCore.Mvc.Razor
- Assemblies
- Microsoft.AspNetCore.Mvc.Razor
Constructors¶
-
RazorView
(Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine, Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator, System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Mvc.Razor.IRazorPage>, Microsoft.AspNetCore.Mvc.Razor.IRazorPage, System.Text.Encodings.Web.HtmlEncoder)¶ Initializes a new instance of
Microsoft.AspNetCore.Mvc.Razor.RazorView
Arguments: - viewEngine (Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine) – The
Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine
used to locate Layout pages. - pageActivator (Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator) – The
Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator
used to activate pages. - viewStartPages (System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Mvc.Razor.IRazorPage>) – The sequence of
Microsoft.AspNetCore.Mvc.Razor.IRazorPage
instances executed as _ViewStarts. - razorPage (Microsoft.AspNetCore.Mvc.Razor.IRazorPage) – The
Microsoft.AspNetCore.Mvc.Razor.IRazorPage
instance to execute. - htmlEncoder (System.Text.Encodings.Web.HtmlEncoder) – The HTML encoder.
public RazorView(IRazorViewEngine viewEngine, IRazorPageActivator pageActivator, IReadOnlyList<IRazorPage> viewStartPages, IRazorPage razorPage, HtmlEncoder htmlEncoder)
- viewEngine (Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine) – The
-
Properties¶
-
Microsoft.AspNetCore.Mvc.Razor.RazorView.
Path
¶ Return type: System.String public string Path { get; }
-
Microsoft.AspNetCore.Mvc.Razor.RazorView.
RazorPage
¶ Gets
Microsoft.AspNetCore.Mvc.Razor.IRazorPage
instance that the views executes on.Return type: Microsoft.AspNetCore.Mvc.Razor.IRazorPage public IRazorPage RazorPage { get; }
-
Microsoft.AspNetCore.Mvc.Razor.RazorView.
ViewStartPages
¶ Gets the sequence of _ViewStart
Microsoft.AspNetCore.Mvc.Razor.IRazorPage
instances that are executed by this view.Return type: System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Mvc.Razor.IRazorPage> public IReadOnlyList<IRazorPage> ViewStartPages { get; }
-