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