16 writes to Writer
Microsoft.AspNetCore.Mvc.Razor (8)
RazorPageBase.cs (6)
232
viewContext.
Writer
= new ViewBufferTextWriter(buffer, viewContext.Writer.Encoding);
254
ViewContext.
Writer
= scopeInfo.Writer;
286
viewContext.
Writer
= _valueBuffer;
310
ViewContext.
Writer
= _pageWriter;
327
viewContext.
Writer
= writer;
339
viewContext.
Writer
= writer;
RazorView.cs (2)
117
context.
Writer
= writer;
133
context.
Writer
= oldWriter;
Microsoft.AspNetCore.Mvc.Razor.Test (4)
RazorPageTest.cs (4)
1284
page.ViewContext.
Writer
= defaultWriter;
1308
page.ViewContext.
Writer
= defaultWriter;
1323
page.ViewContext.
Writer
= defaultWriter;
1366
page.ViewContext.
Writer
= writer;
Microsoft.AspNetCore.Mvc.ViewFeatures (4)
Rendering\ViewContext.cs (2)
66
Writer
= writer;
108
Writer
= writer;
ViewExecutor.cs (2)
213
viewContext.
Writer
= writer;
223
viewContext.
Writer
= oldWriter;
161 references to Writer
HtmlGenerationWebSite (2)
Components\CheckViewData - LackModel.cs (1)
15
var writer = ViewContext.
Writer
;
Components\CheckViewData.cs (1)
14
var writer = ViewContext.
Writer
;
Microsoft.AspNetCore.Mvc.Razor (15)
IRazorPage.cs (1)
55
/// Renders the page and writes the output to the <see cref="ViewContext.
Writer
"/>.
RazorPageBase.cs (7)
68
return viewContext.
Writer
;
215
/// All writes to the <see cref="Output"/> or <see cref="ViewContext.
Writer
"/> after calling this method will
222
TagHelperScopes.Push(new TagHelperScopeInfo(buffer, HtmlEncoder, viewContext.
Writer
));
232
viewContext.Writer = new ViewBufferTextWriter(buffer, viewContext.
Writer
.Encoding);
263
/// All writes to the <see cref="Output"/> or <see cref="ViewContext.
Writer
"/> after calling this method will
277
_pageWriter = viewContext.
Writer
;
326
_textWriterStack.Push(viewContext.
Writer
);
RazorView.cs (7)
94
var writer = context.
Writer
as ViewBufferTextWriter;
102
writer = new ViewBufferTextWriter(buffer, context.
Writer
.Encoding, _htmlEncoder, context.
Writer
);
109
writer = new ViewBufferTextWriter(buffer, context.
Writer
.Encoding);
114
var oldWriter = context.
Writer
;
252
if (context.
Writer
is ViewBufferTextWriter viewBufferTextWriter)
261
await using (var writer = _bufferScope!.CreateWriter(context.
Writer
))
Microsoft.AspNetCore.Mvc.Razor.Test (22)
RazorPageTest.cs (4)
41
v.ViewContext.
Writer
.Write("Hello from view context writer");
1275
Assert.Same(writer, page.ViewContext.
Writer
);
1292
Assert.Same(writer, page.ViewContext.
Writer
);
1299
Assert.Same(defaultWriter, page.ViewContext.
Writer
);
RazorViewTest.cs (18)
46
var expected = viewContext.
Writer
;
54
Assert.Equal("HtmlEncode[[Hello world]]", viewContext.
Writer
.ToString());
77
var expectedWriter = viewContext.
Writer
;
92
Assert.Same(expectedWriter, viewContext.
Writer
);
120
var expectedWriter = viewContext.
Writer
;
196
var expectedWriter = viewContext.
Writer
;
276
Assert.Equal(expected, viewContext.
Writer
.ToString());
296
var original = viewContext.
Writer
;
322
var original = viewContext.
Writer
;
710
Assert.Equal(expected, viewContext.
Writer
.ToString());
816
Assert.Equal(expected, viewContext.
Writer
.ToString());
885
Assert.Equal(expected, viewContext.
Writer
.ToString());
1120
Assert.Equal(expected, viewContext.
Writer
.ToString());
1194
Assert.Equal(expected, viewContext.
Writer
.ToString());
1359
Assert.Equal(expected, viewContext.
Writer
.ToString());
1417
Assert.Equal(expected, viewContext.
Writer
.ToString());
1472
Assert.Equal(expected, viewContext.
Writer
.ToString());
1740
Assert.Equal(expected, viewContext.
Writer
.ToString());
Microsoft.AspNetCore.Mvc.TagHelpers.Test (9)
PartialTagHelperTest.cs (9)
162
v.
Writer
.Write(expected);
200
v.
Writer
.Write(expected);
241
v.
Writer
.Write(v.ViewData["key"]);
285
v.
Writer
.Write(v.ViewData["key"]);
619
v.
Writer
.Write(expected);
661
v.
Writer
.Write(expected);
669
v.
Writer
.Write("Hello from fallback partial!");
763
v.
Writer
.Write(expected);
807
v.
Writer
.Write(expected);
Microsoft.AspNetCore.Mvc.ViewFeatures (43)
HtmlHelper.cs (5)
465
return RenderPartialCoreAsync(partialViewName, model, viewData, ViewContext.
Writer
);
894
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
914
tagBuilder.WriteTo(ViewContext.
Writer
, _htmlEncoder);
952
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
970
tagBuilder.WriteTo(ViewContext.
Writer
, _htmlEncoder);
Rendering\HtmlHelperFormExtensions.cs (19)
20
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
50
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
76
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
106
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
145
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
180
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
206
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
242
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
273
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
311
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
348
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
384
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
419
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
443
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
472
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
503
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
531
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
566
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
600
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
Rendering\HtmlHelperPartialExtensions.cs (7)
180
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
196
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
215
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
232
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
256
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
278
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
301
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
Rendering\IHtmlHelper.cs (4)
122
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
158
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
340
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
578
/// In this context, "renders" means the method writes its output using <see cref="ViewContext.
Writer
"/>.
Rendering\MvcForm.cs (3)
59
_viewContext.
Writer
.Write("</form>");
71
if (_viewContext.
Writer
is ViewBufferTextWriter viewBufferWriter)
82
content.WriteTo(_viewContext.
Writer
, _htmlEncoder);
TemplateRenderer.cs (2)
116
using (var writer = new ViewBufferTextWriter(viewBuffer, _viewContext.
Writer
.Encoding))
244
var newViewContext = new ViewContext(viewContext, viewContext.View, viewData, viewContext.
Writer
);
ViewComponents\DefaultViewComponentHelper.cs (1)
134
using (var writer = new ViewBufferTextWriter(viewBuffer, _viewContext.
Writer
.Encoding))
ViewComponents\ViewComponentContext.cs (1)
119
public TextWriter Writer => ViewContext.
Writer
;
ViewExecutor.cs (1)
210
var oldWriter = viewContext.
Writer
;
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (70)
Rendering\DefaultTemplatesUtilities.cs (1)
311
await v.
Writer
.WriteAsync(FormatOutput(v.ViewData.ModelExplorer));
Rendering\HtmlHelperDisplayExtensionsTest.cs (13)
52
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData["SomeProperty"].ToString()))
135
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData.TemplateInfo.FormattedModelValue.ToString()))
161
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData.TemplateInfo.FormattedModelValue.ToString()))
187
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData["SomeProperty"].ToString()))
215
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData.TemplateInfo.HtmlFieldPrefix))
243
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData["SomeProperty"].ToString()))
290
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData["SomeProperty"].ToString()))
321
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData.TemplateInfo.FormattedModelValue.ToString()))
362
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData.TemplateInfo.FormattedModelValue.ToString()))
387
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData.TemplateInfo.HtmlFieldPrefix))
415
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData["SomeProperty"].ToString()))
462
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData["SomeProperty"].ToString()))
489
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData.TemplateInfo.HtmlFieldPrefix))
Rendering\HtmlHelperEditorExtensionsTest.cs (2)
19
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData.TemplateInfo.FormattedModelValue.ToString()))
45
.Callback((ViewContext v) => v.
Writer
.WriteAsync(v.ViewData.TemplateInfo.FormattedModelValue.ToString()))
Rendering\HtmlHelperFormExtensionsTest.cs (27)
297
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
334
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
367
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
409
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
453
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
493
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
529
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
567
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
607
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
648
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
693
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
739
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
785
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
827
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
871
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
914
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
952
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
986
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
1023
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
1061
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
1095
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
1134
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
1177
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
1221
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
1265
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
1305
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
1346
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
Rendering\HtmlHelperFormTest.cs (17)
131
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
181
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
243
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
293
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
321
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.ViewContext.
Writer
);
343
var writer = viewContext.
Writer
as StringWriter;
390
var writer = viewContext.
Writer
as StringWriter;
428
var writer = viewContext.
Writer
as StringWriter;
467
var writer = viewContext.
Writer
as StringWriter;
505
var writer = viewContext.
Writer
as StringWriter;
545
var writer = viewContext.
Writer
as StringWriter;
584
var writer = viewContext.
Writer
as StringWriter;
624
var writer = viewContext.
Writer
as StringWriter;
661
var writer = viewContext.
Writer
as StringWriter;
704
var writer = viewContext.
Writer
as StringWriter;
746
var writer = viewContext.
Writer
as StringWriter;
790
var writer = viewContext.
Writer
as StringWriter;
Rendering\ViewContextTests.cs (1)
78
Assert.Same(writer, context.
Writer
);
ViewComponents\ViewComponentContextTest.cs (3)
48
Assert.Same(viewContext.
Writer
, viewComponentContext.ViewContext.
Writer
);
53
Assert.Same(viewComponentContext.ViewContext.
Writer
, viewComponentContext.Writer);
ViewExecutorTest.cs (6)
87
v.
Writer
.Write("xyz");
129
await v.
Writer
.WriteAsync("abcd");
184
await v.
Writer
.WriteAsync("abcd");
221
await v.
Writer
.WriteAsync("abcd");
256
await v.
Writer
.WriteAsync("abcd");
342
await v.
Writer
.WriteAsync(text);