13 instantiations of TagHelperAttribute
Microsoft.AspNetCore.Mvc.Razor (3)
TagHelpers\UrlResolutionTagHelper.cs (3)
166attributes[i] = new TagHelperAttribute( 193attributes[i] = new TagHelperAttribute( 201attributes[i] = new TagHelperAttribute(
Microsoft.AspNetCore.Mvc.TagHelpers (6)
LinkTagHelper.cs (1)
282output.Attributes[index] = new TagHelperAttribute(
ScriptTagHelper.cs (3)
309output.Attributes[index] = new TagHelperAttribute( 455var attribute = new TagHelperAttribute(srcName, srcValue, valueStyle); 468var attribute = new TagHelperAttribute(srcName, srcValue, valueStyle);
TagHelperOutputExtensions.cs (2)
101var newAttribute = new TagHelperAttribute( 180var newClassAttribute = new TagHelperAttribute(
Microsoft.AspNetCore.Razor (2)
TagHelpers\TagHelperAttributeList.cs (2)
73var attribute = new TagHelperAttribute(name, value); 131var attribute = new TagHelperAttribute(name, value);
Microsoft.AspNetCore.Razor.Runtime (2)
Runtime\TagHelpers\TagHelperExecutionContext.cs (2)
127var attribute = new TagHelperAttribute(name, value, valueStyle); 153var attribute = new TagHelperAttribute(name, value, valueStyle);
124 references to TagHelperAttribute
Microsoft.AspNetCore.Mvc.Razor (2)
TagHelpers\UrlResolutionTagHelper.cs (2)
142/// <see cref="TagHelperAttribute.Name"/> is <paramref name="attributeName"/>. 156var attribute = attributes[i];
Microsoft.AspNetCore.Mvc.TagHelpers (21)
AttributeMatcher.cs (1)
62if (!allAttributes.TryGetAttribute(requiredAttributes[i], out var attribute))
FormTagHelper.cs (1)
169if (output.Attributes.TryGetAttribute(HtmlActionAttributeName, out var actionAttribute))
InputTagHelper.cs (1)
345if (output.Attributes.TryGetAttribute("form", out var formAttribute))
LinkTagHelper.cs (4)
281var existingAttribute = output.Attributes[index]; 379var attribute = attributes[i]; 405if (!attributes.TryGetAttribute(RelAttributeName, out var relAttribute) || 499var attribute = attributes[i];
ScriptTagHelper.cs (5)
308var existingAttribute = output.Attributes[index]; 390var attribute = attributes[i]; 455var attribute = new TagHelperAttribute(srcName, srcValue, valueStyle); 468var attribute = new TagHelperAttribute(srcName, srcValue, valueStyle); 504var attribute = attributes[i];
TagHelperOutputExtensions.cs (9)
98var found = tagHelperOutput.Attributes.TryGetAttribute("class", out var classAttribute); 101var newAttribute = new TagHelperAttribute( 119IEnumerable<TagHelperAttribute> attributes) 124foreach (var attribute in attributes.ToArray()) 156if (!tagHelperOutput.Attributes.TryGetAttribute("class", out TagHelperAttribute classAttribute)) 180var newClassAttribute = new TagHelperAttribute( 210if (!tagHelperOutput.Attributes.TryGetAttribute("class", out TagHelperAttribute classAttribute)) 258TagHelperAttribute classAttribute, 291var existingAttribute = allAttributes[allAttributeIndex];
Microsoft.AspNetCore.Razor (95)
TagHelpers\ReadOnlyTagHelperAttributeList.cs (48)
9/// A read-only collection of <see cref="TagHelperAttribute"/>s. 11public abstract class ReadOnlyTagHelperAttributeList : ReadOnlyCollection<TagHelperAttribute> 18: base(new List<TagHelperAttribute>()) 27public ReadOnlyTagHelperAttributeList(IList<TagHelperAttribute> attributes) 33/// Gets the first <see cref="TagHelperAttribute"/> with <see cref="TagHelperAttribute.Name"/> 37/// The <see cref="TagHelperAttribute.Name"/> of the <see cref="TagHelperAttribute"/> to get. 39/// <returns>The first <see cref="TagHelperAttribute"/> with <see cref="TagHelperAttribute.Name"/> 43public TagHelperAttribute this[string name] 55var attribute = items[i]; 67/// Determines whether a <see cref="TagHelperAttribute"/> with <see cref="TagHelperAttribute.Name"/> 70/// <param name="name">The <see cref="TagHelperAttribute.Name"/> of the 71/// <see cref="TagHelperAttribute"/> to get.</param> 73/// <c>true</c> if a <see cref="TagHelperAttribute"/> with the same 74/// <see cref="TagHelperAttribute.Name"/> exists in the collection; otherwise, <c>false</c>. 83/// Retrieves the first <see cref="TagHelperAttribute"/> with <see cref="TagHelperAttribute.Name"/> 86/// <param name="name">The <see cref="TagHelperAttribute.Name"/> of the 87/// <see cref="TagHelperAttribute"/> to get.</param> 88/// <param name="attribute">When this method returns, the first <see cref="TagHelperAttribute"/> with 89/// <see cref="TagHelperAttribute.Name"/> matching <paramref name="name"/>, if found; otherwise, 91/// <returns><c>true</c> if a <see cref="TagHelperAttribute"/> with the same 92/// <see cref="TagHelperAttribute.Name"/> exists in the collection; otherwise, <c>false</c>.</returns> 94public bool TryGetAttribute(string name, out TagHelperAttribute attribute) 104/// Retrieves <see cref="TagHelperAttribute"/>s in the collection with 105/// <see cref="TagHelperAttribute.Name"/> matching <paramref name="name"/>. 107/// <param name="name">The <see cref="TagHelperAttribute.Name"/> of the 108/// <see cref="TagHelperAttribute"/>s to get.</param> 109/// <param name="attributes">When this method returns, the <see cref="TagHelperAttribute"/>s with 110/// <see cref="TagHelperAttribute.Name"/> matching <paramref name="name"/>.</param> 111/// <returns><c>true</c> if at least one <see cref="TagHelperAttribute"/> with the same 112/// <see cref="TagHelperAttribute.Name"/> exists in the collection; otherwise, <c>false</c>.</returns> 114public bool TryGetAttributes(string name, out IReadOnlyList<TagHelperAttribute> attributes) 119List<TagHelperAttribute> matchedAttributes = null; 125var attribute = items[i]; 130matchedAttributes = new List<TagHelperAttribute>(); 136attributes = matchedAttributes ?? (IReadOnlyList<TagHelperAttribute>)Array.Empty<TagHelperAttribute>(); 142/// Searches for a <see cref="TagHelperAttribute"/> who's <see cref="TagHelperAttribute.Name"/> 146/// <param name="name">The <see cref="TagHelperAttribute.Name"/> to locate in the collection.</param> 147/// <returns>The zero-based index of the first matching <see cref="TagHelperAttribute"/> within the collection, 171/// <see cref="TagHelperAttribute.Name"/>.</param> 174/// <see cref="TagHelperAttribute.Name"/>.</returns> 175protected static bool NameEquals(string name, TagHelperAttribute attribute)
TagHelpers\TagHelperAttribute.cs (6)
15/// Instantiates a new instance of <see cref="TagHelperAttribute"/> with the specified <paramref name="name"/>. 26/// Instantiates a new instance of <see cref="TagHelperAttribute"/> with the specified <paramref name="name"/> 37/// Instantiates a new instance of <see cref="TagHelperAttribute"/> with the specified <paramref name="name"/>, 71public bool Equals(TagHelperAttribute other) 209var other = obj as TagHelperAttribute;
TagHelpers\TagHelperAttributeList.cs (38)
7/// A collection of <see cref="TagHelperAttribute"/>s. 9public class TagHelperAttributeList : ReadOnlyTagHelperAttributeList, IList<TagHelperAttribute> 24public TagHelperAttributeList(IEnumerable<TagHelperAttribute> attributes) 25: base(new List<TagHelperAttribute>(attributes)) 35public TagHelperAttributeList(List<TagHelperAttribute> attributes) 43/// <paramref name="value"/>'s <see cref="TagHelperAttribute.Name"/> must not be <c>null</c>. 45public new TagHelperAttribute this[int index] 60/// Replaces the first <see cref="TagHelperAttribute"/> with <see cref="TagHelperAttribute.Name"/> matching 61/// <paramref name="name"/> and removes any additional matching <see cref="TagHelperAttribute"/>s. If a 62/// matching <see cref="TagHelperAttribute"/> is not found, adds a <see cref="TagHelperAttribute"/> with 65/// The <see cref="TagHelperAttribute.Name"/> of the <see cref="TagHelperAttribute"/> to set. 68/// The <see cref="TagHelperAttribute.Value"/> to set. 73var attribute = new TagHelperAttribute(name, value); 78/// Replaces the first <see cref="TagHelperAttribute"/> with <see cref="TagHelperAttribute.Name"/> matching 79/// <paramref name="attribute"/>'s <see cref="TagHelperAttribute.Name"/> and removes any additional matching 80/// <see cref="TagHelperAttribute"/>s. If a matching <see cref="TagHelperAttribute"/> is not found, adds the 84/// The <see cref="TagHelperAttribute"/> to set. 86/// <remarks><paramref name="attribute"/>'s <see cref="TagHelperAttribute.Name"/> is compared 88public void SetAttribute(TagHelperAttribute attribute) 121bool ICollection<TagHelperAttribute>.IsReadOnly => false; 124/// Adds a <see cref="TagHelperAttribute"/> to the end of the collection with the specified 127/// <param name="name">The <see cref="TagHelperAttribute.Name"/> of the attribute to add.</param> 128/// <param name="value">The <see cref="TagHelperAttribute.Value"/> of the attribute to add.</param> 131var attribute = new TagHelperAttribute(name, value); 136public void Add(TagHelperAttribute attribute) 144public void Insert(int index, TagHelperAttribute attribute) 153/// <paramref name="attribute"/>s <see cref="TagHelperAttribute.Name"/> is compared case-insensitively. 155public bool Remove(TagHelperAttribute attribute) 169/// Removes all <see cref="TagHelperAttribute"/>s with <see cref="TagHelperAttribute.Name"/> matching 173/// The <see cref="TagHelperAttribute.Name"/> of <see cref="TagHelperAttribute"/>s to remove. 176/// <c>true</c> if at least 1 <see cref="TagHelperAttribute"/> was removed; otherwise, <c>false</c>.
TagHelpers\TagHelperOutput.cs (3)
296var attribute = Attributes[i]; 345var attribute = Attributes[i]; 400var attribute = Attributes[i];
Microsoft.AspNetCore.Razor.Runtime (6)
Properties\AssemblyInfo.cs (1)
18[assembly: TypeForwardedTo(typeof(TagHelperAttribute))]
Runtime\TagHelpers\TagHelperExecutionContext.cs (5)
127var attribute = new TagHelperAttribute(name, value, valueStyle); 134/// <param name="attribute">The <see cref="TagHelperAttribute"/> to track.</param> 135public void AddHtmlAttribute(TagHelperAttribute attribute) 153var attribute = new TagHelperAttribute(name, value, valueStyle); 161public void AddTagHelperAttribute(TagHelperAttribute attribute)