4 writes to Content
Microsoft.AspNetCore.Mvc.Razor.Test (3)
RazorPageTest.cs (3)
298outputLevel1.Content = await outputLevel1.GetChildContentAsync(); 346outputLevel2.Content = await outputLevel2.GetChildContentAsync(); 362outputLevel1.Content = await outputLevel1.GetChildContentAsync();
Microsoft.AspNetCore.Razor.Test (1)
TagHelpers\TagHelperOutputTest.cs (1)
33Content = initialOutputChildContent,
210 references to Content
BasicWebSite (1)
RequestScopedTagHelper.cs (1)
19output.Content.SetContent(RequestIdService.RequestId);
ControllersFromServicesWebSite (1)
TagHelpers\InServicesTagHelper.cs (1)
22output.Content.SetContent(_value.Value.ToString(CultureInfo.InvariantCulture));
Microsoft.AspNetCore.Mvc.TagHelpers (14)
CacheTagHelper.cs (1)
87output.Content.SetHtmlContent(content);
ComponentTagHelper.cs (1)
104output.Content.SetHtmlContent(result);
DistributedCacheTagHelper.cs (1)
73output.Content.SetHtmlContent(content);
InputTagHelper.cs (1)
269output.Content.AppendHtml(tagBuilder.InnerHtml);
LabelTagHelper.cs (2)
78output.Content.SetHtmlContent(tagBuilder.InnerHtml); 83output.Content.SetHtmlContent(childContent);
LinkTagHelper.cs (1)
299output.Content.SetHtmlContent(HtmlString.Empty);
OptionTagHelper.cs (1)
106childContent = output.Content;
PartialTagHelper.cs (1)
145output.Content.SetHtmlContent(viewBuffer);
PersistComponentStateTagHelper.cs (1)
57output.Content.SetHtmlContent(content);
ScriptTagHelper.cs (2)
258output.Content.SetHtmlContent(importMap.ToString()); 312output.Content.SetContent(string.Empty);
TextAreaTagHelper.cs (1)
97output.Content.SetHtmlContent(tagBuilder.InnerHtml);
ValidationMessageTagHelper.cs (1)
101output.Content.SetHtmlContent(tagBuilder.InnerHtml);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (167)
AnchorTagHelperTest.cs (14)
49output.Content.SetContent("Something"); 83Assert.Equal("Something", output.Content.GetContent()); 106output.Content.SetContent(string.Empty); 134Assert.Empty(output.Content.GetContent()); 156output.Content.SetContent(string.Empty); 186Assert.Empty(output.Content.GetContent()); 208output.Content.SetContent(string.Empty); 244Assert.Empty(output.Content.GetContent()); 266output.Content.SetContent(string.Empty); 303Assert.Empty(output.Content.GetContent()); 325output.Content.SetContent(string.Empty); 361Assert.Empty(output.Content.GetContent()); 383output.Content.SetContent(string.Empty); 434output.Content.SetContent(string.Empty);
CacheTagHelperTest.cs (25)
56Assert.Equal(childContent, tagHelperOutput.Content.GetContent()); 86Assert.Equal(childContent, tagHelperOutput.Content.GetContent()); 115Assert.Equal(childContent, tagHelperOutput1.Content.GetContent()); 137Assert.Equal(childContent, tagHelperOutput2.Content.GetContent()); 165Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 187Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 248Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 350Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 372Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 403Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 425Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 456Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 478Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 525Assert.Equal("HtmlEncode[[some-content]]", tagHelperOutput.Content.GetContent()); 612Assert.Equal(childContent, tagHelperOutput1.Content.GetContent()); 617Assert.Equal(childContent, tagHelperOutput2.Content.GetContent()); 695Assert.Empty(tagHelperOutput1.Content.GetContent()); 700Assert.Equal(childContent, tagHelperOutput2.Content.GetContent()); 759Assert.Empty(tagHelperOutput1.Content.GetContent()); 771Assert.Empty(tagHelperOutput2.Content.GetContent()); 783Assert.Equal(childContent, tagHelperOutput3.Content.GetContent()); 795Assert.Equal(childContent, tagHelperOutput4.Content.GetContent()); 842Assert.Equal(encoder.Encode(expected), tagHelperOutput1.Content.GetContent()); 925Assert.Equal(encoder.Encode(expected), tagHelperOutput1.Content.GetContent()); 926Assert.Equal(encoder.Encode(expected), tagHelperOutput2.Content.GetContent());
ComponentTagHelperTest.cs (1)
40var content = await prerenderer.Dispatcher.InvokeAsync(() => HtmlContentUtilities.HtmlContentToString(output.Content));
DistributedCacheTagHelperTest.cs (16)
63Assert.Equal(childContent, tagHelperOutput.Content.GetContent()); 109Assert.Equal(childContent, tagHelperOutput.Content.GetContent()); 158Assert.Equal(childContent, tagHelperOutput1.Content.GetContent()); 183Assert.Equal(childContent, tagHelperOutput2.Content.GetContent()); 217Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 241Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 380Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 404Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 442Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 466Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 504Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 528Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 615Assert.Equal(childContent, tagHelperOutput1.Content.GetContent()); 620Assert.Equal(childContent, tagHelperOutput2.Content.GetContent()); 707Assert.Empty(tagHelperOutput1.Content.GetContent()); 712Assert.Equal(childContent, tagHelperOutput2.Content.GetContent());
EnvironmentTagHelperTest.cs (2)
148Assert.True(output.Content.GetContent().Length == 0); 181Assert.True(output.Content.GetContent().Length == 0);
FormActionTagHelperTest.cs (4)
251Assert.Empty(output.Content.GetContent()); 309Assert.Empty(output.Content.GetContent()); 382Assert.Empty(output.Content.GetContent()); 435Assert.Empty(output.Content.GetContent());
FormTagHelperTest.cs (13)
120Assert.True(output.Content.GetContent().Length == 0); 174Assert.True(output.Content.GetContent().Length == 0); 231Assert.Empty(output.Content.GetContent()); 289Assert.Empty(output.Content.GetContent()); 364Assert.True(output.Content.GetContent().Length == 0); 428Assert.True(output.Content.GetContent().Length == 0); 499Assert.True(output.Content.GetContent().Length == 0); 552Assert.True(output.Content.GetContent().Length == 0); 676Assert.True(output.Content.GetContent().Length == 0); 733Assert.True(output.Content.GetContent().Length == 0); 791Assert.True(output.Content.GetContent().Length == 0); 845Assert.True(output.Content.GetContent().Length == 0); 1002Assert.True(output.Content.GetContent().Length == 0);
ImageTagHelperTest.cs (4)
157Assert.True(output.Content.GetContent().Length == 0); 209Assert.True(output.Content.GetContent().Length == 0); 252Assert.True(output.Content.GetContent().Length == 0); 284Assert.True(output.Content.GetContent().Length == 0);
InputTagHelperTest.cs (24)
97output.Content.AppendHtml(originalContent); 106Assert.Equal(originalContent, HtmlContentUtilities.HtmlContentToString(output.Content)); 144output.Content.AppendHtml(content); 191output.Content.AppendHtml(content); 235output.Content.AppendHtml(content); 243Assert.Equal(content, HtmlContentUtilities.HtmlContentToString(output.Content)); 662output.Content.SetContent(expectedContent); 688Assert.Equal(expectedContent, output.Content.GetContent()); 759Assert.Empty(output.Content.GetContent()); 830Assert.Empty(output.Content.GetContent()); 1175output.Content.AppendHtml(originalContent); 1211Assert.Equal(originalContent, HtmlContentUtilities.HtmlContentToString(output.Content)); 1275output.Content.SetContent(expectedContent); 1317Assert.Equal(expectedContent, output.Content.GetContent()); 1441output.Content.SetContent(expectedContent); 1482Assert.Equal(expectedContent, output.Content.GetContent()); 1541output.Content.SetContent(expectedContent); 1577Assert.Equal(expectedContent, output.Content.GetContent()); 1653output.Content.SetContent(expectedContent); 1695Assert.Equal(expectedContent, output.Content.GetContent()); 1811Assert.Equal(string.Empty, output.Content.GetContent()); 1880Assert.Equal(string.Empty, output.Content.GetContent()); 1949Assert.Equal(string.Empty, output.Content.GetContent()); 2043Assert.Equal(string.Empty, output.Content.GetContent());
LabelTagHelperTest.cs (3)
208output.Content.AppendHtml(tagHelperOutputContent.OriginalContent); 222HtmlContentUtilities.HtmlContentToString(output.Content)); 328Assert.Equal(expectedContent, HtmlContentUtilities.HtmlContentToString(output.Content));
LinkTagHelperTest.cs (1)
406Assert.True(output.Content.GetContent().Length == 0);
OptionTagHelperTest.cs (6)
417output.Content.SetContent(originalContent); 437Assert.Equal(expectedTagHelperOutput.Content.GetContent(), output.Content.GetContent()); 488output.Content.SetContent(originalContent); 553output.Content.SetContent(originalContent); 577tagHelperOutput.Content.SetContent(content);
PartialTagHelperTest.cs (8)
182var content = HtmlContentUtilities.HtmlContentToString(output.Content, new HtmlTestEncoder()); 223var content = HtmlContentUtilities.HtmlContentToString(output.Content, new HtmlTestEncoder()); 264var content = HtmlContentUtilities.HtmlContentToString(output.Content, new HtmlTestEncoder()); 306var content = HtmlContentUtilities.HtmlContentToString(output.Content, new HtmlTestEncoder()); 642var content = HtmlContentUtilities.HtmlContentToString(output.Content, new HtmlTestEncoder()); 692var content = HtmlContentUtilities.HtmlContentToString(output.Content, new HtmlTestEncoder()); 788var content = HtmlContentUtilities.HtmlContentToString(output.Content, new HtmlTestEncoder()); 834var content = HtmlContentUtilities.HtmlContentToString(output.Content, new HtmlTestEncoder());
PersistComponentStateTagHelperTest.cs (7)
49var content = HtmlContentUtilities.HtmlContentToString(output.Content); 71var content = HtmlContentUtilities.HtmlContentToString(output.Content); 99var content = HtmlContentUtilities.HtmlContentToString(output.Content); 129var content = HtmlContentUtilities.HtmlContentToString(output.Content); 159var content = HtmlContentUtilities.HtmlContentToString(output.Content); 183var content = HtmlContentUtilities.HtmlContentToString(output.Content); 212var content = HtmlContentUtilities.HtmlContentToString(output.Content);
ScriptTagHelperTest.cs (3)
382Assert.True(output.Content.GetContent().Length == 0); 751Assert.Equal(importMap.ToJson(), output.Content.GetContent()); 794Assert.Equal(importMap.ToJson(), output.Content.GetContent());
SelectTagHelperTest.cs (8)
217output.Content.SetContent(expectedContent); 242Assert.Equal(expectedContent, output.Content.GetContent()); 307output.Content.AppendHtml(expectedContent); 341Assert.Equal(expectedContent, output.Content.GetContent()); 398output.Content.AppendHtml(expectedContent); 422Assert.Equal(expectedContent, output.Content.GetContent()); 487output.Content.AppendHtml(expectedContent); 521Assert.Equal(expectedContent, output.Content.GetContent());
TextAreaTagHelperTest.cs (3)
142output.Content.SetContent("original content"); 153Assert.Equal(expectedContent, HtmlContentUtilities.HtmlContentToString(output.Content)); 228Assert.Equal(expectedContent, HtmlContentUtilities.HtmlContentToString(output.Content));
ValidationMessageTagHelperTest.cs (9)
60output.Content.SetContent(expectedContent); 83Assert.Equal(expectedContent, output.Content.GetContent()); 274output.Content.SetContent(expectedContent); 286Assert.Equal(expectedContent, output.Content.GetContent()); 329output.Content.AppendHtml(outputContent); 351Assert.Equal(expectedOutputContent, output.Content.GetContent()); 413Assert.Equal(expectedOutputContent, output.Content.GetContent()); 431output.Content.SetContent(expectedContent); 451Assert.Equal(expectedContent, output.Content.GetContent());
ValidationSummaryTagHelperTest.cs (16)
71output.Content.SetContent(expectedContent); 88Assert.Equal(expectedContent, output.Content.GetContent()); 239output.Content.SetContent(expectedContent); 262Assert.Equal(expectedContent, output.Content.GetContent()); 309output.Content.SetContent(expectedContent); 327Assert.Equal(expectedContent, output.Content.GetContent()); 370output.Content.SetContent(expectedContent); 388Assert.Equal(expectedContent, output.Content.GetContent()); 425output.Content.SetContent(expectedContent); 460Assert.Equal(expectedContent, output.Content.GetContent()); 484output.Content.SetContent(expectedContent); 503Assert.Equal(expectedContent, output.Content.GetContent()); 540output.Content.SetContent(expectedContent); 559Assert.Equal(expectedContent, output.Content.GetContent()); 625output.Content.SetContent(expectedContent); 640Assert.Equal(expectedContent, output.Content.GetContent());
Microsoft.AspNetCore.Razor (2)
TagHelpers\TagHelperOutput.cs (2)
154/// <c>true</c> if <see cref="Content"/> has been set, <c>false</c> otherwise. 204/// <see cref="Content"/>, <see cref="PostContent"/>, and <see cref="PostElement"/> to suppress output.
Microsoft.AspNetCore.Razor.Runtime (3)
Runtime\TagHelpers\TagHelperExecutionContext.cs (3)
200/// sets <see cref="Output"/>'s <see cref="TagHelperOutput.Content"/> to the rendered results. 203/// <see cref="TagHelperOutput.Content"/> to the children's rendered content.</returns> 223Output.Content.SetHtmlContent(childContent);
Microsoft.AspNetCore.Razor.Runtime.Test (1)
Runtime\TagHelpers\TagHelperExecutionContextTest.cs (1)
84Assert.Equal(content, executionContext.Output.Content.GetContent());
Microsoft.AspNetCore.Razor.Test (15)
TagHelpers\TagHelperOutputTest.cs (15)
215Assert.NotNull(tagHelperOutput.Content); 233Assert.NotNull(tagHelperOutput.Content); 274Assert.NotNull(tagHelperOutput.Content); 287tagHelperOutput.Content.SetContent("Hello World"); 292Assert.NotNull(tagHelperOutput.Content); 297tagHelperOutput.Content.GetContent(new HtmlTestEncoder())); 310Assert.NotNull(tagHelperOutput.Content); 324tagHelperOutput.Content.Append("Content"); 336Assert.NotNull(tagHelperOutput.Content); 337Assert.Empty(tagHelperOutput.Content.GetContent(new HtmlTestEncoder())); 357tagHelperOutput.Content.Append("Content"); 368Assert.NotNull(tagHelperOutput.Content); 369Assert.Empty(tagHelperOutput.Content.GetContent(new HtmlTestEncoder())); 1082Assert.Equal(string.Empty, output.Content.GetContent()); 1121output.Content.AppendHtml(content);
TagHelpersWebSite (6)
TagHelpers\AutoLinkerTagHelper.cs (1)
17output.Content.AppendHtml(Regex.Replace(
TagHelpers\DefaultEncoderTagHelper.cs (1)
19output.Content
TagHelpers\DictionaryPrefixTestTagHelper.cs (1)
29output.Content.SetHtmlContent(ulTag);
TagHelpers\NestedViewImportsTagHelper.cs (1)
13output.Content.AppendHtml("nested-content");
TagHelpers\RootViewStartTagHelper.cs (1)
13output.Content.AppendHtml("root-content");
TagHelpers\TagCloudViewComponentTagHelper.cs (1)
64output.Content.AppendHtml(writer.ToString());