1 override of GetContent
Microsoft.AspNetCore.Razor (1)
TagHelpers\DefaultTagHelperContent.cs (1)
161
public override string
GetContent
() => GetContent(HtmlEncoder.Default);
292 references to GetContent
Microsoft.AspNetCore.Mvc.Razor.Test (2)
TagHelpers\TagHelperComponentTagHelperTest.cs (2)
181
Assert.Equal("Processed1", output.PostContent.
GetContent
());
214
Assert.Equal("Processed0Processed1Processed2", output.PostContent.
GetContent
());
Microsoft.AspNetCore.Mvc.TagHelpers (2)
OptionTagHelper.cs (1)
113
selected = currentValues.ValuesAndEncodedValues.Contains(childContent.
GetContent
());
ValidationMessageTagHelper.cs (1)
83
message = tagHelperContent.
GetContent
();
Microsoft.AspNetCore.Mvc.TagHelpers.Test (280)
AnchorTagHelperTest.cs (6)
83
Assert.Equal("Something", output.Content.
GetContent
());
134
Assert.Empty(output.Content.
GetContent
());
186
Assert.Empty(output.Content.
GetContent
());
244
Assert.Empty(output.Content.
GetContent
());
303
Assert.Empty(output.Content.
GetContent
());
361
Assert.Empty(output.Content.
GetContent
());
CacheTagHelperTest.cs (65)
56
Assert.Equal(childContent, tagHelperOutput.Content.
GetContent
());
83
Assert.Empty(tagHelperOutput.PreContent.
GetContent
());
84
Assert.Empty(tagHelperOutput.PostContent.
GetContent
());
86
Assert.Equal(childContent, tagHelperOutput.Content.
GetContent
());
112
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
113
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
115
Assert.Equal(childContent, tagHelperOutput1.Content.
GetContent
());
134
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
135
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
137
Assert.Equal(childContent, tagHelperOutput2.Content.
GetContent
());
162
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
163
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
165
Assert.Equal(childContent1, tagHelperOutput1.Content.
GetContent
());
184
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
185
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
187
Assert.Equal(childContent2, tagHelperOutput2.Content.
GetContent
());
245
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
246
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
248
Assert.Equal(childContent1, tagHelperOutput1.Content.
GetContent
());
347
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
348
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
350
Assert.Equal(childContent1, tagHelperOutput1.Content.
GetContent
());
369
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
370
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
372
Assert.Equal(childContent2, tagHelperOutput2.Content.
GetContent
());
400
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
401
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
403
Assert.Equal(childContent1, tagHelperOutput1.Content.
GetContent
());
422
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
423
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
425
Assert.Equal(childContent2, tagHelperOutput2.Content.
GetContent
());
453
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
454
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
456
Assert.Equal(childContent1, tagHelperOutput1.Content.
GetContent
());
475
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
476
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
478
Assert.Equal(childContent2, tagHelperOutput2.Content.
GetContent
());
525
Assert.Equal("HtmlEncode[[some-content]]", tagHelperOutput.Content.
GetContent
());
609
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
610
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
612
Assert.Equal(childContent, tagHelperOutput1.Content.
GetContent
());
614
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
615
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
617
Assert.Equal(childContent, tagHelperOutput2.Content.
GetContent
());
692
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
693
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
695
Assert.Empty(tagHelperOutput1.Content.
GetContent
());
697
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
698
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
700
Assert.Equal(childContent, tagHelperOutput2.Content.
GetContent
());
756
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
757
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
759
Assert.Empty(tagHelperOutput1.Content.
GetContent
());
768
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
769
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
771
Assert.Empty(tagHelperOutput2.Content.
GetContent
());
780
Assert.Empty(tagHelperOutput3.PreContent.
GetContent
());
781
Assert.Empty(tagHelperOutput3.PostContent.
GetContent
());
783
Assert.Equal(childContent, tagHelperOutput3.Content.
GetContent
());
792
Assert.Empty(tagHelperOutput4.PreContent.
GetContent
());
793
Assert.Empty(tagHelperOutput4.PostContent.
GetContent
());
795
Assert.Equal(childContent, tagHelperOutput4.Content.
GetContent
());
842
Assert.Equal(encoder.Encode(expected), tagHelperOutput1.Content.
GetContent
());
925
Assert.Equal(encoder.Encode(expected), tagHelperOutput1.Content.
GetContent
());
926
Assert.Equal(encoder.Encode(expected), tagHelperOutput2.Content.
GetContent
());
DistributedCacheTagHelperTest.cs (46)
63
Assert.Equal(childContent, tagHelperOutput.Content.
GetContent
());
106
Assert.Empty(tagHelperOutput.PreContent.
GetContent
());
107
Assert.Empty(tagHelperOutput.PostContent.
GetContent
());
109
Assert.Equal(childContent, tagHelperOutput.Content.
GetContent
());
155
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
156
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
158
Assert.Equal(childContent, tagHelperOutput1.Content.
GetContent
());
180
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
181
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
183
Assert.Equal(childContent, tagHelperOutput2.Content.
GetContent
());
214
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
215
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
217
Assert.Equal(childContent1, tagHelperOutput1.Content.
GetContent
());
238
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
239
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
241
Assert.Equal(childContent2, tagHelperOutput2.Content.
GetContent
());
377
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
378
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
380
Assert.Equal(childContent1, tagHelperOutput1.Content.
GetContent
());
401
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
402
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
404
Assert.Equal(childContent2, tagHelperOutput2.Content.
GetContent
());
439
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
440
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
442
Assert.Equal(childContent1, tagHelperOutput1.Content.
GetContent
());
463
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
464
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
466
Assert.Equal(childContent2, tagHelperOutput2.Content.
GetContent
());
501
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
502
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
504
Assert.Equal(childContent1, tagHelperOutput1.Content.
GetContent
());
525
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
526
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
528
Assert.Equal(childContent2, tagHelperOutput2.Content.
GetContent
());
612
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
613
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
615
Assert.Equal(childContent, tagHelperOutput1.Content.
GetContent
());
617
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
618
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
620
Assert.Equal(childContent, tagHelperOutput2.Content.
GetContent
());
704
Assert.Empty(tagHelperOutput1.PreContent.
GetContent
());
705
Assert.Empty(tagHelperOutput1.PostContent.
GetContent
());
707
Assert.Empty(tagHelperOutput1.Content.
GetContent
());
709
Assert.Empty(tagHelperOutput2.PreContent.
GetContent
());
710
Assert.Empty(tagHelperOutput2.PostContent.
GetContent
());
712
Assert.Equal(childContent, tagHelperOutput2.Content.
GetContent
());
EnvironmentTagHelperTest.cs (6)
147
Assert.Empty(output.PreContent.
GetContent
());
148
Assert.True(output.Content.
GetContent
().Length == 0);
149
Assert.Empty(output.PostContent.
GetContent
());
180
Assert.Empty(output.PreContent.
GetContent
());
181
Assert.True(output.Content.
GetContent
().Length == 0);
182
Assert.Empty(output.PostContent.
GetContent
());
FormActionTagHelperTest.cs (4)
251
Assert.Empty(output.Content.
GetContent
());
309
Assert.Empty(output.Content.
GetContent
());
382
Assert.Empty(output.Content.
GetContent
());
435
Assert.Empty(output.Content.
GetContent
());
FormTagHelperTest.cs (49)
119
Assert.Empty(output.PreContent.
GetContent
());
120
Assert.True(output.Content.
GetContent
().Length == 0);
121
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
173
Assert.Empty(output.PreContent.
GetContent
());
174
Assert.True(output.Content.
GetContent
().Length == 0);
175
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
229
Assert.Empty(output.PreElement.
GetContent
());
230
Assert.Empty(output.PreContent.
GetContent
());
231
Assert.Empty(output.Content.
GetContent
());
232
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
233
Assert.Empty(output.PostElement.
GetContent
());
287
Assert.Empty(output.PreElement.
GetContent
());
288
Assert.Empty(output.PreContent.
GetContent
());
289
Assert.Empty(output.Content.
GetContent
());
290
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
291
Assert.Empty(output.PostElement.
GetContent
());
363
Assert.Empty(output.PreContent.
GetContent
());
364
Assert.True(output.Content.
GetContent
().Length == 0);
365
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
427
Assert.Empty(output.PreContent.
GetContent
());
428
Assert.True(output.Content.
GetContent
().Length == 0);
429
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
498
Assert.Empty(output.PreContent.
GetContent
());
499
Assert.True(output.Content.
GetContent
().Length == 0);
500
Assert.Empty(output.PostContent.
GetContent
());
550
Assert.Empty(output.PreElement.
GetContent
());
551
Assert.Empty(output.PreContent.
GetContent
());
552
Assert.True(output.Content.
GetContent
().Length == 0);
553
Assert.Empty(output.PostContent.
GetContent
());
674
Assert.Empty(output.PreElement.
GetContent
());
675
Assert.Empty(output.PreContent.
GetContent
());
676
Assert.True(output.Content.
GetContent
().Length == 0);
677
Assert.Empty(output.PostContent.
GetContent
());
731
Assert.Empty(output.PreElement.
GetContent
());
732
Assert.Empty(output.PreContent.
GetContent
());
733
Assert.True(output.Content.
GetContent
().Length == 0);
734
Assert.Empty(output.PostContent.
GetContent
());
789
Assert.Empty(output.PreElement.
GetContent
());
790
Assert.Empty(output.PreContent.
GetContent
());
791
Assert.True(output.Content.
GetContent
().Length == 0);
792
Assert.Empty(output.PostContent.
GetContent
());
843
Assert.Empty(output.PreElement.
GetContent
());
844
Assert.Empty(output.PreContent.
GetContent
());
845
Assert.True(output.Content.
GetContent
().Length == 0);
846
Assert.Empty(output.PostContent.
GetContent
());
847
Assert.Empty(output.PostElement.
GetContent
());
1001
Assert.Empty(output.PreContent.
GetContent
());
1002
Assert.True(output.Content.
GetContent
().Length == 0);
1003
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
ImageTagHelperTest.cs (4)
157
Assert.True(output.Content.
GetContent
().Length == 0);
209
Assert.True(output.Content.
GetContent
().Length == 0);
252
Assert.True(output.Content.
GetContent
().Length == 0);
284
Assert.True(output.Content.
GetContent
().Length == 0);
InputTagHelperTest.cs (38)
245
Assert.Equal(expectedPostElement, output.PostElement.
GetContent
());
687
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
688
Assert.Equal(expectedContent, output.Content.
GetContent
());
689
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
758
Assert.Empty(output.PreContent.
GetContent
());
759
Assert.Empty(output.Content.
GetContent
());
760
Assert.Empty(output.PostContent.
GetContent
());
829
Assert.Empty(output.PreContent.
GetContent
());
830
Assert.Empty(output.Content.
GetContent
());
831
Assert.Empty(output.PostContent.
GetContent
());
902
Assert.Equal(expectedPostElement, output.PostElement.
GetContent
());
1210
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
1213
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
1214
Assert.Equal(expectedPostElement, output.PostElement.
GetContent
());
1316
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
1317
Assert.Equal(expectedContent, output.Content.
GetContent
());
1318
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
1481
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
1482
Assert.Equal(expectedContent, output.Content.
GetContent
());
1483
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
1576
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
1577
Assert.Equal(expectedContent, output.Content.
GetContent
());
1578
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
1694
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
1695
Assert.Equal(expectedContent, output.Content.
GetContent
());
1696
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
1810
Assert.Empty(output.PreContent.
GetContent
());
1811
Assert.Equal(string.Empty, output.Content.
GetContent
());
1812
Assert.Empty(output.PostContent.
GetContent
());
1879
Assert.Empty(output.PreContent.
GetContent
());
1880
Assert.Equal(string.Empty, output.Content.
GetContent
());
1881
Assert.Empty(output.PostContent.
GetContent
());
1948
Assert.Empty(output.PreContent.
GetContent
());
1949
Assert.Equal(string.Empty, output.Content.
GetContent
());
1950
Assert.Empty(output.PostContent.
GetContent
());
2042
Assert.Empty(output.PreContent.
GetContent
());
2043
Assert.Equal(string.Empty, output.Content.
GetContent
());
2044
Assert.Empty(output.PostContent.
GetContent
());
LabelTagHelperTest.cs (2)
219
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
223
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
LinkTagHelperTest.cs (5)
406
Assert.True(output.Content.
GetContent
().Length == 0);
543
Assert.True(output.PostElement.
GetContent
().Length == 0);
562
Assert.True(output.PostElement.
GetContent
().Length == 0);
885
Assert.Equal(expectedPostElement, output.PostElement.
GetContent
());
940
Assert.Equal(expectedPostElement, output.PostElement.
GetContent
());
OptionTagHelperTest.cs (2)
437
Assert.Equal(expectedTagHelperOutput.Content.
GetContent
(), output.Content.
GetContent
());
RenderAtEndOfFormTagHelperTest.cs (2)
77
Assert.Equal(expectedOutput, tagHelperOutput.PostContent.
GetContent
());
117
Assert.Equal(expectedOutput, tagHelperExecutionContext.Output.PostContent.
GetContent
());
ScriptTagHelperTest.cs (7)
382
Assert.True(output.Content.
GetContent
().Length == 0);
471
Assert.True(output.PostElement.
GetContent
().Length == 0);
491
Assert.True(output.PostElement.
GetContent
().Length == 0);
751
Assert.Equal(importMap.ToJson(), output.Content.
GetContent
());
794
Assert.Equal(importMap.ToJson(), output.Content.
GetContent
());
864
"</script>]]\"));</script>", output.PostElement.
GetContent
());
896
"</script>]]\"));</script>", output.PostElement.
GetContent
());
SelectTagHelperTest.cs (9)
241
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
242
Assert.Equal(expectedContent, output.Content.
GetContent
());
243
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
340
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
341
Assert.Equal(expectedContent, output.Content.
GetContent
());
421
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
422
Assert.Equal(expectedContent, output.Content.
GetContent
());
520
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
521
Assert.Equal(expectedContent, output.Content.
GetContent
());
ValidationMessageTagHelperTest.cs (11)
82
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
83
Assert.Equal(expectedContent, output.Content.
GetContent
());
84
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
285
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
286
Assert.Equal(expectedContent, output.Content.
GetContent
());
287
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
351
Assert.Equal(expectedOutputContent, output.Content.
GetContent
());
413
Assert.Equal(expectedOutputContent, output.Content.
GetContent
());
450
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
451
Assert.Equal(expectedContent, output.Content.
GetContent
());
452
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
ValidationSummaryTagHelperTest.cs (24)
87
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
88
Assert.Equal(expectedContent, output.Content.
GetContent
());
91
output.PostContent.
GetContent
());
261
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
262
Assert.Equal(expectedContent, output.Content.
GetContent
());
265
output.PostContent.
GetContent
());
326
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
327
Assert.Equal(expectedContent, output.Content.
GetContent
());
331
output.PostContent.
GetContent
());
387
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
388
Assert.Equal(expectedContent, output.Content.
GetContent
());
389
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
459
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
460
Assert.Equal(expectedContent, output.Content.
GetContent
());
461
Assert.Equal("Content of validation summaryNew HTML", output.PostContent.
GetContent
());
502
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
503
Assert.Equal(expectedContent, output.Content.
GetContent
());
504
Assert.Equal(expectedPostContent, output.PostContent.
GetContent
());
558
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
559
Assert.Equal(expectedContent, output.Content.
GetContent
());
560
Assert.Equal("Content of validation messageNew HTML", output.PostContent.
GetContent
());
639
Assert.Equal(expectedPreContent, output.PreContent.
GetContent
());
640
Assert.Equal(expectedContent, output.Content.
GetContent
());
643
output.PostContent.
GetContent
());
Microsoft.AspNetCore.Razor.Runtime.Test (1)
Runtime\TagHelpers\TagHelperExecutionContextTest.cs (1)
84
Assert.Equal(content, executionContext.Output.Content.
GetContent
());
Microsoft.AspNetCore.Razor.Test (6)
TagHelpers\TagHelperOutputTest.cs (6)
51
var content = getChildContent.
GetContent
();
1080
Assert.Equal(string.Empty, output.PreElement.
GetContent
());
1081
Assert.Equal(string.Empty, output.PreContent.
GetContent
());
1082
Assert.Equal(string.Empty, output.Content.
GetContent
());
1083
Assert.Equal(string.Empty, output.PostContent.
GetContent
());
1084
Assert.Equal(string.Empty, output.PostElement.
GetContent
());
TagHelpersWebSite (1)
TagHelpers\AutoLinkerTagHelper.cs (1)
18
childContent.
GetContent
(),