IComponentPrerenderer.PrerenderComponentAsync 方法

定义

将 Razor 组件预呈现为 HTML。

public System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Html.IHtmlAsyncContent> PrerenderComponentAsync (Microsoft.AspNetCore.Http.HttpContext httpContext, Type componentType, Microsoft.AspNetCore.Components.IComponentRenderMode renderMode, Microsoft.AspNetCore.Components.ParameterView parameters);
abstract member PrerenderComponentAsync : Microsoft.AspNetCore.Http.HttpContext * Type * Microsoft.AspNetCore.Components.IComponentRenderMode * Microsoft.AspNetCore.Components.ParameterView -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Html.IHtmlAsyncContent>
Public Function PrerenderComponentAsync (httpContext As HttpContext, componentType As Type, renderMode As IComponentRenderMode, parameters As ParameterView) As ValueTask(Of IHtmlAsyncContent)

参数

httpContext
HttpContext

HttpContext

componentType
Type

要预呈现的组件的类型。 这必须实现 IComponent

renderMode
IComponentRenderMode

预呈现组件的模式。

parameters
ParameterView

组件的参数。

返回

使用预呈现内容完成的任务。

适用于