TagHelperExecutionContext 类

定义

用于存储有关 ITagHelper执行生存期的信息的类。

public ref class TagHelperExecutionContext
public class TagHelperExecutionContext
type TagHelperExecutionContext = class
Public Class TagHelperExecutionContext
继承
TagHelperExecutionContext

构造函数

TagHelperExecutionContext(String, TagMode, IDictionary<Object,Object>, String, Func<Task>, Action<HtmlEncoder>, Func<TagHelperContent>)

实例化一个新的 TagHelperExecutionContext

属性

ChildContentRetrieved

指示是否已 Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.GetChildContentAsync(System.Boolean,System.Text.Encodings.Web.HtmlEncoder) 调用。

Context

ITagHelper的上下文。

Items

获取用于与其他 ITagHelper通信的项的集合。

Output

ITagHelper的 输出。

TagHelpers

ITagHelper应运行的 。

方法

Add(ITagHelper)

跟踪给定 tagHelper的 。

AddHtmlAttribute(String, Object, HtmlAttributeValueStyle)

跟踪 HTML 属性。

AddHtmlAttribute(TagHelperAttribute)

跟踪 HTML 属性。

AddTagHelperAttribute(String, Object, HtmlAttributeValueStyle)

ITagHelper跟踪绑定属性。

AddTagHelperAttribute(TagHelperAttribute)

ITagHelper跟踪绑定属性。

Reinitialize(String, TagMode, IDictionary<Object,Object>, String, Func<Task>)

清除 并使用 TagHelperExecutionContext 提供的值更新其状态。

SetOutputContentAsync()

以异步方式执行子级,页面HtmlEncoder在作用域内,并将 的 Content 设置为Output呈现的结果。

适用于