1 instantiation of BoundAttributeDescriptor
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\BoundAttributeDescriptorBuilder.cs (1)
155
return new
BoundAttributeDescriptor
(
194 references to BoundAttributeDescriptor
Microsoft.AspNetCore.Razor.Language.UnitTests (17)
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\PreallocatedAttributeTargetExtensionTest.cs (3)
141
var
attribute = tagHelper.BoundAttributes[0];
190
var
attribute = tagHelper.BoundAttributes[0];
244
var
attribute = tagHelper.BoundAttributes[0];
TagHelperMatchingConventionsTest.cs (2)
144
var
boundAttribute = tagHelper.BoundAttributes[0];
161
var
boundAttribute = tagHelper.BoundAttributes[0];
Microsoft.CodeAnalysis.Razor.Compiler (96)
Language\BoundAttributeDescriptor.cs (1)
14
public sealed class BoundAttributeDescriptor : TagHelperObject<
BoundAttributeDescriptor
>
Language\BoundAttributeDescriptorBuilder.cs (2)
12
public sealed partial class BoundAttributeDescriptorBuilder : TagHelperObjectBuilder<
BoundAttributeDescriptor
>
153
private protected override
BoundAttributeDescriptor
BuildCore(ImmutableArray<RazorDiagnostic> diagnostics)
Language\BoundAttributeDescriptorExtensions.cs (4)
11
public static string? GetGloballyQualifiedTypeName(this
BoundAttributeDescriptor
attribute)
18
public static bool IsDefaultKind(this
BoundAttributeDescriptor
attribute)
25
internal static bool ExpectsStringValue(this
BoundAttributeDescriptor
attribute, string name)
36
internal static bool ExpectsBooleanValue(this
BoundAttributeDescriptor
attribute, string name)
Language\BoundAttributeParameterDescriptor.cs (4)
13
private
BoundAttributeDescriptor
? _parent;
60
public
BoundAttributeDescriptor
Parent
61
=> _parent ?? ThrowHelper.ThrowInvalidOperationException<
BoundAttributeDescriptor
>(Resources.Parent_has_not_been_set);
63
internal void SetParent(
BoundAttributeDescriptor
parent)
Language\Components\ComponentBindLoweringPass.cs (8)
411
out
var
valueAttribute,
412
out
var
changeAttribute,
413
out
var
expressionAttribute))
652
BoundAttributeDescriptor
? valueAttribute)
696
out
BoundAttributeDescriptor
? valueAttribute,
697
out
BoundAttributeDescriptor
? changeAttribute,
698
out
BoundAttributeDescriptor
? expressionAttribute)
760
var
attribute = boundAttributes[i];
Language\Components\ComponentDiagnosticFactory.cs (2)
247
IEnumerable<
BoundAttributeDescriptor
> attributes)
264
IEnumerable<
BoundAttributeDescriptor
> attributes)
Language\Components\ComponentGenericTypePass.cs (6)
70
foreach (
var
attribute in componentTypeParameters)
264
private bool TryFindGenericTypeNames(
BoundAttributeDescriptor
? boundAttribute, string? globallyQualifiedTypeName, [NotNullWhen(true)] out IReadOnlyList<string>? typeParameters)
299
var missing = new List<
BoundAttributeDescriptor
>();
423
foreach (
var
attribute in node.Component.BoundAttributes)
541
public Binding(
BoundAttributeDescriptor
attribute) => Attribute = attribute;
543
public
BoundAttributeDescriptor
Attribute { get; }
Language\Components\ComponentLoweringPass.cs (8)
261
foreach (
var
typeParam in tagHelper.GetTypeParameters())
281
foreach (
var
typeParam in component.GetTypeParameters())
316
foreach (
var
attr in genericComponent.BoundAttributes)
325
foreach (
var
attr in nonGenericComponent.BoundAttributes)
383
foreach (
var
requiredAttribute in tagHelper.EditorRequiredAttributes)
516
var
attribute = _component.Component.BoundAttributes
539
var
attribute = _component.Component.BoundAttributes
570
private ComponentChildContentIntermediateNode RewriteChildContent(
BoundAttributeDescriptor
attribute, SourceSpan? source, IntermediateNodeCollection children)
Language\Components\ComponentNodeWriter.cs (1)
362
static string serializeTypeParameter(
BoundAttributeDescriptor
attribute)
Language\Components\TagHelperBoundAttributeDescriptorExtensions.cs (14)
8
public static bool IsDelegateProperty(this
BoundAttributeDescriptor
attribute)
11
public static bool IsDelegateWithAwaitableResult(this
BoundAttributeDescriptor
attribute)
18
/// <param name="attribute">The <see cref="
BoundAttributeDescriptor
"/>.</param>
20
public static bool IsEventCallbackProperty(this
BoundAttributeDescriptor
attribute)
23
public static bool IsGenericTypedProperty(this
BoundAttributeDescriptor
attribute)
26
public static bool IsTypeParameterProperty(this
BoundAttributeDescriptor
attribute)
29
public static bool IsCascadingTypeParameterProperty(this
BoundAttributeDescriptor
attribute)
36
/// <param name="attribute">The <see cref="
BoundAttributeDescriptor
"/>.</param>
38
public static bool IsChildContentProperty(this
BoundAttributeDescriptor
attribute)
54
/// <param name="attribute">The <see cref="
BoundAttributeDescriptor
"/>.</param>
56
public static bool IsParameterizedChildContentProperty(this
BoundAttributeDescriptor
attribute)
64
/// <param name="attribute">The <see cref="
BoundAttributeDescriptor
"/>.</param>
74
/// <param name="attribute">The <see cref="
BoundAttributeDescriptor
"/>.</param>
79
public static bool IsChildContentParameterNameProperty(this
BoundAttributeDescriptor
attribute)
Language\Components\TagHelperDescriptorExtensions.cs (6)
57
foreach (
var
boundAttribute in tagHelper.BoundAttributes)
129
public static IEnumerable<
BoundAttributeDescriptor
> GetChildContentProperties(this TagHelperDescriptor tagHelper)
131
foreach (
var
attribute in tagHelper.BoundAttributes)
145
public static IEnumerable<
BoundAttributeDescriptor
> GetTypeParameters(this TagHelperDescriptor tagHelper)
147
foreach (
var
attribute in tagHelper.BoundAttributes)
164
foreach (
var
attribute in tagHelper.BoundAttributes)
Language\Extensions\DefaultTagHelperPropertyIntermediateNode.cs (1)
45
public
BoundAttributeDescriptor
BoundAttribute { get; set; }
Language\Extensions\PreallocatedTagHelperPropertyIntermediateNode.cs (1)
40
public
BoundAttributeDescriptor
BoundAttribute { get; set; }
Language\Intermediate\ComponentAttributeIntermediateNode.cs (1)
146
public
BoundAttributeDescriptor
BoundAttribute { get; set; }
Language\Intermediate\ComponentChildContentIntermediateNode.cs (1)
16
public
BoundAttributeDescriptor
BoundAttribute { get; set; }
Language\Intermediate\ComponentTypeArgumentIntermediateNode.cs (2)
7
BoundAttributeDescriptor
boundAttribute, CSharpIntermediateToken value) : IntermediateNode
9
public
BoundAttributeDescriptor
BoundAttribute { get; } = boundAttribute;
Language\Intermediate\TagHelperDirectiveAttributeIntermediateNode.cs (1)
20
public
BoundAttributeDescriptor
BoundAttribute => _match.Attribute;
Language\Intermediate\TagHelperDirectiveAttributeParameterIntermediateNode.cs (1)
21
public
BoundAttributeDescriptor
BoundAttribute => BoundAttributeParameter.Parent;
Language\Intermediate\TagHelperPropertyIntermediateNode.cs (1)
17
public
BoundAttributeDescriptor
BoundAttribute => _match.Attribute;
Language\TagHelperAttributeMatch.cs (2)
11
BoundAttributeDescriptor
attribute,
15
public
BoundAttributeDescriptor
Attribute { get; } = attribute;
Language\TagHelperDescriptor.cs (12)
19
private ImmutableArray<
BoundAttributeDescriptor
> _editorRequiredAttributes;
43
public ImmutableArray<
BoundAttributeDescriptor
> BoundAttributes { get; }
66
ImmutableArray<
BoundAttributeDescriptor
> attributeDescriptors,
91
foreach (
var
boundAttribute in BoundAttributes)
120
foreach (
var
descriptor in BoundAttributes)
133
internal ImmutableArray<
BoundAttributeDescriptor
> EditorRequiredAttributes
144
static ImmutableArray<
BoundAttributeDescriptor
> GetEditorRequiredAttributes(ImmutableArray<
BoundAttributeDescriptor
> attributes)
148
return ImmutableArray<
BoundAttributeDescriptor
>.Empty;
151
using var results = new PooledArrayBuilder<
BoundAttributeDescriptor
>(capacity: attributes.Length);
153
foreach (
var
attribute in attributes)
185
foreach (
var
boundAttribute in BoundAttributes)
Language\TagHelperDescriptorBuilder.cs (1)
104
public TagHelperObjectBuilderCollection<
BoundAttributeDescriptor
, BoundAttributeDescriptorBuilder> BoundAttributes { get; }
Language\TagHelperMatchingConventions.cs (8)
93
public static bool CanSatisfyBoundAttribute(string name,
BoundAttributeDescriptor
descriptor)
101
BoundAttributeDescriptor
descriptor,
115
public static bool SatisfiesBoundAttributeIndexer(
BoundAttributeDescriptor
descriptor, ReadOnlySpan<char> name)
122
public static bool SatisfiesBoundAttributeWithParameter(BoundAttributeParameterDescriptor descriptor, string name,
BoundAttributeDescriptor
parent)
229
foreach (
var
attribute in descriptor.BoundAttributes)
240
foreach (
var
attribute in descriptor.BoundAttributes)
254
private static bool SatisfiesBoundAttributeName(
BoundAttributeDescriptor
descriptor, ReadOnlySpan<char> name)
302
internal static StringComparison GetComparison(this
BoundAttributeDescriptor
descriptor)
Language\TagHelpers\Producers\BindTagHelperProducer.cs (4)
405
foreach (
var
changeAttribute in tagHelper.BoundAttributes)
418
BoundAttributeDescriptor
? valueAttribute = null;
419
BoundAttributeDescriptor
? expressionAttribute = null;
424
foreach (
var
attribute in tagHelper.BoundAttributes)
Language\TagHelpers\Producers\ComponentTagHelperProducer.cs (2)
70
foreach (
var
childContent in shortNameMatchingDescriptor.GetChildContentProperties())
548
private static TagHelperDescriptor CreateChildContentDescriptor(TagHelperDescriptor component,
BoundAttributeDescriptor
attribute)
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 (42)
BindTagHelperProducerTest.cs (12)
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));
486
static void AssertAttribute(
BoundAttributeDescriptor
attribute)
668
var
attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind", StringComparison.Ordinal));
696
var
attribute = Assert.Single(bind.BoundAttributes, a => a.Name.StartsWith("@bind", 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 (14)
96
var
attribute = Assert.Single(component.BoundAttributes);
227
var
attribute = Assert.Single(component.BoundAttributes);
334
var
attribute = Assert.Single(component.BoundAttributes);
382
var
attribute = Assert.Single(component.BoundAttributes);
425
var
attribute = Assert.Single(component.BoundAttributes);
597
var
attribute = Assert.Single(component.BoundAttributes);
699
var
attribute = Assert.Single(component.BoundAttributes);
853
var
attribute = Assert.Single(component.BoundAttributes);
933
var
contextAttribute = Assert.Single(childContent.BoundAttributes);
1003
var
contextAttribute = Assert.Single(childContent.BoundAttributes);
1079
var
contextAttribute = Assert.Single(childContent.BoundAttributes);
1156
var
contextAttribute = Assert.Single(childContent.BoundAttributes);
1233
var
contextAttribute = Assert.Single(childContent.BoundAttributes);
1314
var
contextAttribute = Assert.Single(childContent.BoundAttributes);
DefaultTagHelperDescriptorFactoryTest.cs (11)
517
var
attributeDescriptor = Assert.Single(descriptor.BoundAttributes);
826
public static TheoryData<string, ImmutableArray<
BoundAttributeDescriptor
>> InvalidTagHelperAttributeDescriptorData
846
ImmutableArray<
BoundAttributeDescriptor
> expectedAttributes)
858
Assert.Equal<
BoundAttributeDescriptor
>(expectedAttributes, descriptor.BoundAttributes);
861
foreach (
var
attribute in descriptor.BoundAttributes.Where(a => a.Name.StartsWith("data-", StringComparison.OrdinalIgnoreCase)))
1162
public static TheoryData<string, ImmutableArray<
BoundAttributeDescriptor
>, ImmutableArray<RazorDiagnostic>> TagHelperWithPrefixData
1257
static (string, ImmutableArray<
BoundAttributeDescriptor
>, ImmutableArray<RazorDiagnostic>) Combine(
1258
(string name, ImmutableArray<
BoundAttributeDescriptor
> boundAttributes) pair, params ImmutableArray<RazorDiagnostic> diagnostics)
1282
ImmutableArray<
BoundAttributeDescriptor
> expectedAttributes,
1295
Assert.Equal<
BoundAttributeDescriptor
>(expectedAttributes, descriptor.BoundAttributes);
1586
private static (string, ImmutableArray<
BoundAttributeDescriptor
>) NameAndBoundAttributes(
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 (38)
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\AttributeCompletionResult.cs (4)
12
public IReadOnlyDictionary<string, IEnumerable<
BoundAttributeDescriptor
>> Completions { get; }
14
private AttributeCompletionResult(IReadOnlyDictionary<string, IEnumerable<
BoundAttributeDescriptor
>> completions)
19
internal static AttributeCompletionResult Create(Dictionary<string, HashSet<
BoundAttributeDescriptor
>> completions)
26
var readonlyCompletions = new Dictionary<string, IEnumerable<
BoundAttributeDescriptor
>>(
Completion\DirectiveAttributeCompletionContext.cs (2)
19
public bool AlreadySatisfiesParameter(BoundAttributeParameterDescriptor parameter,
BoundAttributeDescriptor
attribute)
25
public bool CanSatisfyAttribute(
BoundAttributeDescriptor
attribute)
Completion\DirectiveAttributeCompletionItemProvider.cs (9)
113
var indexerAttributes = new MemoryBuilder<
BoundAttributeDescriptor
>(initialCapacity: 8, clearArray: true);
120
foreach (
var
attribute in tagHelper.BoundAttributes)
142
ref MemoryBuilder<
BoundAttributeDescriptor
> builder)
152
foreach (
var
attribute in tagHelper.BoundAttributes)
163
BoundAttributeDescriptor
attribute,
203
BoundAttributeDescriptor
attribute,
204
ReadOnlySpan<
BoundAttributeDescriptor
> indexerAttributes,
221
foreach (
var
indexerAttribute in indexerAttributes)
239
BoundAttributeDescriptor
attribute,
Completion\TagHelperCompletionProvider.cs (2)
350
IEnumerable<
BoundAttributeDescriptor
> boundAttributes,
436
foreach (
var
attribute in requiredAttributes)
Completion\TagHelperCompletionService.cs (7)
40
_ => new HashSet<
BoundAttributeDescriptor
>(),
81
foreach (
var
attributeDescriptor in tagHelper.BoundAttributes)
96
var htmlNameToBoundAttribute = new Dictionary<string,
BoundAttributeDescriptor
>(StringComparer.OrdinalIgnoreCase);
97
foreach (
var
attributeDescriptor in tagHelper.BoundAttributes)
114
if (htmlNameToBoundAttribute.TryGetValue(requiredAttribute.Name, out
var
attributeDescriptor))
130
void UpdateCompletions(string attributeName,
BoundAttributeDescriptor
? possibleDescriptor)
143
rules = new HashSet<
BoundAttributeDescriptor
>();
Extensions\TagHelperDescriptorExtensions.cs (1)
29
foreach (
var
requiredAttribute in descriptor.EditorRequiredAttributes)
GoToDefinition\AbstractDefinitionService.cs (1)
83
private async Task<LspRange> GetNavigateRangeAsync(IDocumentSnapshot documentSnapshot,
BoundAttributeDescriptor
? attributeDescriptor, CancellationToken cancellationToken)
GoToDefinition\RazorComponentDefinitionHelpers.cs (2)
24
internal sealed record BoundTagHelperResult(TagHelperDescriptor ElementDescriptor,
BoundAttributeDescriptor
? AttributeDescriptor);
115
var
boundAttribute = propertyName is not null
Hover\HoverFactory.cs (1)
179
ImmutableArray<
BoundAttributeDescriptor
> boundAttributes,
TagHelperFacts.cs (3)
45
public static ImmutableArray<
BoundAttributeDescriptor
> GetBoundTagHelperAttributes(
54
using var matchingBoundAttributes = new PooledArrayBuilder<
BoundAttributeDescriptor
>();
58
foreach (
var
boundAttribute in tagHelper.BoundAttributes)
Tooltip\BoundAttributeDescriptionInfo.cs (2)
26
public static BoundAttributeDescriptionInfo From(
BoundAttributeDescriptor
boundAttribute, bool isIndexer)
29
public static BoundAttributeDescriptionInfo From(
BoundAttributeDescriptor
boundAttribute, bool isIndexer, string? parentTagHelperTypeName)
Microsoft.CodeAnalysis.Remote.Razor (1)
RemoteTagHelperSearchEngine.cs (1)
53
private async Task<LspLocation?> TryLocateTagHelperDefinitionAsync(TagHelperDescriptor boundTagHelper,
BoundAttributeDescriptor
? boundAttribute, Compilation compilation, Solution solution, CancellationToken cancellationToken)