1 write to BoundAttributes
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\TagHelperDescriptor.cs (1)
82BoundAttributes = attributeDescriptors.NullToEmpty();
154 references to BoundAttributes
Microsoft.AspNetCore.Razor.Language.UnitTests (37)
BoundAttributeDescriptorExtensionsTest.cs (10)
22var boundAttribute = Assert.Single(tagHelper.BoundAttributes); 43var boundAttribute = Assert.Single(tagHelper.BoundAttributes); 64var boundAttribute = Assert.Single(tagHelper.BoundAttributes); 85var boundAttribute = Assert.Single(tagHelper.BoundAttributes); 107var boundAttribute = Assert.Single(tagHelper.BoundAttributes); 129var boundAttribute = Assert.Single(tagHelper.BoundAttributes); 150var boundAttribute = Assert.Single(tagHelper.BoundAttributes); 171var boundAttribute = Assert.Single(tagHelper.BoundAttributes); 193var boundAttribute = Assert.Single(tagHelper.BoundAttributes); 215var boundAttribute = Assert.Single(tagHelper.BoundAttributes);
DefaultBoundAttributeDescriptorBuilderTest.cs (2)
21var descriptor = tagHelper.BoundAttributes[0]; 38var descriptor = tagHelper.BoundAttributes[0];
Extensions\DefaultTagHelperOptimizationPassTest.cs (1)
70Assert.Equal(tagHelper.BoundAttributes[0], property.BoundAttribute);
Extensions\DefaultTagHelperTargetExtensionTest.cs (18)
405BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), 427BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), 449BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), 482BoundAttribute = StringPropertyTagHelper.BoundAttributes.Single(), 527BoundAttribute = StringPropertyTagHelper.BoundAttributes.Single(), 572BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), 633BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), 672BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), 716BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), 768BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), 812BoundAttribute = StringPropertyTagHelper.BoundAttributes.Single(), 862BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), 924BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), 963BoundAttribute = IntPropertyTagHelper.BoundAttributes.Single(), 1008BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), 1065BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), 1081BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(), 1135BoundAttribute = IntIndexerTagHelper.BoundAttributes.Single(),
Extensions\PreallocatedAttributeTargetExtensionTest.cs (3)
141var attribute = tagHelper.BoundAttributes[0]; 190var attribute = tagHelper.BoundAttributes[0]; 244var attribute = tagHelper.BoundAttributes[0];
IntegrationTests\CodeGenerationIntegrationTest.cs (1)
462var attributes = descriptor.BoundAttributes.Select(attribute => $$"""
TagHelperMatchingConventionsTest.cs (2)
144var boundAttribute = tagHelper.BoundAttributes[0]; 161var boundAttribute = tagHelper.BoundAttributes[0];
Microsoft.CodeAnalysis.Razor.Compiler (23)
Language\Components\ComponentBindLoweringPass.cs (1)
757var boundAttributes = componentTagHelper.BoundAttributes;
Language\Components\ComponentGenericTypePass.cs (1)
423foreach (var attribute in node.Component.BoundAttributes)
Language\Components\ComponentLoweringPass.cs (4)
316foreach (var attr in genericComponent.BoundAttributes) 325foreach (var attr in nonGenericComponent.BoundAttributes) 516var attribute = _component.Component.BoundAttributes 539var attribute = _component.Component.BoundAttributes
Language\Components\TagHelperDescriptorExtensions.cs (4)
57foreach (var boundAttribute in tagHelper.BoundAttributes) 131foreach (var attribute in tagHelper.BoundAttributes) 147foreach (var attribute in tagHelper.BoundAttributes) 164foreach (var attribute in tagHelper.BoundAttributes)
Language\TagHelperDescriptor.cs (5)
91foreach (var boundAttribute in BoundAttributes) 120foreach (var descriptor in BoundAttributes) 139ImmutableInterlocked.InterlockedInitialize(ref _editorRequiredAttributes, GetEditorRequiredAttributes(BoundAttributes)); 185foreach (var boundAttribute in BoundAttributes) 213TagMatchingRules, BoundAttributes, AllowedChildTags,
Language\TagHelperMatchingConventions.cs (2)
229foreach (var attribute in descriptor.BoundAttributes) 240foreach (var attribute in descriptor.BoundAttributes)
Language\TagHelpers\Producers\BindTagHelperProducer.cs (2)
405foreach (var changeAttribute in tagHelper.BoundAttributes) 424foreach (var attribute in tagHelper.BoundAttributes)
Mvc.Version1_X\ViewComponentTagHelperTargetExtension.cs (1)
19var propertyNames = tagHelper.BoundAttributes.Select(attribute => attribute.PropertyName);
Mvc.Version2_X\ViewComponentTagHelperTargetExtension.cs (1)
19var propertyNames = tagHelper.BoundAttributes.Select(attribute => attribute.PropertyName);
Mvc\ViewComponentTagHelperTargetExtension.cs (1)
57foreach (var attribute in tagHelper.BoundAttributes)
Mvc\ViewComponentTagHelperTargetExtensionBase.cs (1)
121foreach (var attribute in tagHelper.BoundAttributes)
Microsoft.CodeAnalysis.Razor.UnitTests (60)
BaseTagHelperProducerTest.cs (4)
102component.BoundAttributes.SequenceEqual(fullNameComponent.BoundAttributes); 125component.BoundAttributes.SequenceEqual(fullNameComponent.BoundAttributes);
BindTagHelperProducerTest.cs (13)
141var attribute = Assert.Single(bind.BoundAttributes); 304var attribute = Assert.Single(bind.BoundAttributes); 448var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind", StringComparison.Ordinal)); 469var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind", StringComparison.Ordinal)); 481var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind", StringComparison.Ordinal)); 668var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind", StringComparison.Ordinal)); 673attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("format", StringComparison.Ordinal)); 696var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind", StringComparison.Ordinal)); 701attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("format", StringComparison.Ordinal)); 767var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind", StringComparison.Ordinal)); 859var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind", StringComparison.Ordinal)); 953var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind", StringComparison.Ordinal)); 1062var attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind", StringComparison.Ordinal));
ComponentTagHelperProducerTest.cs (32)
96var attribute = Assert.Single(component.BoundAttributes); 176component.BoundAttributes.OrderBy(a => a.Name), 227var attribute = Assert.Single(component.BoundAttributes); 264Assert.Empty(component.BoundAttributes); 299Assert.Empty(component.BoundAttributes); 334var attribute = Assert.Single(component.BoundAttributes); 382var attribute = Assert.Single(component.BoundAttributes); 425var attribute = Assert.Single(component.BoundAttributes); 469component.BoundAttributes.OrderBy(a => a.Name), 528component.BoundAttributes.OrderBy(a => a.Name), 597var attribute = Assert.Single(component.BoundAttributes); 643component.BoundAttributes.OrderBy(a => a.Name), 699var attribute = Assert.Single(component.BoundAttributes); 746component.BoundAttributes.OrderBy(a => a.Name), 796component.BoundAttributes.OrderBy(a => a.Name), 853var attribute = Assert.Single(component.BoundAttributes); 870Assert.Empty(childContent.BoundAttributes); 906component.BoundAttributes, 933var contextAttribute = Assert.Single(childContent.BoundAttributes); 976component.BoundAttributes, 1003var contextAttribute = Assert.Single(childContent.BoundAttributes); 1043component.BoundAttributes.OrderBy(a => a.Name), 1079var contextAttribute = Assert.Single(childContent.BoundAttributes); 1120component.BoundAttributes.OrderBy(a => a.Name), 1156var contextAttribute = Assert.Single(childContent.BoundAttributes); 1197component.BoundAttributes.OrderBy(a => a.Name), 1233var contextAttribute = Assert.Single(childContent.BoundAttributes); 1278component.BoundAttributes.OrderBy(a => a.Name), 1314var contextAttribute = Assert.Single(childContent.BoundAttributes); 1359component.BoundAttributes.OrderBy(a => a.Name), 1445Assert.Empty(component.BoundAttributes); 1497component.BoundAttributes.OrderBy(a => a.Name),
DefaultTagHelperDescriptorFactoryTest.cs (6)
517var attributeDescriptor = Assert.Single(descriptor.BoundAttributes); 858Assert.Equal<BoundAttributeDescriptor>(expectedAttributes, descriptor.BoundAttributes); 861foreach (var attribute in descriptor.BoundAttributes.Where(a => a.Name.StartsWith("data-", StringComparison.OrdinalIgnoreCase))) 1295Assert.Equal<BoundAttributeDescriptor>(expectedAttributes, descriptor.BoundAttributes); 1445var actuaDocumentations = descriptor.BoundAttributes 1591return (fullName, tagHelper?.BoundAttributes ?? []);
EventHandlerTagHelperProducerTest.cs (2)
89var attribute = Assert.Single(item.BoundAttributes); 223var attribute = Assert.Single(item.BoundAttributes);
KeyTagHelperProducerTest.cs (1)
65var attribute = Assert.Single(item.BoundAttributes);
RefTagHelperProducerTest.cs (1)
65var attribute = Assert.Single(item.BoundAttributes);
SplatTagHelperProducerTest.cs (1)
62var attribute = Assert.Single(item.BoundAttributes);
Microsoft.CodeAnalysis.Razor.Workspaces (15)
CodeActions\Razor\GenerateEventHandlerCodeActionProvider.cs (2)
121foreach (var attribute in tagHelper.BoundAttributes) 186foreach (var attribute in tagHelper.BoundAttributes)
CodeActions\Razor\SimplifyTagToSelfClosingCodeActionProvider.cs (1)
113foreach (var attribute in boundTagHelper.BoundAttributes)
CodeActions\Razor\UnboundDirectiveAttributeAddUsingCodeActionProvider.cs (1)
118foreach (var boundAttribute in tagHelper.BoundAttributes)
Completion\DirectiveAttributeCompletionItemProvider.cs (3)
120foreach (var attribute in tagHelper.BoundAttributes) 152foreach (var attribute in tagHelper.BoundAttributes) 409tagHelper.BoundAttributes.Any(static a => a.IsBooleanProperty);
Completion\TagHelperCompletionProvider.cs (1)
179static tagHelper => !tagHelper.BoundAttributes.Any(static attribute => attribute.IsDirectiveAttribute));
Completion\TagHelperCompletionService.cs (3)
81foreach (var attributeDescriptor in tagHelper.BoundAttributes) 97foreach (var attributeDescriptor in tagHelper.BoundAttributes) 182if (possibleDescriptor.BoundAttributes.Any(static boundAttribute => boundAttribute.IsDirectiveAttribute))
Formatting\FormattingVisitor.cs (1)
282if (parentComponent.TagHelperInfo.BindingResult.TagHelpers.Any(d => d.BoundAttributes.Any(a => a.Name == propertyName)))
Formatting\Passes\CSharpFormattingPass.CSharpDocumentGenerator.cs (1)
280descriptor.BoundAttributes.FirstOrDefault(d => d.Name == attribute.TagHelperAttributeInfo.Name) is { } boundAttribute &&
GoToDefinition\RazorComponentDefinitionHelpers.cs (1)
116? boundTagHelper.BoundAttributes.FirstOrDefault(propertyName, static (a, propertyName) => a.Name == propertyName)
TagHelperFacts.cs (1)
58foreach (var boundAttribute in tagHelper.BoundAttributes)
Microsoft.CodeAnalysis.Razor.Workspaces.UnitTests (18)
Completion\LanguageServerTagHelperCompletionServiceTest.cs (16)
32["asp-route-..."] = [tagHelpers[0].BoundAttributes[^1]] 65["asp-all-route-data"] = [tagHelpers[0].BoundAttributes[^1]], 66["asp-route-..."] = [tagHelpers[0].BoundAttributes[^1]] 102["asp-all-route-data"] = [tagHelpers[0].BoundAttributes[^1]], 103["asp-route-..."] = [tagHelpers[0].BoundAttributes[^1]] 138["visible"] = [tagHelpers[0].BoundAttributes[^1]] 175["visible"] = [tagHelpers[0].BoundAttributes[^1]] 287["class"] = [.. tagHelpers[1].BoundAttributes], 289["repeat"] = [tagHelpers[0].BoundAttributes[0]] 329["class"] = [.. tagHelpers[1].BoundAttributes], 330["repeat"] = [tagHelpers[0].BoundAttributes[0]], 331["visible"] = [tagHelpers[0].BoundAttributes[^1], tagHelpers[2].BoundAttributes[0]] 361["repeat"] = [.. tagHelpers[0].BoundAttributes] 389["repeat"] = [.. tagHelpers[0].BoundAttributes] 419["repeat"] = [.. tagHelpers[0].BoundAttributes]
TagHelperFactsTest.cs (2)
103Assert.Same(tagHelpers[0].BoundAttributes[^1], Assert.Single(result)); 120tagHelpers[0].BoundAttributes.First()
Microsoft.CodeAnalysis.Remote.Razor (1)
DevTools\RemoteDevToolsService.cs (1)
128BoundAttributes = th.BoundAttributes.Select(a => new