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