TagHelperBlockBuilder Class

A Microsoft.AspNetCore.Razor.Parser.SyntaxTree.BlockBuilder used to create Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlocks.

Namespace
Microsoft.AspNetCore.Razor.Parser.TagHelpers
Assemblies
  • Microsoft.AspNetCore.Razor

Syntax

public class TagHelperBlockBuilder : BlockBuilder
class Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlockBuilder

Constructors

TagHelperBlockBuilder(Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlock)

Instantiates a new Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlockBuilder instance based on the given <em>original</em>.

Arguments:original (Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlock) – The original Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlock to copy data from.
public TagHelperBlockBuilder(TagHelperBlock original)
TagHelperBlockBuilder(System.String, Microsoft.AspNetCore.Razor.TagHelpers.TagMode, Microsoft.AspNetCore.Razor.SourceLocation, System.Collections.Generic.IList<Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperAttributeNode>, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperDescriptor>)

Instantiates a new instance of the Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlockBuilder class with the provided values.

Arguments:
public TagHelperBlockBuilder(string tagName, TagMode tagMode, SourceLocation start, IList<TagHelperAttributeNode> attributes, IEnumerable<TagHelperDescriptor> descriptors)

Properties

Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlockBuilder.Attributes

The HTML attributes.

Return type:System.Collections.Generic.IList<Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperAttributeNode>
public IList<TagHelperAttributeNode> Attributes { get; }
Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlockBuilder.Descriptors

Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperDescriptors for the HTML element.

Return type:System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperDescriptor>
public IEnumerable<TagHelperDescriptor> Descriptors { get; }
Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlockBuilder.SourceEndTag

Gets or sets the unrewritten source end tag.

Return type:Microsoft.AspNetCore.Razor.Parser.SyntaxTree.Block
public Block SourceEndTag { get; set; }
Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlockBuilder.SourceStartTag

Gets or sets the unrewritten source start tag.

Return type:Microsoft.AspNetCore.Razor.Parser.SyntaxTree.Block
public Block SourceStartTag { get; set; }
Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlockBuilder.Start

The starting Microsoft.AspNetCore.Razor.SourceLocation of the tag helper.

Return type:Microsoft.AspNetCore.Razor.SourceLocation
public SourceLocation Start { get; set; }
Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlockBuilder.TagMode

Gets the HTML syntax of the element in the Razor source.

Return type:Microsoft.AspNetCore.Razor.TagHelpers.TagMode
public TagMode TagMode { get; }
Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlockBuilder.TagName

The HTML tag name.

Return type:System.String
public string TagName { get; set; }

Methods

Build()

Constructs a new Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlock.

Return type:Microsoft.AspNetCore.Razor.Parser.SyntaxTree.Block
Returns:A Microsoft.AspNetCore.Razor.Parser.TagHelpers.TagHelperBlock.
public override Block Build()
Reset()
public override void Reset()