Implemented interface member:
property
ViewContext
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.ViewContext
1 write to ViewContext
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
HtmlHelper.cs (1)
185
ViewContext
= viewContext;
276 references to ViewContext
Microsoft.AspNetCore.Mvc.ViewFeatures (48)
HtmlHelper.cs (46)
87
get =>
ViewContext
.Html5DateRenderingMode;
88
set =>
ViewContext
.Html5DateRenderingMode = value;
110
public dynamic ViewBag =>
ViewContext
.ViewBag;
113
public ViewDataDictionary ViewData =>
ViewContext
.ViewData;
116
public ITempDataDictionary TempData =>
ViewContext
.TempData;
178
/// Sets the <see cref="
ViewContext
"/>.
202
ViewContext
,
222
var html = _htmlGenerator.GenerateAntiforgery(
ViewContext
);
301
return NameAndIdProvider.CreateSanitizedId(
ViewContext
, fullName, IdAttributeDotReplacement);
465
return RenderPartialCoreAsync(partialViewName, model, viewData,
ViewContext
.Writer);
485
ViewContext
,
513
ViewContext
.ExecutingFilePath,
519
viewEngineResult = _viewEngine.FindView(
ViewContext
, partialViewName, isMainPage: false);
547
var viewContext = new ViewContext(
ViewContext
, view, newViewData, writer);
599
ViewContext
,
700
return new MvcForm(
ViewContext
, _htmlEncoder);
721
ViewContext
,
732
if (
ViewContext
.CheckBoxHiddenInputRenderMode == CheckBoxHiddenInputRenderMode.None)
737
var hiddenForCheckbox = _htmlGenerator.GenerateHiddenForCheckbox(
ViewContext
, modelExplorer, expression);
752
if (
ViewContext
.CheckBoxHiddenInputRenderMode == CheckBoxHiddenInputRenderMode.EndOfForm &&
ViewContext
.FormContext.CanRenderAtEndOfForm)
754
ViewContext
.FormContext.EndOfFormContent.Add(hiddenForCheckbox);
824
ViewContext
,
856
ViewContext
,
905
ViewContext
,
914
tagBuilder.WriteTo(
ViewContext
.Writer, _htmlEncoder);
920
ViewContext
.FormContext.EndOfFormContent.Add(_htmlGenerator.GenerateAntiforgery(
ViewContext
));
962
ViewContext
,
970
tagBuilder.WriteTo(
ViewContext
.Writer, _htmlEncoder);
976
ViewContext
.FormContext.EndOfFormContent.Add(_htmlGenerator.GenerateAntiforgery(
ViewContext
));
1002
ViewContext
,
1023
var fullName = NameAndIdProvider.GetFullHtmlFieldName(
ViewContext
, expression);
1048
ViewContext
,
1098
ViewContext
,
1120
var fullName = NameAndIdProvider.GetFullHtmlFieldName(
ViewContext
, expression);
1142
ViewContext
,
1175
ViewContext
,
1209
ViewContext
,
1243
ViewContext
,
1277
ViewContext
,
1309
ViewContext
,
1332
var fullName = NameAndIdProvider.GetFullHtmlFieldName(
ViewContext
, expression);
1334
(string)DefaultHtmlGenerator.GetModelStateValue(
ViewContext
, fullName, typeof(string));
1345
resolvedValue = DefaultHtmlGenerator.EvalString(
ViewContext
, expression, format);
HtmlHelperOfT.cs (2)
55
nameof(
ViewContext
.ViewData),
81
nameof(
ViewContext
.ViewData),
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (228)
DefaultEditorTemplatesTest.cs (1)
256
helperMock.SetupGet(h => h.ViewContext).Returns(helperToCopy.
ViewContext
);
Rendering\HtmlHelperCheckboxTest.cs (28)
112
helper.
ViewContext
.ClientValidationEnabled = false;
154
helper.
ViewContext
.FormContext.CanRenderAtEndOfForm = true;
160
Assert.True(helper.
ViewContext
.FormContext.HasEndOfFormContent);
163
var hiddenTag = Assert.Single(helper.
ViewContext
.FormContext.EndOfFormContent);
179
helper.
ViewContext
.CheckBoxHiddenInputRenderMode = CheckBoxHiddenInputRenderMode.None;
185
Assert.False(helper.
ViewContext
.FormContext.HasEndOfFormContent);
199
helper.
ViewContext
.FormContext.CanRenderAtEndOfForm = true;
200
helper.
ViewContext
.CheckBoxHiddenInputRenderMode = CheckBoxHiddenInputRenderMode.Inline;
219
helper.
ViewContext
.FormContext.CanRenderAtEndOfForm = true;
220
helper.
ViewContext
.CheckBoxHiddenInputRenderMode = CheckBoxHiddenInputRenderMode.EndOfForm;
226
Assert.True(helper.
ViewContext
.FormContext.HasEndOfFormContent);
229
var hiddenTag = Assert.Single(helper.
ViewContext
.FormContext.EndOfFormContent);
245
helper.
ViewContext
.FormContext.CanRenderAtEndOfForm = false;
246
helper.
ViewContext
.CheckBoxHiddenInputRenderMode = CheckBoxHiddenInputRenderMode.EndOfForm;
252
Assert.False(helper.
ViewContext
.FormContext.HasEndOfFormContent);
284
helper.
ViewContext
.ClientValidationEnabled = false;
303
helper.
ViewContext
.ClientValidationEnabled = false;
325
helper.
ViewContext
.ClientValidationEnabled = false;
346
helper.
ViewContext
.ClientValidationEnabled = false;
369
helper.
ViewContext
.ClientValidationEnabled = false;
389
helper.
ViewContext
.ClientValidationEnabled = false;
410
helper.
ViewContext
.ClientValidationEnabled = false;
429
helper.
ViewContext
.ClientValidationEnabled = false;
486
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
506
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
527
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
731
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
798
helper.
ViewContext
.ClientValidationEnabled = false;
Rendering\HtmlHelperDropDownListExtensionsTest.cs (9)
32
helper.
ViewContext
.ClientValidationEnabled = false;
56
helper.
ViewContext
.ClientValidationEnabled = false;
82
helper.
ViewContext
.ClientValidationEnabled = false;
107
helper.
ViewContext
.ClientValidationEnabled = false;
134
helper.
ViewContext
.ClientValidationEnabled = false;
156
helper.
ViewContext
.ClientValidationEnabled = false;
182
helper.
ViewContext
.ClientValidationEnabled = false;
208
helper.
ViewContext
.ClientValidationEnabled = false;
234
helper.
ViewContext
.ClientValidationEnabled = false;
Rendering\HtmlHelperFormExtensionsTest.cs (102)
282
htmlHelper.
ViewContext
,
291
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
296
Assert.NotNull(htmlHelper.
ViewContext
);
297
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
319
htmlHelper.
ViewContext
,
328
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
333
Assert.NotNull(htmlHelper.
ViewContext
);
334
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
356
htmlHelper.
ViewContext
,
366
Assert.NotNull(htmlHelper.
ViewContext
);
367
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
390
htmlHelper.
ViewContext
,
402
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
408
Assert.NotNull(htmlHelper.
ViewContext
);
409
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
434
htmlHelper.
ViewContext
,
446
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
452
Assert.NotNull(htmlHelper.
ViewContext
);
453
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
478
htmlHelper.
ViewContext
,
487
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
492
Assert.NotNull(htmlHelper.
ViewContext
);
493
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
518
htmlHelper.
ViewContext
,
528
Assert.NotNull(htmlHelper.
ViewContext
);
529
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
552
htmlHelper.
ViewContext
,
561
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
566
Assert.NotNull(htmlHelper.
ViewContext
);
567
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
592
htmlHelper.
ViewContext
,
601
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
606
Assert.NotNull(htmlHelper.
ViewContext
);
607
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
633
htmlHelper.
ViewContext
,
642
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
647
Assert.NotNull(htmlHelper.
ViewContext
);
648
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
674
htmlHelper.
ViewContext
,
686
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
692
Assert.NotNull(htmlHelper.
ViewContext
);
693
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
720
htmlHelper.
ViewContext
,
732
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
738
Assert.NotNull(htmlHelper.
ViewContext
);
739
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
766
htmlHelper.
ViewContext
,
778
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
784
Assert.NotNull(htmlHelper.
ViewContext
);
785
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
812
htmlHelper.
ViewContext
,
821
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
826
Assert.NotNull(htmlHelper.
ViewContext
);
827
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
860
htmlHelper.
ViewContext
,
870
Assert.NotNull(htmlHelper.
ViewContext
);
871
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
900
htmlHelper.
ViewContext
,
908
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
913
Assert.NotNull(htmlHelper.
ViewContext
);
914
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
938
htmlHelper.
ViewContext
,
946
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
951
Assert.NotNull(htmlHelper.
ViewContext
);
952
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
976
htmlHelper.
ViewContext
,
985
Assert.NotNull(htmlHelper.
ViewContext
);
986
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
1009
htmlHelper.
ViewContext
,
1017
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
1022
Assert.NotNull(htmlHelper.
ViewContext
);
1023
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
1047
htmlHelper.
ViewContext
,
1055
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
1060
Assert.NotNull(htmlHelper.
ViewContext
);
1061
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
1085
htmlHelper.
ViewContext
,
1094
Assert.NotNull(htmlHelper.
ViewContext
);
1095
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
1120
htmlHelper.
ViewContext
,
1128
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
1133
Assert.NotNull(htmlHelper.
ViewContext
);
1134
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
1159
htmlHelper.
ViewContext
,
1170
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
1176
Assert.NotNull(htmlHelper.
ViewContext
);
1177
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
1203
htmlHelper.
ViewContext
,
1214
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
1220
Assert.NotNull(htmlHelper.
ViewContext
);
1221
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
1247
htmlHelper.
ViewContext
,
1258
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
1264
Assert.NotNull(htmlHelper.
ViewContext
);
1265
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
1291
htmlHelper.
ViewContext
,
1299
.Setup(g => g.GenerateAntiforgery(htmlHelper.
ViewContext
))
1304
Assert.NotNull(htmlHelper.
ViewContext
);
1305
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
1336
htmlHelper.
ViewContext
,
1345
Assert.NotNull(htmlHelper.
ViewContext
);
1346
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
Rendering\HtmlHelperFormTest.cs (27)
130
Assert.NotNull(htmlHelper.
ViewContext
);
131
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
134
Assert.NotNull(htmlHelper.
ViewContext
.HttpContext);
135
var request = htmlHelper.
ViewContext
.HttpContext.Request;
180
Assert.NotNull(htmlHelper.
ViewContext
);
181
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
184
Assert.NotNull(htmlHelper.
ViewContext
.HttpContext);
185
var request = htmlHelper.
ViewContext
.HttpContext.Request;
242
Assert.NotNull(htmlHelper.
ViewContext
);
243
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
292
Assert.NotNull(htmlHelper.
ViewContext
);
293
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
320
Assert.NotNull(htmlHelper.
ViewContext
);
321
var writer = Assert.IsAssignableFrom<StringWriter>(htmlHelper.
ViewContext
.Writer);
340
var viewContext = htmlHelper.
ViewContext
;
353
htmlHelper.
ViewContext
.FormContext.EndOfFormContent.Add(tagBuilder);
387
var viewContext = htmlHelper.
ViewContext
;
425
var viewContext = htmlHelper.
ViewContext
;
464
var viewContext = htmlHelper.
ViewContext
;
502
var viewContext = htmlHelper.
ViewContext
;
542
var viewContext = htmlHelper.
ViewContext
;
581
var viewContext = htmlHelper.
ViewContext
;
621
var viewContext = htmlHelper.
ViewContext
;
658
var viewContext = htmlHelper.
ViewContext
;
701
var viewContext = htmlHelper.
ViewContext
;
743
var viewContext = htmlHelper.
ViewContext
;
787
var viewContext = htmlHelper.
ViewContext
;
Rendering\HtmlHelperHiddenTest.cs (9)
342
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
357
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
375
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
406
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
683
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
702
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
894
helper.
ViewContext
.ClientValidationEnabled = false;
912
helper.
ViewContext
.ClientValidationEnabled = false;
930
helper.
ViewContext
.ClientValidationEnabled = false;
Rendering\HtmlHelperListBoxExtensionsTest.cs (6)
32
helper.
ViewContext
.ClientValidationEnabled = false;
58
helper.
ViewContext
.ClientValidationEnabled = false;
83
helper.
ViewContext
.ClientValidationEnabled = false;
105
helper.
ViewContext
.ClientValidationEnabled = false;
130
helper.
ViewContext
.ClientValidationEnabled = false;
155
helper.
ViewContext
.ClientValidationEnabled = false;
Rendering\HtmlHelperPasswordTest.cs (7)
100
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
118
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
133
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
275
helper.
ViewContext
.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix";
383
helper.
ViewContext
.ClientValidationEnabled = false;
401
helper.
ViewContext
.ClientValidationEnabled = false;
419
helper.
ViewContext
.ClientValidationEnabled = false;
Rendering\HtmlHelperRadioButtonExtensionsTest.cs (3)
54
helper.
ViewContext
.ClientValidationEnabled = false;
74
helper.
ViewContext
.ClientValidationEnabled = false;
107
helper.
ViewContext
.ClientValidationEnabled = false;
Rendering\HtmlHelperSelectTest.cs (14)
431
helper.
ViewContext
.ClientValidationEnabled = false;
469
helper.
ViewContext
.ClientValidationEnabled = false;
494
helper.
ViewContext
.ClientValidationEnabled = false;
522
helper.
ViewContext
.ClientValidationEnabled = false;
549
helper.
ViewContext
.ClientValidationEnabled = false;
565
helper.
ViewContext
.ClientValidationEnabled = false;
581
helper.
ViewContext
.ClientValidationEnabled = false;
834
helper.
ViewContext
.ClientValidationEnabled = false;
872
helper.
ViewContext
.ClientValidationEnabled = false;
897
helper.
ViewContext
.ClientValidationEnabled = false;
925
helper.
ViewContext
.ClientValidationEnabled = false;
952
helper.
ViewContext
.ClientValidationEnabled = false;
968
helper.
ViewContext
.ClientValidationEnabled = false;
984
helper.
ViewContext
.ClientValidationEnabled = false;
Rendering\HtmlHelperTest.cs (4)
296
.
ViewContext
;
305
Assert.Same(helperToContextualize.
ViewContext
, viewContext);
317
.
ViewContext
;
337
.
ViewContext
;
Rendering\HtmlHelperTextAreaExtensionsTest.cs (5)
21
helper.
ViewContext
.ClientValidationEnabled = false;
40
helper.
ViewContext
.ClientValidationEnabled = false;
59
helper.
ViewContext
.ClientValidationEnabled = false;
78
helper.
ViewContext
.ClientValidationEnabled = false;
98
helper.
ViewContext
.ClientValidationEnabled = false;
Rendering\HtmlHelperTextBoxExtensionsTest.cs (9)
22
helper.
ViewContext
.ClientValidationEnabled = false;
40
helper.
ViewContext
.ClientValidationEnabled = false;
58
helper.
ViewContext
.ClientValidationEnabled = false;
76
helper.
ViewContext
.ClientValidationEnabled = false;
94
helper.
ViewContext
.ClientValidationEnabled = false;
122
helper.
ViewContext
.ClientValidationEnabled = false;
150
helper.
ViewContext
.ClientValidationEnabled = false;
176
helper.
ViewContext
.ClientValidationEnabled = false;
196
helper.
ViewContext
.ClientValidationEnabled = false;
Rendering\HtmlHelperValidationSummaryTest.cs (4)
184
html.
ViewContext
.ClientValidationEnabled = false;
208
html.
ViewContext
.ClientValidationEnabled = clientValidationEnabled;
233
html.
ViewContext
.ClientValidationEnabled = clientValidationEnabled;
259
html.
ViewContext
.ClientValidationEnabled = clientValidationEnabled;