Added convenience properties to TagHelperIntermediateNode
This commit is contained in:
parent
0a283cdfdb
commit
bcf790b9d5
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Razor.Language.Intermediate
|
namespace Microsoft.AspNetCore.Razor.Language.Intermediate
|
||||||
{
|
{
|
||||||
|
|
@ -49,6 +50,24 @@ namespace Microsoft.AspNetCore.Razor.Language.Intermediate
|
||||||
|
|
||||||
public ICollection<TagHelperDescriptor> TagHelpers { get; } = new List<TagHelperDescriptor>();
|
public ICollection<TagHelperDescriptor> TagHelpers { get; } = new List<TagHelperDescriptor>();
|
||||||
|
|
||||||
|
public TagHelperBodyIntermediateNode Body => Children.OfType<TagHelperBodyIntermediateNode>().SingleOrDefault();
|
||||||
|
|
||||||
|
public IEnumerable<SetTagHelperPropertyIntermediateNode> SetTagHelperProperties
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Children.OfType<SetTagHelperPropertyIntermediateNode>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<AddTagHelperHtmlAttributeIntermediateNode> AddTagHelperHtmlAttributes
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Children.OfType<AddTagHelperHtmlAttributeIntermediateNode>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void Accept(IntermediateNodeVisitor visitor)
|
public override void Accept(IntermediateNodeVisitor visitor)
|
||||||
{
|
{
|
||||||
if (visitor == null)
|
if (visitor == null)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue