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