Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1122,18 +1122,24 @@ public override void VisitMarkupTagHelperAttribute(MarkupTagHelperAttributeSynta
var descriptors = element.TagHelperInfo.BindingResult.Descriptors;
var attributeName = node.Name.GetContent();
var attributeValueNode = node.Value;
var associatedDescriptors = descriptors.Where(descriptor =>
descriptor.BoundAttributes.Any(attributeDescriptor => TagHelperMatchingConventions.CanSatisfyBoundAttribute(attributeName, attributeDescriptor)));

if (associatedDescriptors.Any() && _renderedBoundAttributeNames.Add(attributeName))
using var associatedDescriptorsWithSatisfyingAttribute = new PooledArrayBuilder<(TagHelperDescriptor, BoundAttributeDescriptor)>();
foreach (var descriptor in descriptors)
{
foreach (var associatedDescriptor in associatedDescriptors)
foreach (var attributeDescriptor in descriptor.BoundAttributes)
{
var associatedAttributeDescriptor = associatedDescriptor.BoundAttributes.First(a =>
if (TagHelperMatchingConventions.CanSatisfyBoundAttribute(attributeName, attributeDescriptor))
{
return TagHelperMatchingConventions.CanSatisfyBoundAttribute(attributeName, a);
});
associatedDescriptorsWithSatisfyingAttribute.Add((descriptor, attributeDescriptor));
break;
}
}
}

if (associatedDescriptorsWithSatisfyingAttribute.Any() && _renderedBoundAttributeNames.Add(attributeName))
{
foreach (var (associatedDescriptor, associatedAttributeDescriptor) in associatedDescriptorsWithSatisfyingAttribute)
{
var setTagHelperProperty = new TagHelperPropertyIntermediateNode()
{
AttributeName = attributeName,
Expand Down
Loading