1 write to TagMatchingRules
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\TagHelperDescriptor.cs (1)
81TagMatchingRules = tagMatchingRules.NullToEmpty();
61 references to TagMatchingRules
Microsoft.AspNetCore.Razor.Language.UnitTests (13)
DefaultRequiredAttributeDescriptorBuilderTest.cs (2)
21var attribute = tagHelper.TagMatchingRules[0].Attributes[0]; 38var attribute = tagHelper.TagMatchingRules[0].Attributes[0];
TagHelperBinderTest.cs (10)
39Assert.Equal<TagMatchingRuleDescriptor>(divTagHelper.TagMatchingRules, binding.GetBoundRules(divTagHelper)); 54TestTagName("div", multiTagHelper.TagMatchingRules[0]); 55TestTagName("a", multiTagHelper.TagMatchingRules[1]); 56TestTagName("img", multiTagHelper.TagMatchingRules[2]); 105TestTagName("div", [multiTagHelper1, multiTagHelper2], [multiTagHelper1.TagMatchingRules[0], multiTagHelper2.TagMatchingRules[0]]); 106TestTagName("a", [multiTagHelper1], [multiTagHelper1.TagMatchingRules[1]]); 107TestTagName("img", [multiTagHelper1], [multiTagHelper1.TagMatchingRules[2]]); 108TestTagName("p", [multiTagHelper2], [multiTagHelper2.TagMatchingRules[1]]); 109TestTagName("table", [multiTagHelper2], [multiTagHelper2.TagMatchingRules[2]]);
TagHelperMatchingConventionsTest.cs (1)
127var requiredAttribute = tagHelper.TagMatchingRules[0].Attributes[0];
Microsoft.CodeAnalysis.Razor.Compiler (13)
Language\Components\TagHelperDescriptorExtensions.cs (1)
86TagMatchingRules: [{ TagName: "input" }, _]
Language\TagHelperBinder.cs (2)
64foreach (var rule in tagHelper.TagMatchingRules) 197foreach (var rule in descriptor.TagMatchingRules)
Language\TagHelperDescriptor.cs (5)
86foreach (var tagMatchingRule in TagMatchingRules) 125foreach (var descriptor in TagMatchingRules) 190foreach (var tagMatchingRule in TagMatchingRules) 205return $"{DisplayName} - {string.Join(" | ", TagMatchingRules.Select(r => r.GetDebuggerDisplay()))}"; 213TagMatchingRules, BoundAttributes, AllowedChildTags,
Language\TagHelpers\Producers\BindTagHelperProducer.cs (2)
477rule.TagName = tagHelper.TagMatchingRules.Single().TagName; 488rule.TagName = tagHelper.TagMatchingRules.Single().TagName;
Language\TagHelpers\Producers\ComponentTagHelperProducer.cs (1)
571r.ParentTag = component.TagMatchingRules[0].TagName;
Mvc\ViewComponentTagHelperTargetExtensionBase.cs (2)
89Debug.Assert(tagHelper.TagMatchingRules.Length == 1); 91var rule = tagHelper.TagMatchingRules[0];
Microsoft.CodeAnalysis.Razor.UnitTests (24)
BindTagHelperProducerTest.cs (8)
95Assert.Collection(bind.TagMatchingRules.OrderBy(r => r.Attributes.Length), 258Assert.Collection(bind.TagMatchingRules.OrderBy(o => o.Attributes.Length), 431Assert.Collection(bind.TagMatchingRules.OrderBy(o => o.Attributes.Length), 658Assert.Collection(bind.TagMatchingRules.OrderBy(o => o.Attributes.Length), 739Assert.Collection(bind.TagMatchingRules.OrderBy(r => r.Attributes.Length), 810Assert.Collection(bind.TagMatchingRules.OrderBy(r => r.Attributes.Length), 904Assert.Collection(bind.TagMatchingRules.OrderBy(o => o.Attributes.Length), 1047var rule = Assert.Single(bind.TagMatchingRules);
ComponentTagHelperProducerTest.cs (2)
86var rule = Assert.Single(component.TagMatchingRules); 172var rule = Assert.Single(component.TagMatchingRules);
DefaultTagHelperDescriptorFactoryTest.cs (6)
134Assert.Equal<RequiredAttributeDescriptor>(expected.TagMatchingRules[0].Attributes, actual.TagMatchingRules[0].Attributes); 219Assert.Equal<RequiredAttributeDescriptor>(expected.TagMatchingRules[0].Attributes, actual.TagMatchingRules[0].Attributes); 515var rule = Assert.Single(descriptor.TagMatchingRules); 797var rule = Assert.Single(descriptor.TagMatchingRules);
EventHandlerTagHelperProducerTest.cs (5)
74var rule = Assert.Single(item.TagMatchingRules); 176Assert.Equal(3, item.TagMatchingRules.Length); 178var catchAllRule = item.TagMatchingRules[0]; 193var preventDefaultRule = item.TagMatchingRules[1]; 208var stopPropagationRule = item.TagMatchingRules[2];
KeyTagHelperProducerTest.cs (1)
50var rule = Assert.Single(item.TagMatchingRules);
RefTagHelperProducerTest.cs (1)
50var rule = Assert.Single(item.TagMatchingRules);
SplatTagHelperProducerTest.cs (1)
47var rule = Assert.Single(item.TagMatchingRules);
Microsoft.CodeAnalysis.Razor.Workspaces (9)
CodeActions\Razor\ComponentAccessibilityCodeActionProvider.cs (3)
141if (t.TagMatchingRules is [{ CaseSensitive: true } rule] && 177newTagName = tagHelperPair.Short.TagMatchingRules.FirstOrDefault()?.TagName; 223if (SatisfiesRules(tagHelper.TagMatchingRules, tagName.AsSpan(), parentTagName.AsSpan(), attributes, out var caseInsensitiveMatch))
CodeActions\Razor\SimplifyFullyQualifiedComponentCodeActionResolver.cs (1)
56tagHelper.TagMatchingRules is [{ TagName: { } matchingTagName }] &&
Completion\TagHelperCompletionProvider.cs (1)
55|| descriptor.TagMatchingRules.Any(static rule => HtmlFacts.IsHtmlTagName(rule.TagName)))
Completion\TagHelperCompletionService.cs (2)
110foreach (var rule in tagHelper.TagMatchingRules) 193foreach (var rule in possibleDescriptor.TagMatchingRules)
TagHelperFacts.cs (2)
101foreach (var rule in tagHelper.TagMatchingRules) 125foreach (var rule in tagHelper.TagMatchingRules)
Microsoft.CodeAnalysis.Razor.Workspaces.UnitTests (1)
TagHelperFactsTest.cs (1)
72Assert.Same(tagHelpers[0].TagMatchingRules[0], boundRule);
Microsoft.CodeAnalysis.Remote.Razor (1)
DevTools\RemoteDevToolsService.cs (1)
112TagMatchingRules = th.TagMatchingRules.Select(r => new