TagHelperOutput.GetChildContentAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
GetChildContentAsync() |
异步执行子级并返回其呈现的内容。 |
GetChildContentAsync(Boolean) |
异步执行子级并返回其呈现的内容。 |
GetChildContentAsync(HtmlEncoder) |
使用范围内给定 |
GetChildContentAsync(Boolean, HtmlEncoder) |
使用范围内给定 |
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 时返回由子级呈现的内容的 。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈