1 write to Attributes
Microsoft.AspNetCore.Razor (1)
TagHelpers\TagHelperOutput.cs (1)
50Attributes = attributes;
62 references to Attributes
Microsoft.AspNetCore.Mvc.Razor (2)
TagHelpers\UrlResolutionTagHelper.cs (2)
141/// <paramref name="output"/>'s <see cref="TagHelperOutput.Attributes"/> whose 151var attributes = output.Attributes;
Microsoft.AspNetCore.Mvc.TagHelpers (51)
AnchorTagHelper.cs (1)
169if (output.Attributes.ContainsName(Href))
FormActionTagHelper.cs (2)
184if (output.Attributes.ContainsName(FormAction)) 262output.Attributes.SetAttribute(FormAction, url);
FormTagHelper.cs (1)
169if (output.Attributes.TryGetAttribute(HtmlActionAttributeName, out var actionAttribute))
ImageTagHelper.cs (2)
125Src = output.Attributes[SrcAttributeName].Value as string; 128output.Attributes.SetAttribute(SrcAttributeName, src);
InputTagHelper.cs (3)
205if (!output.Attributes.ContainsName("type")) 207output.Attributes.SetAttribute("type", inputType); 345if (output.Attributes.TryGetAttribute("form", out var formAttribute))
LinkTagHelper.cs (7)
265Href = output.Attributes[HrefAttributeName]?.Value as string; 280var index = output.Attributes.IndexOfName(HrefAttributeName); 281var existingAttribute = output.Attributes[index]; 282output.Attributes[index] = new TagHelperAttribute( 294BuildGlobbedLinkTags(output.Attributes, builder); 303if (mode == Mode.Fallback && HasStyleSheetLinkType(output.Attributes)) 310BuildFallbackBlock(output.Attributes, builder);
OptionTagHelper.cs (2)
71if (!output.Attributes.ContainsName("selected")) 118output.Attributes.Add("selected", "selected");
ScriptTagHelper.cs (7)
272output.Attributes.SetAttribute("type", "importmap"); 293Src = output.Attributes[SrcAttributeName]?.Value as string; 307var index = output.Attributes.IndexOfName(SrcAttributeName); 308var existingAttribute = output.Attributes[index]; 309output.Attributes[index] = new TagHelperAttribute( 321BuildGlobbedScriptTags(output.Attributes, builder); 337BuildFallbackBlock(output.Attributes, builder);
TagHelperOutputExtensions.cs (25)
23/// <see cref="TagHelperOutput.Attributes"/>. 31/// <see cref="TagHelperOutput.Attributes"/> does not contain an attribute with the given 36/// or <paramref name="tagHelperOutput"/>'s <see cref="TagHelperOutput.Attributes"/> may result in copied 48if (!tagHelperOutput.Attributes.ContainsName(attributeName)) 83/// <remarks>Existing <see cref="TagHelperOutput.Attributes"/> on the given <paramref name="tagHelperOutput"/> 92if (!tagHelperOutput.Attributes.ContainsName(attribute.Key)) 94tagHelperOutput.Attributes.Add(attribute.Key, attribute.Value); 98var found = tagHelperOutput.Attributes.TryGetAttribute("class", out var classAttribute); 106tagHelperOutput.Attributes.SetAttribute(newAttribute); 113/// <see cref="TagHelperOutput.Attributes"/>. 126tagHelperOutput.Attributes.Remove(attribute); 132/// <see cref="TagHelperOutput.Attributes"/>. 156if (!tagHelperOutput.Attributes.TryGetAttribute("class", out TagHelperAttribute classAttribute)) 158tagHelperOutput.Attributes.Add("class", classValue); 185tagHelperOutput.Attributes.SetAttribute(newClassAttribute); 191/// <see cref="TagHelperOutput.Attributes"/>. 210if (!tagHelperOutput.Attributes.TryGetAttribute("class", out TagHelperAttribute classAttribute)) 226tagHelperOutput.Attributes.Remove(classAttribute); 249tagHelperOutput.Attributes.SetAttribute(classAttribute.Name, joinedClasses); 253tagHelperOutput.Attributes.Remove(classAttribute); 298var index = IndexOfFirstMatch(previousName, tagHelperOutput.Attributes); 301tagHelperOutput.Attributes.Insert(index + 1, existingAttribute); 313var index = IndexOfFirstMatch(nextName, tagHelperOutput.Attributes); 316tagHelperOutput.Attributes.Insert(index, existingAttribute); 322tagHelperOutput.Attributes.Add(existingAttribute);
ValidationMessageTagHelper.cs (1)
65output.Attributes.ContainsName(DataValidationForAttributeName))
Microsoft.AspNetCore.Razor (8)
TagHelpers\TagHelperOutput.cs (8)
188Attributes.Clear(); 293var count = Attributes.Count; 296var attribute = Attributes[i]; 342var count = Attributes.Count; 345var attribute = Attributes[i]; 378Attributes.Clear(); 397var count = Attributes.Count; 400var attribute = Attributes[i];
Microsoft.AspNetCore.Razor.Runtime (1)
Runtime\TagHelpers\TagHelperExecutionContext.cs (1)
139Output.Attributes.Add(attribute);