TagHelperOutput.GetChildContentAsync 方法

定义

重载

GetChildContentAsync()

异步执行子级并返回其呈现的内容。

GetChildContentAsync(Boolean)

异步执行子级并返回其呈现的内容。

GetChildContentAsync(HtmlEncoder)

使用范围内给定 encoder 的 异步执行子级,并返回其呈现的内容。

GetChildContentAsync(Boolean, HtmlEncoder)

使用范围内给定 encoder 的 异步执行子级,并返回其呈现的内容。

GetChildContentAsync()

异步执行子级并返回其呈现的内容。

public:
 System::Threading::Tasks::Task<Microsoft::AspNetCore::Razor::TagHelpers::TagHelperContent ^> ^ GetChildContentAsync();
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent> GetChildContentAsync ();
member this.GetChildContentAsync : unit -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent>
Public Function GetChildContentAsync () As Task(Of TagHelperContent)

返回

完成 Task 时返回由子级呈现的内容的 。

注解

此方法已记录在一起。 多次调用不会导致子级使用页面的原始 HtmlEncoder重新执行。

适用于

GetChildContentAsync(Boolean)

异步执行子级并返回其呈现的内容。

public:
 System::Threading::Tasks::Task<Microsoft::AspNetCore::Razor::TagHelpers::TagHelperContent ^> ^ GetChildContentAsync(bool useCachedResult);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent> GetChildContentAsync (bool useCachedResult);
member this.GetChildContentAsync : bool -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent>
Public Function GetChildContentAsync (useCachedResult As Boolean) As Task(Of TagHelperContent)

参数

useCachedResult
Boolean

如果 true为 ,则多次调用不会导致子级使用页面的原始 HtmlEncoder重新执行;返回缓存的内容。

返回

完成 Task 时返回由子级呈现的内容的 。

适用于

GetChildContentAsync(HtmlEncoder)

使用范围内给定 encoder 的 异步执行子级,并返回其呈现的内容。

public:
 System::Threading::Tasks::Task<Microsoft::AspNetCore::Razor::TagHelpers::TagHelperContent ^> ^ GetChildContentAsync(System::Text::Encodings::Web::HtmlEncoder ^ encoder);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent> GetChildContentAsync (System.Text.Encodings.Web.HtmlEncoder encoder);
member this.GetChildContentAsync : System.Text.Encodings.Web.HtmlEncoder -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent>
Public Function GetChildContentAsync (encoder As HtmlEncoder) As Task(Of TagHelperContent)

参数

encoder
HtmlEncoder

页面 HtmlEncoder 处理非IHtmlContent C# 表达式时要使用的 。 如果 null为 ,则使用页面的当前 HtmlEncoder执行子级。

返回

完成 Task 时返回由子级呈现的内容的 。

注解

此方法已记录在一起。 具有相同 HtmlEncoder 实例的多个调用不会导致子级在该范围内使用该编码器重新执行。

适用于

GetChildContentAsync(Boolean, HtmlEncoder)

使用范围内给定 encoder 的 异步执行子级,并返回其呈现的内容。

public:
 System::Threading::Tasks::Task<Microsoft::AspNetCore::Razor::TagHelpers::TagHelperContent ^> ^ GetChildContentAsync(bool useCachedResult, System::Text::Encodings::Web::HtmlEncoder ^ encoder);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent> GetChildContentAsync (bool useCachedResult, System.Text.Encodings.Web.HtmlEncoder encoder);
member this.GetChildContentAsync : bool * System.Text.Encodings.Web.HtmlEncoder -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent>
Public Function GetChildContentAsync (useCachedResult As Boolean, encoder As HtmlEncoder) As Task(Of TagHelperContent)

参数

useCachedResult
Boolean

如果 true为 ,则具有相同 的 HtmlEncoder 多个调用不会导致子级重新执行;返回缓存的内容。

encoder
HtmlEncoder

页面 HtmlEncoder 处理非IHtmlContent C# 表达式时要使用的 。 如果 null为 ,则使用页面的当前 HtmlEncoder执行子级。

返回

完成 Task 时返回由子级呈现的内容的 。

适用于