100 instantiations of ViewContext
Microsoft.AspNetCore.Mvc.Localization.Test (10)
ViewLocalizerTest.cs (10)
35
var viewContext = new
ViewContext
();
70
var viewContext = new
ViewContext
();
102
var viewContext = new
ViewContext
();
126
var viewContext = new
ViewContext
();
151
var viewContext = new
ViewContext
();
177
var viewContext = new
ViewContext
();
201
var viewContext = new
ViewContext
();
225
var viewContext = new
ViewContext
();
249
var viewContext = new
ViewContext
();
273
var viewContext = new
ViewContext
();
Microsoft.AspNetCore.Mvc.Razor.Test (19)
Compilation\RazorPagePropertyActivatorTest.cs (8)
21
var viewContext = new
ViewContext
();
40
var viewContext = new
ViewContext
();
64
var viewContext = new
ViewContext
93
var viewContext = new
ViewContext
122
var viewContext = new
ViewContext
151
var viewContext = new
ViewContext
180
var viewContext = new
ViewContext
204
var viewContext = new
ViewContext
DefaultTagHelperFactoryTest.cs (1)
158
var viewContext = new
ViewContext
(
Infrastructure\DefaultTagHelperActivatorTest.cs (1)
44
var viewContext = new
ViewContext
(
RazorPageActivatorTest.cs (1)
260
return new
ViewContext
(
RazorPageCreateModelExpressionTest.cs (1)
324
return new
ViewContext
(
RazorPageCreateTagHelperTest.cs (1)
95
var viewContext = new
ViewContext
(
RazorPageTest.cs (1)
1428
return new
ViewContext
(
RazorViewTest.cs (1)
1794
return new
ViewContext
(
TagHelpers\UrlResolutionTagHelperTest.cs (4)
115
ViewContext = new Rendering.
ViewContext
{ HttpContext = new DefaultHttpContext() }
175
ViewContext = new Rendering.
ViewContext
{ HttpContext = new DefaultHttpContext() }
369
ViewContext = new Rendering.
ViewContext
{ HttpContext = new DefaultHttpContext() }
415
ViewContext = new Rendering.
ViewContext
{ HttpContext = httpContext }
Microsoft.AspNetCore.Mvc.RazorPages (2)
Infrastructure\PageActionInvoker.cs (2)
110
_viewContext = new
ViewContext
(
149
_viewContext = new
ViewContext
(
Microsoft.AspNetCore.Mvc.RazorPages.Test (24)
Infrastructure\DefaultPageActivatorProviderTest.cs (5)
34
var viewContext = new
ViewContext
();
111
var viewContext = new
ViewContext
();
132
var viewContext = new
ViewContext
();
153
var viewContext = new
ViewContext
();
174
var viewContext = new
ViewContext
();
Infrastructure\DefaultPageFactoryProviderTest.cs (10)
53
var viewContext = new
ViewContext
();
77
var viewContext = new
ViewContext
();
120
var viewContext = new
ViewContext
();
145
var viewContext = new
ViewContext
();
172
var viewContext = new
ViewContext
();
197
var viewContext = new
ViewContext
();
227
var viewContext = new
ViewContext
()
266
var viewContext = new
ViewContext
()
309
var viewContext = new
ViewContext
()
347
var viewContext = new
ViewContext
()
Infrastructure\DefaultPageModelActivatorProviderTest.cs (3)
157
var viewContext = new
ViewContext
();
178
var viewContext = new
ViewContext
();
199
var viewContext = new
ViewContext
();
PageTest.cs (6)
33
var viewContext = new
ViewContext
(pageContext, NullView.Instance, viewData, tempData, TextWriter.Null, new HtmlHelperOptions());
1716
ViewContext = new
ViewContext
1741
ViewContext = new
ViewContext
1766
ViewContext = new
ViewContext
1788
ViewContext = new
ViewContext
1810
ViewContext = new
ViewContext
Microsoft.AspNetCore.Mvc.TagHelpers (1)
PartialTagHelper.cs (1)
203
var partialViewContext = new
ViewContext
(ViewContext, view, newViewData, writer);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (23)
CacheTagHelperTest.cs (1)
932
return new
ViewContext
(
CacheTagKeyTest.cs (1)
541
return new
ViewContext
(actionContext,
ComponentTagHelperTest.cs (1)
97
return new
ViewContext
{ HttpContext = httpContext };
DefaultTagHelperActivatorTest.cs (1)
66
var viewContext = new
ViewContext
DistributedCacheTagHelperTest.cs (1)
739
return new
ViewContext
(actionContext,
FormActionTagHelperTest.cs (7)
48
var viewContext = new
ViewContext
();
123
var viewContext = new
ViewContext
();
228
var viewContext = new
ViewContext
();
287
var viewContext = new
ViewContext
();
359
var viewContext = new
ViewContext
();
413
var viewContext = new
ViewContext
();
477
var viewContext = new
ViewContext
FormTagHelperTest.cs (1)
1161
return new
ViewContext
(
ImageTagHelperTest.cs (1)
301
var viewContext = new
ViewContext
(
LinkTagHelperTest.cs (1)
1132
var viewContext = new
ViewContext
(
PartialTagHelperTest.cs (1)
840
return new
ViewContext
(
PersistComponentStateTagHelperTest.cs (1)
268
return new
ViewContext
{ HttpContext = httpContext };
RenderAtEndOfFormTagHelperTest.cs (2)
46
var viewContext = new
ViewContext
();
87
var viewContext = new
ViewContext
();
ScriptTagHelperTest.cs (1)
1113
var viewContext = new
ViewContext
(
TestableHtmlGenerator.cs (1)
83
var viewContext = new
ViewContext
(
ValidationMessageTagHelperTest.cs (1)
470
return new
ViewContext
(
ValidationSummaryTagHelperTest.cs (1)
654
return new
ViewContext
(
Microsoft.AspNetCore.Mvc.ViewFeatures (8)
HtmlHelper.cs (1)
547
var viewContext = new
ViewContext
(ViewContext, view, newViewData, writer);
TemplateRenderer.cs (2)
122
var viewContext = new
ViewContext
(_viewContext, viewEngineResult.View, _viewData, writer);
244
var newViewContext = new
ViewContext
(viewContext, viewContext.View, viewData, viewContext.Writer);
ViewComponentResultExecutor.cs (1)
102
var viewContext = new
ViewContext
(
ViewComponents\ViewComponentContext.cs (2)
26
ViewContext = new
ViewContext
();
58
ViewContext = new
ViewContext
(
ViewComponents\ViewViewComponentResult.cs (1)
118
var childViewContext = new
ViewContext
(
ViewExecutor.cs (1)
157
var viewContext = new
ViewContext
(
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (13)
DefaultHtmlGeneratorTest.cs (1)
1039
return new
ViewContext
(
DefaultValidationHtmlAttributeProviderTest.cs (1)
259
return new
ViewContext
(
Rendering\DefaultTemplatesUtilities.cs (1)
288
var viewContext = new
ViewContext
(
Rendering\ViewContextTests.cs (3)
22
var context = new
ViewContext
(
49
var originalContext = new
ViewContext
(
61
var context = new
ViewContext
(originalContext, view, viewData, writer);
ViewComponents\ContentViewComponentResultTest.cs (1)
42
var viewContext = new
ViewContext
(
ViewComponents\DefaultViewComponentActivatorTests.cs (1)
89
ViewContext = new
ViewContext
ViewComponents\HtmlContentViewComponentResultTest.cs (1)
42
var viewContext = new
ViewContext
(
ViewComponents\ViewComponentContextTest.cs (2)
25
var viewContext = new
ViewContext
(
87
var viewContext = new
ViewContext
(
ViewComponents\ViewViewComponentResultTest.cs (1)
522
var viewContext = new
ViewContext
(
ViewComponentTests.cs (1)
242
var viewContext = new
ViewContext
();
851 references to ViewContext
Identity.ExternalClaims (5)
Pages\Account\Manage\ManageNavPages.cs (5)
22
public static string IndexNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, Index);
24
public static string ChangePasswordNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, ChangePassword);
26
public static string ExternalLoginsNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, ExternalLogins);
28
public static string TwoFactorAuthenticationNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, TwoFactorAuthentication);
30
public static string PageNavClass(
ViewContext
viewContext, string page)
Microsoft.AspNetCore.Identity.UI (36)
Areas\Identity\Pages\V4\Account\Manage\ManageNavPages.cs (18)
66
public static string? IndexNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, Index);
72
public static string? EmailNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, Email);
78
public static string? ChangePasswordNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, ChangePassword);
84
public static string? DownloadPersonalDataNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, DownloadPersonalData);
90
public static string? DeletePersonalDataNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, DeletePersonalData);
96
public static string? ExternalLoginsNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, ExternalLogins);
102
public static string? PersonalDataNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, PersonalData);
108
public static string? TwoFactorAuthenticationNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, TwoFactorAuthentication);
114
public static string? PageNavClass(
ViewContext
viewContext, string page)
125
public static string? IndexAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, Index);
131
public static string? EmailAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, Email);
137
public static string? ChangePasswordAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, ChangePassword);
143
public static string? DownloadPersonalDataAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, DownloadPersonalData);
149
public static string? DeletePersonalDataAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, DeletePersonalData);
155
public static string? ExternalLoginsAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, ExternalLogins);
161
public static string? PersonalDataAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, PersonalData);
167
public static string? TwoFactorAuthenticationAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, TwoFactorAuthentication);
173
public static string? AriaCurrent(
ViewContext
viewContext, string page)
Areas\Identity\Pages\V5\Account\Manage\ManageNavPages.cs (18)
66
public static string? IndexNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, Index);
72
public static string? EmailNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, Email);
78
public static string? ChangePasswordNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, ChangePassword);
84
public static string? DownloadPersonalDataNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, DownloadPersonalData);
90
public static string? DeletePersonalDataNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, DeletePersonalData);
96
public static string? ExternalLoginsNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, ExternalLogins);
102
public static string? PersonalDataNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, PersonalData);
108
public static string? TwoFactorAuthenticationNavClass(
ViewContext
viewContext) => PageNavClass(viewContext, TwoFactorAuthentication);
114
public static string? PageNavClass(
ViewContext
viewContext, string page)
125
public static string? IndexAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, Index);
131
public static string? EmailAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, Email);
137
public static string? ChangePasswordAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, ChangePassword);
143
public static string? DownloadPersonalDataAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, DownloadPersonalData);
149
public static string? DeletePersonalDataAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, DeletePersonalData);
155
public static string? ExternalLoginsAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, ExternalLogins);
161
public static string? PersonalDataAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, PersonalData);
167
public static string? TwoFactorAuthenticationAriaCurrent(
ViewContext
viewContext) => AriaCurrent(viewContext, TwoFactorAuthentication);
173
public static string? AriaCurrent(
ViewContext
viewContext, string page)
Microsoft.AspNetCore.Mvc.Localization (3)
ViewLocalizer.cs (3)
75
/// Apply the specified <see cref="
ViewContext
"/>.
77
/// <param name="viewContext">The <see cref="
ViewContext
"/>.</param>
78
public void Contextualize(
ViewContext
viewContext)
Microsoft.AspNetCore.Mvc.Localization.Test (10)
ViewLocalizerTest.cs (10)
35
var
viewContext = new ViewContext();
70
var
viewContext = new ViewContext();
102
var
viewContext = new ViewContext();
126
var
viewContext = new ViewContext();
151
var
viewContext = new ViewContext();
177
var
viewContext = new ViewContext();
201
var
viewContext = new ViewContext();
225
var
viewContext = new ViewContext();
249
var
viewContext = new ViewContext();
273
var
viewContext = new ViewContext();
Microsoft.AspNetCore.Mvc.Razor (77)
DefaultTagHelperFactory.cs (9)
20
private readonly ConcurrentDictionary<Type, PropertyActivator<
ViewContext
>[]> _injectActions;
21
private readonly Func<Type, PropertyActivator<
ViewContext
>[]> _getPropertiesToActivate;
22
private static readonly Func<PropertyInfo, PropertyActivator<
ViewContext
>> _createActivateInfo = CreateActivateInfo;
35
_injectActions = new ConcurrentDictionary<Type, PropertyActivator<
ViewContext
>[]>();
37
PropertyActivator<
ViewContext
>.GetPropertiesToActivate(
49
public TTagHelper CreateTagHelper<TTagHelper>(
ViewContext
context)
71
private static void InitializeTagHelper<TTagHelper>(TTagHelper tagHelper,
ViewContext
context)
84
private static PropertyActivator<
ViewContext
> CreateActivateInfo(PropertyInfo property)
86
return new PropertyActivator<
ViewContext
>(property, viewContext => viewContext);
DependencyInjection\MvcRazorMvcBuilderExtensions.cs (1)
59
Action<TTagHelper,
ViewContext
> initialize)
DependencyInjection\MvcRazorMvcCoreBuilderExtensions.cs (1)
104
Action<TTagHelper,
ViewContext
> initialize)
Diagnostics\MvcDiagnostics.cs (4)
30
public BeforeViewPageEventData(IRazorPage page,
ViewContext
viewContext, ActionDescriptor actionDescriptor, HttpContext httpContext)
46
public
ViewContext
ViewContext { get; }
91
public AfterViewPageEventData(IRazorPage page,
ViewContext
viewContext, ActionDescriptor actionDescriptor, HttpContext httpContext)
107
public
ViewContext
ViewContext { get; }
Infrastructure\DefaultTagHelperActivator.cs (1)
16
public TTagHelper Create<TTagHelper>(
ViewContext
context)
IRazorPage.cs (2)
17
ViewContext
ViewContext { get; set; }
55
/// Renders the page and writes the output to the <see cref="
ViewContext
.Writer"/>.
IRazorPageActivator.cs (2)
17
/// <param name="context">The <see cref="
ViewContext
"/> for the executing view.</param>
18
void Activate(IRazorPage page,
ViewContext
context);
ITagHelperActivator.cs (2)
18
/// <param name="context">The <see cref="
ViewContext
"/> for the executing view.</param>
20
TTagHelper Create<TTagHelper>(
ViewContext
context) where TTagHelper : ITagHelper;
ITagHelperFactory.cs (2)
17
/// <param name="context"><see cref="
ViewContext
"/> for the executing view.</param>
19
TTagHelper CreateTagHelper<TTagHelper>(
ViewContext
context) where TTagHelper : ITagHelper;
ITagHelperInitializerOfT.cs (2)
20
/// <param name="context">The <see cref="
ViewContext
"/> for the executing view.</param>
21
void Initialize(TTagHelper helper,
ViewContext
context);
MvcRazorDiagnosticListenerExtensions.cs (4)
15
ViewContext
viewContext)
27
ViewContext
viewContext)
45
ViewContext
viewContext)
57
ViewContext
viewContext)
RazorPage.cs (1)
174
var
viewContext = ViewContext;
RazorPageActivator.cs (1)
58
public void Activate(IRazorPage page,
ViewContext
context)
RazorPageBase.cs (10)
46
public virtual
ViewContext
ViewContext { get; set; } = default!;
62
var
viewContext = ViewContext;
215
/// All writes to the <see cref="Output"/> or <see cref="
ViewContext
.Writer"/> after calling this method will
220
var
viewContext = ViewContext;
263
/// All writes to the <see cref="Output"/> or <see cref="
ViewContext
.Writer"/> after calling this method will
276
var
viewContext = ViewContext;
325
var
viewContext = ViewContext;
337
var
viewContext = ViewContext;
354
var
viewContext = ViewContext;
713
var
viewContext = ViewContext;
RazorPagePropertyActivator.cs (12)
22
private readonly PropertyActivator<
ViewContext
>[] _propertyActivators;
38
_propertyActivators = PropertyActivator<
ViewContext
>.GetPropertiesToActivate<RazorInjectAttribute>(
44
public void Activate(object page,
ViewContext
context)
57
internal ViewDataDictionary CreateViewDataDictionary(
ViewContext
context)
75
private static PropertyActivator<
ViewContext
> CreateActivateInfo(
80
Func<
ViewContext
, object> valueAccessor;
134
return new PropertyActivator<
ViewContext
>(property, valueAccessor);
139
public Func<
ViewContext
, object> UrlHelperAccessor { get; init; } = default!;
141
public Func<
ViewContext
, object> JsonHelperAccessor { get; init; } = default!;
143
public Func<
ViewContext
, object> DiagnosticSourceAccessor { get; init; } = default!;
145
public Func<
ViewContext
, object> HtmlEncoderAccessor { get; init; } = default!;
147
public Func<
ViewContext
, object> ModelExpressionProviderAccessor { get; init; } = default!;
RazorView.cs (7)
73
internal Action<IRazorPage,
ViewContext
>? OnAfterPageActivated { get; set; }
76
public virtual async Task RenderAsync(
ViewContext
context)
91
ViewContext
context,
138
private async Task RenderPageCoreAsync(IRazorPage page,
ViewContext
context)
157
private async Task RenderViewStartsAsync(
ViewContext
context)
195
ViewContext
context,
269
private IRazorPage GetLayoutPage(
ViewContext
context, string executingFilePath, string layoutPath)
ServiceBasedTagHelperActivator.cs (1)
17
public TTagHelper Create<TTagHelper>(
ViewContext
context) where TTagHelper : ITagHelper
TagHelperInitializerOfT.cs (3)
13
private readonly Action<TTagHelper,
ViewContext
> _initializeDelegate;
19
public TagHelperInitializer(Action<TTagHelper,
ViewContext
> action)
27
public void Initialize(TTagHelper helper,
ViewContext
context)
TagHelpers\ITagHelperComponentPropertyActivator.cs (2)
17
/// <param name="context">The <see cref="
ViewContext
"/> for the executing view.</param>
19
void Activate(
ViewContext
context, ITagHelperComponent tagHelperComponent);
TagHelpers\TagHelperComponentPropertyActivator.cs (8)
18
private readonly ConcurrentDictionary<Type, PropertyActivator<
ViewContext
>[]> _propertiesToActivate = new();
19
private readonly Func<Type, PropertyActivator<
ViewContext
>[]> _getPropertiesToActivate = GetPropertiesToActivate;
20
private static readonly Func<PropertyInfo, PropertyActivator<
ViewContext
>> _createActivateInfo = CreateActivateInfo;
28
public void Activate(
ViewContext
context, ITagHelperComponent tagHelperComponent)
43
private static PropertyActivator<
ViewContext
> CreateActivateInfo(PropertyInfo property)
45
return new PropertyActivator<
ViewContext
>(property, viewContext => viewContext);
48
private static PropertyActivator<
ViewContext
>[] GetPropertiesToActivate(Type type)
50
return PropertyActivator<
ViewContext
>.GetPropertiesToActivate(
TagHelpers\TagHelperComponentTagHelper.cs (1)
54
public
ViewContext
ViewContext { get; set; } = default!;
TagHelpers\UrlResolutionTagHelper.cs (1)
114
public
ViewContext
ViewContext { get; set; } = default!;
Microsoft.AspNetCore.Mvc.Razor.Test (128)
Compilation\RazorPagePropertyActivatorTest.cs (8)
21
var
viewContext = new ViewContext();
40
var
viewContext = new ViewContext();
64
var
viewContext = new ViewContext
93
var
viewContext = new ViewContext
122
var
viewContext = new ViewContext
151
var
viewContext = new ViewContext
180
var
viewContext = new ViewContext
204
var
viewContext = new ViewContext
DefaultTagHelperFactoryTest.cs (11)
35
var
viewContext = MakeViewContext(httpContext);
57
var
viewContext = MakeViewContext(httpContext);
84
var
viewContext = MakeViewContext(httpContext);
112
var
viewContext = MakeViewContext(httpContext);
116
.Setup(a => a.Create<TestTagHelper>(It.IsAny<
ViewContext
>()))
120
.Setup(a => a.Create<AnotherTestTagHelper>(It.IsAny<
ViewContext
>()))
149
activator.Setup(a => a.Create<TestTagHelper>(It.IsAny<
ViewContext
>())).Returns(new TestTagHelper());
153
private static
ViewContext
MakeViewContext(HttpContext httpContext)
158
var
viewContext = new ViewContext(
178
public
ViewContext
ViewContext { get; set; }
190
public
ViewContext
ViewContext { get; set; }
Infrastructure\DefaultTagHelperActivatorTest.cs (5)
27
var
viewContext = MakeViewContext(httpContext);
39
private static
ViewContext
MakeViewContext(HttpContext httpContext)
44
var
viewContext = new ViewContext(
64
public
ViewContext
ViewContext { get; set; }
76
public
ViewContext
ViewContext { get; set; }
RazorPageActivatorTest.cs (8)
53
var
viewContext = CreateViewContext();
89
var
viewContext = CreateViewContext(viewData);
116
var
viewContext = CreateViewContext(viewData);
161
var
viewContext = CreateViewContext(viewData);
179
var
viewContext = CreateViewContext(viewData);
239
private
ViewContext
CreateViewContext(ViewDataDictionary viewData = null)
339
public
ViewContext
ViewContext { get; private set; }
341
public void Contextualize(
ViewContext
viewContext)
RazorPageCreateModelExpressionTest.cs (15)
23
var
viewContext = CreateViewContext();
48
var
viewContext = CreateViewContext();
107
var
viewContext = CreateViewContext();
133
var
viewContext = CreateViewContext();
151
var
viewContext = CreateViewContext();
169
var
viewContext = CreateViewContext();
187
var
viewContext = CreateViewContext();
206
var
viewContext = CreateViewContext();
224
var
viewContext = CreateViewContext();
242
var
viewContext = CreateViewContext();
260
var
viewContext = CreateViewContext();
273
private static IdentityRazorPage CreateIdentityPage(
ViewContext
viewContext)
283
public static NotQuiteIdentityRazorPage CreateNotQuiteIdentityPage(
ViewContext
viewContext)
293
private static TestRazorPage CreatePage(
ViewContext
viewContext)
311
private static
ViewContext
CreateViewContext()
RazorPageCreateTagHelperTest.cs (2)
95
var
viewContext = new ViewContext(
135
public
ViewContext
ViewContext { get; set; }
RazorPageTest.cs (20)
34
var
viewContext = CreateViewContext();
62
var
viewContext = CreateViewContext();
86
var
viewContext = CreateViewContext();
121
var
viewContext = CreateViewContext();
176
var
viewContext = CreateViewContext();
191
var
viewContext = CreateViewContext();
232
var
viewContext = CreateViewContext();
253
var
viewContext = CreateViewContext();
273
var
viewContext = CreateViewContext(bufferScope: bufferScope);
402
var
viewContext = CreateViewContext();
419
var
viewContext = CreateViewContext();
458
var
context = CreateViewContext(viewPath: "/Views/TestPath/Test.cshtml");
480
var
context = CreateViewContext(viewPath: "/Views/TestPath/Test.cshtml");
867
var
context = CreateViewContext(writer.Object);
887
var
context = CreateViewContext(writer.Object);
905
var
context = CreateViewContext(writer.Object);
930
var
context = CreateViewContext(writer.Object);
1377
ViewContext
context = null)
1388
ViewContext
context = null)
1405
private static
ViewContext
CreateViewContext(
RazorViewTest.cs (51)
45
var
viewContext = CreateViewContext(view);
76
var
viewContext = CreateViewContext(view);
79
.Setup(a => a.Activate(page, It.IsAny<
ViewContext
>()))
80
.Callback((IRazorPage p,
ViewContext
c) =>
119
var
viewContext = CreateViewContext(view);
122
.Setup(a => a.Activate(page, It.IsAny<
ViewContext
>()))
123
.Callback((IRazorPage p,
ViewContext
c) =>
195
var
viewContext = CreateViewContext(view);
212
.Setup(a => a.Activate(page, It.IsAny<
ViewContext
>()))
221
var
viewContext = CreateViewContext(view);
270
var
viewContext = CreateViewContext(view);
295
var
viewContext = CreateViewContext(view);
321
var
viewContext = CreateViewContext(view);
341
.Setup(a => a.Activate(page, It.IsAny<
ViewContext
>()))
350
var
viewContext = CreateViewContext(view);
382
.Setup(a => a.Activate(viewStart1, It.IsAny<
ViewContext
>()))
385
.Setup(a => a.Activate(viewStart2, It.IsAny<
ViewContext
>()))
388
.Setup(a => a.Activate(page, It.IsAny<
ViewContext
>()))
406
var
viewContext = CreateViewContext(view);
450
var
context = CreateViewContext(view);
504
var
context = CreateViewContext(view);
538
var
viewContext = CreateViewContext(view);
581
var
viewContext = CreateViewContext(view);
626
var
viewContext = CreateViewContext(view);
684
.Setup(a => a.Activate(page, It.IsAny<
ViewContext
>()))
687
.Setup(a => a.Activate(layout, It.IsAny<
ViewContext
>()))
702
var
viewContext = CreateViewContext(view);
743
var
viewContext = CreateViewContext(view);
810
var
viewContext = CreateViewContext(view);
879
var
viewContext = CreateViewContext(view);
942
var
viewContext = CreateViewContext(view);
1011
var
viewContext = CreateViewContext(view);
1046
var
viewContext = CreateViewContext(view);
1114
var
viewContext = CreateViewContext(view);
1188
var
viewContext = CreateViewContext(view);
1229
var
viewContext = CreateViewContext(view);
1283
var
viewContext = CreateViewContext(view);
1353
var
viewContext = CreateViewContext(view);
1411
var
viewContext = CreateViewContext(view);
1466
var
viewContext = CreateViewContext(view);
1497
var
viewContext = CreateViewContext(view);
1544
var
viewContext = CreateViewContext(view);
1589
var
viewContext = CreateViewContext(view);
1647
var
viewContext = CreateViewContext(view);
1692
var
viewContext = CreateViewContext(view);
1734
var
viewContext = CreateViewContext(view);
1755
pageActivator.Setup(p => p.Activate(It.IsAny<IRazorPage>(), It.IsAny<
ViewContext
>()))
1756
.Callback((IRazorPage p,
ViewContext
v) => activated.Add(p));
1772
var
viewContext = CreateViewContext(view);
1778
void AssertActivated(IRazorPage p,
ViewContext
v)
1786
private static
ViewContext
CreateViewContext(RazorView view)
TagHelpers\TagHelperComponentPropertyActivatorTest.cs (5)
20
var
viewContext = CreateViewContext();
36
public
ViewContext
ViewContext { get; set; }
48
private static
ViewContext
CreateViewContext()
57
var
viewContext = Mock.Of<
ViewContext
>(vc => vc.HttpContext == httpContext);
TagHelpers\TagHelperComponentTagHelperTest.cs (3)
386
private static
ViewContext
CreateViewContext()
395
var
viewContext = Mock.Of<
ViewContext
>(vc => vc.HttpContext == httpContext);
Microsoft.AspNetCore.Mvc.RazorPages (29)
Infrastructure\DefaultPageActivatorProvider.cs (12)
15
private readonly Action<PageContext,
ViewContext
, object> _disposer = Dispose;
16
private readonly Func<PageContext,
ViewContext
, object, ValueTask> _asyncDisposer = AsyncDispose;
17
private readonly Func<PageContext,
ViewContext
, object, ValueTask> _syncAsyncDisposer = SyncAsyncDispose;
20
public Func<PageContext,
ViewContext
, object> CreateActivator(CompiledPageActionDescriptor actionDescriptor)
36
public Action<PageContext,
ViewContext
, object>? CreateReleaser(CompiledPageActionDescriptor actionDescriptor)
48
public Func<PageContext,
ViewContext
, object, ValueTask>? CreateAsyncReleaser(CompiledPageActionDescriptor actionDescriptor)
65
private static Func<PageContext,
ViewContext
, object> CreatePageFactory(Type pageTypeInfo)
68
var parameter2 = Expression.Parameter(typeof(
ViewContext
), "viewContext");
75
.Lambda<Func<PageContext,
ViewContext
, object>>(newExpression, parameter1, parameter2)
80
private static void Dispose(PageContext context,
ViewContext
viewContext, object page)
89
private static ValueTask SyncAsyncDispose(PageContext context,
ViewContext
viewContext, object page)
95
private static ValueTask AsyncDispose(PageContext context,
ViewContext
viewContext, object page)
Infrastructure\DefaultPageFactoryProvider.cs (3)
42
public Func<PageContext,
ViewContext
, object> CreatePageFactory(CompiledPageActionDescriptor actionDescriptor)
70
public Action<PageContext,
ViewContext
, object>? CreatePageDisposer(CompiledPageActionDescriptor descriptor)
77
public Func<PageContext,
ViewContext
, object, ValueTask>? CreateAsyncPageDisposer(CompiledPageActionDescriptor descriptor)
Infrastructure\PageActionInvoker.cs (1)
28
private
ViewContext
? _viewContext;
Infrastructure\PageActionInvokerCacheEntry.cs (4)
17
Func<PageContext,
ViewContext
, object> pageFactory,
18
Func<PageContext,
ViewContext
, object, ValueTask>? releasePage,
42
public Func<PageContext,
ViewContext
, object> PageFactory { get; }
47
public Func<PageContext,
ViewContext
, object, ValueTask>? ReleasePage { get; }
Infrastructure\PageResultExecutor.cs (1)
69
var
viewContext = result.Page.ViewContext;
Infrastructure\RazorPageAdapter.cs (1)
32
public
ViewContext
ViewContext
IPageActivatorProvider.cs (3)
18
Func<PageContext,
ViewContext
, object> CreateActivator(CompiledPageActionDescriptor descriptor);
25
Action<PageContext,
ViewContext
, object>? CreateReleaser(CompiledPageActionDescriptor descriptor);
32
Func<PageContext,
ViewContext
, object, ValueTask>? CreateAsyncReleaser(CompiledPageActionDescriptor descriptor)
IPageFactoryProvider.cs (3)
18
Func<PageContext,
ViewContext
, object> CreatePageFactory(CompiledPageActionDescriptor descriptor);
25
Action<PageContext,
ViewContext
, object>? CreatePageDisposer(CompiledPageActionDescriptor descriptor);
32
Func<PageContext,
ViewContext
, object, ValueTask>? CreateAsyncPageDisposer(CompiledPageActionDescriptor descriptor)
PageBase.cs (1)
37
public override
ViewContext
ViewContext { get; set; } = default!;
Microsoft.AspNetCore.Mvc.RazorPages.Test (24)
Infrastructure\DefaultPageActivatorProviderTest.cs (5)
34
var
viewContext = new ViewContext();
111
var
viewContext = new ViewContext();
132
var
viewContext = new ViewContext();
153
var
viewContext = new ViewContext();
174
var
viewContext = new ViewContext();
Infrastructure\DefaultPageFactoryProviderTest.cs (10)
53
var
viewContext = new ViewContext();
77
var
viewContext = new ViewContext();
120
var
viewContext = new ViewContext();
145
var
viewContext = new ViewContext();
172
var
viewContext = new ViewContext();
197
var
viewContext = new ViewContext();
227
var
viewContext = new ViewContext()
266
var
viewContext = new ViewContext()
309
var
viewContext = new ViewContext()
347
var
viewContext = new ViewContext()
Infrastructure\DefaultPageModelActivatorProviderTest.cs (3)
157
var
viewContext = new ViewContext();
178
var
viewContext = new ViewContext();
199
var
viewContext = new ViewContext();
Infrastructure\PageActionInvokerProviderTest.cs (4)
36
Func<PageContext,
ViewContext
, object> factory = (a, b) => null;
37
Func<PageContext,
ViewContext
, object, ValueTask> releaser = (a, b, c) => default;
88
Func<PageContext,
ViewContext
, object> factory = (a, b) => null;
89
Func<PageContext,
ViewContext
, object, ValueTask> releaser = (a, b, c) => default;
Infrastructure\PageActionInvokerTest.cs (1)
1521
object pageFactory(PageContext context,
ViewContext
viewContext)
PageTest.cs (1)
33
var
viewContext = new ViewContext(pageContext, NullView.Instance, viewData, tempData, TextWriter.Null, new HtmlHelperOptions());
Microsoft.AspNetCore.Mvc.TagHelpers (31)
AnchorTagHelper.cs (2)
155
/// Gets or sets the <see cref="Rendering.
ViewContext
"/> for the current request.
159
public
ViewContext
ViewContext { get; set; }
CacheTagHelperBase.cs (1)
58
public
ViewContext
ViewContext { get; set; }
ComponentTagHelper.cs (2)
29
/// Gets or sets the <see cref="Rendering.
ViewContext
"/> for the current request.
33
public
ViewContext
ViewContext { get; set; }
FormActionTagHelper.cs (2)
93
/// Gets or sets the <see cref="Rendering.
ViewContext
"/> for the current request.
97
public
ViewContext
ViewContext { get; set; }
FormTagHelper.cs (2)
47
/// Gets the <see cref="Rendering.
ViewContext
"/> of the executing view.
51
public
ViewContext
ViewContext { get; set; }
InputTagHelper.cs (2)
83
/// Gets the <see cref="Rendering.
ViewContext
"/> of the executing view.
87
public
ViewContext
ViewContext { get; set; }
LabelTagHelper.cs (2)
31
/// Gets the <see cref="Rendering.
ViewContext
"/> of the executing view.
35
public
ViewContext
ViewContext { get; set; }
OptionTagHelper.cs (2)
38
/// Gets the <see cref="Rendering.
ViewContext
"/> of the executing view.
42
public
ViewContext
ViewContext { get; set; }
PartialTagHelper.cs (3)
97
/// Gets the <see cref="Rendering.
ViewContext
"/> of the executing view.
101
public
ViewContext
ViewContext { get; set; }
203
var
partialViewContext = new ViewContext(ViewContext, view, newViewData, writer);
PersistComponentStateTagHelper.cs (2)
24
/// Gets or sets the <see cref="Rendering.
ViewContext
"/> for the current request.
28
public
ViewContext
ViewContext { get; set; }
RenderAtEndOfFormTagHelper.cs (2)
25
/// Gets the <see cref="Rendering.
ViewContext
"/> of the executing view.
29
public
ViewContext
ViewContext { get; set; }
ResourceCollectionUtilities.cs (1)
12
internal static bool TryResolveFromAssetCollection(
ViewContext
viewContext, string url, out string resolvedUrl)
SelectTagHelper.cs (2)
44
/// Gets the <see cref="Rendering.
ViewContext
"/> of the executing view.
48
public
ViewContext
ViewContext { get; set; }
TextAreaTagHelper.cs (2)
36
/// Gets the <see cref="Rendering.
ViewContext
"/> of the executing view.
40
public
ViewContext
ViewContext { get; set; }
ValidationMessageTagHelper.cs (2)
33
/// Gets the <see cref="Rendering.
ViewContext
"/> of the executing view.
37
public
ViewContext
ViewContext { get; set; }
ValidationSummaryTagHelper.cs (2)
33
/// Gets the <see cref="Rendering.
ViewContext
"/> of the executing view.
37
public
ViewContext
ViewContext { get; set; }
Microsoft.AspNetCore.Mvc.TagHelpers.Test (171)
AnchorTagHelperTest.cs (9)
56
var
viewContext = TestableHtmlGenerator.GetViewContext(
111
It.IsAny<
ViewContext
>(),
161
It.IsAny<
ViewContext
>(),
215
It.IsAny<
ViewContext
>(),
273
It.IsAny<
ViewContext
>(),
332
It.IsAny<
ViewContext
>(),
388
It.IsAny<
ViewContext
>(),
439
It.IsAny<
ViewContext
>(),
448
.Callback((
ViewContext
v, string linkText, string pageName, string pageHandler, string protocol, string hostname, string fragment, object routeValues, object htmlAttributes) =>
CacheTagHelperTest.cs (1)
929
private static
ViewContext
GetViewContext()
CacheTagKeyTest.cs (1)
538
private static
ViewContext
GetViewContext()
ComponentTagHelperTest.cs (2)
25
var
viewContext = GetViewContext();
78
private
ViewContext
GetViewContext()
DefaultTagHelperActivatorTest.cs (4)
31
var
viewContext = CreateViewContext();
45
var
viewContext = CreateViewContext();
54
private
ViewContext
CreateViewContext()
66
var
viewContext = new ViewContext
DistributedCacheTagHelperTest.cs (1)
736
private static
ViewContext
GetViewContext()
FormActionTagHelperTest.cs (7)
48
var
viewContext = new ViewContext();
123
var
viewContext = new ViewContext();
228
var
viewContext = new ViewContext();
287
var
viewContext = new ViewContext();
359
var
viewContext = new ViewContext();
413
var
viewContext = new ViewContext();
477
var
viewContext = new ViewContext
FormTagHelperTest.cs (23)
25
var
viewContext = CreateViewContext();
96
var
viewContext = TestableHtmlGenerator.GetViewContext(
150
var
viewContext = TestableHtmlGenerator.GetViewContext(
210
var
viewContext = TestableHtmlGenerator.GetViewContext(
268
var
viewContext = TestableHtmlGenerator.GetViewContext(
332
var
viewContext = TestableHtmlGenerator.GetViewContext(
382
var
viewContext = CreateViewContext();
401
It.IsAny<
ViewContext
>(),
436
var
testViewContext = CreateViewContext();
458
It.IsAny<
ViewContext
>(),
464
.Callback<
ViewContext
, string, string, object, string, object>(
508
var
viewContext = CreateViewContext();
594
var
viewContext = TestableHtmlGenerator.GetViewContext(
627
var
viewContext = CreateViewContext();
684
var
viewContext = CreateViewContext();
741
var
viewContext = CreateViewContext();
799
var
viewContext = CreateViewContext();
854
var
viewContext = CreateViewContext();
900
var
viewContext = CreateViewContext();
926
.Callback((
ViewContext
_, string pageName, string pageHandler, object routeValues, string fragment, string method, object htmlAttributes) =>
963
var
viewContext = CreateViewContext();
966
generator.Setup(mock => mock.GenerateAntiforgery(It.IsAny<
ViewContext
>()))
1154
private static
ViewContext
CreateViewContext()
ImageTagHelperTest.cs (7)
147
var
viewContext = MakeViewContext();
183
var
viewContext = MakeViewContext();
243
var
viewContext = MakeViewContext();
275
var
viewContext = MakeViewContext("/bar");
291
private static
ViewContext
MakeViewContext(string requestPathBase = null)
301
var
viewContext = new ViewContext(
315
ViewContext
viewContext = null)
InputTagHelperTest.cs (13)
266
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
309
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
361
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
417
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
473
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
522
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
848
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator.Object, metadataProvider);
923
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
982
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
1042
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
1102
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
1344
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
2407
var
viewContext = TestableHtmlGenerator.GetViewContext(container, htmlGenerator, metadataProvider);
LabelTagHelperTest.cs (2)
211
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
290
var
viewContext = TestableHtmlGenerator.GetViewContext(
LinkTagHelperTest.cs (4)
819
var
viewContext = MakeViewContext("/bar");
1101
ViewContext
viewContext = null)
1122
private static
ViewContext
MakeViewContext(string requestPathBase = null)
1132
var
viewContext = new ViewContext(
OptionTagHelperTest.cs (2)
421
var
viewContext = TestableHtmlGenerator.GetViewContext(
493
var
viewContext = TestableHtmlGenerator.GetViewContext(
PartialTagHelperTest.cs (47)
90
var
viewContext = GetViewContext();
156
var
viewContext = GetViewContext();
159
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
160
.Callback((
ViewContext
v) =>
194
var
viewContext = GetViewContext();
197
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
198
.Callback((
ViewContext
v) =>
234
var
viewContext = GetViewContext();
238
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
239
.Callback((
ViewContext
v) =>
278
var
viewContext = GetViewContext();
282
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
283
.Callback((
ViewContext
v) =>
325
var
viewContext = GetViewContext();
329
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
330
.Callback((
ViewContext
v) =>
372
var
viewContext = GetViewContext();
376
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
377
.Callback((
ViewContext
v) =>
419
var
viewContext = GetViewContext();
423
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
424
.Callback((
ViewContext
v) =>
459
var
viewContext = GetViewContext();
463
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
464
.Callback((
ViewContext
v) =>
498
var
viewContext = GetViewContext();
503
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
504
.Callback((
ViewContext
v) =>
536
var
viewContext = GetViewContext();
542
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
579
var
viewContext = GetViewContext();
613
var
viewContext = GetViewContext();
616
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
617
.Callback((
ViewContext
v) =>
655
var
viewContext = GetViewContext();
658
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
659
.Callback((
ViewContext
v) =>
666
fallbackView.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
667
.Callback((
ViewContext
v) =>
716
var
viewContext = GetViewContext();
757
var
viewContext = GetViewContext();
760
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
761
.Callback((
ViewContext
v) =>
801
var
viewContext = GetViewContext();
804
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
805
.Callback((
ViewContext
v) =>
838
private static
ViewContext
GetViewContext()
PersistComponentStateTagHelperTest.cs (1)
255
private
ViewContext
GetViewContext()
RenderAtEndOfFormTagHelperTest.cs (2)
46
var
viewContext = new ViewContext();
87
var
viewContext = new ViewContext();
ScriptTagHelperTest.cs (5)
479
var
viewContext = MakeViewContext();
822
var
viewContext = MakeViewContext("/bar");
1069
ViewContext
viewContext = null)
1103
private static
ViewContext
MakeViewContext(string requestPathBase = null)
1113
var
viewContext = new ViewContext(
SelectTagHelperTest.cs (9)
227
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
317
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
403
var
viewContext = TestableHtmlGenerator.GetViewContext(
497
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
577
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator.Object, metadataProvider);
659
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator.Object, metadataProvider);
716
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
748
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
794
var
viewContext = TestableHtmlGenerator.GetViewContext(
TestableHtmlGenerator.cs (5)
60
public static
ViewContext
GetViewContext(
68
public static
ViewContext
GetViewContext(
83
var
viewContext = new ViewContext(
94
public override IHtmlContent GenerateAntiforgery(
ViewContext
viewContext)
111
ViewContext
viewContext,
TextAreaTagHelperTest.cs (3)
144
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
171
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
204
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
ValidationMessageTagHelperTest.cs (10)
63
var
viewContext = TestableHtmlGenerator.GetViewContext(
100
var
viewContext = TestableHtmlGenerator.GetViewContext(
142
var
viewContext = TestableHtmlGenerator.GetViewContext(
237
var
expectedViewContext = CreateViewContext();
308
It.IsAny<
ViewContext
>(),
338
var
viewContext = CreateViewContext();
371
It.IsAny<
ViewContext
>(),
400
var
viewContext = CreateViewContext();
441
var
viewContext = CreateViewContext();
463
private static
ViewContext
CreateViewContext()
ValidationSummaryTagHelperTest.cs (13)
75
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider, modelState);
103
var
viewContext = CreateViewContext();
171
var
viewContext = CreateViewContext();
243
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
313
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
343
var
expectedViewContext = CreateViewContext();
405
It.IsAny<
ViewContext
>(),
428
var
viewContext = CreateViewContext();
487
var
viewContext = CreateViewContext();
519
It.IsAny<
ViewContext
>(),
543
var
viewContext = CreateViewContext();
629
var
viewContext = TestableHtmlGenerator.GetViewContext(model, htmlGenerator, metadataProvider);
647
private static
ViewContext
CreateViewContext()
Microsoft.AspNetCore.Mvc.ViewFeatures (193)
DefaultHtmlGenerator.cs (31)
126
ViewContext
viewContext,
146
ViewContext
viewContext,
165
public virtual IHtmlContent GenerateAntiforgery(
ViewContext
viewContext)
188
ViewContext
viewContext,
234
ViewContext
viewContext,
256
ViewContext
viewContext,
295
ViewContext
viewContext,
313
ViewContext
viewContext,
329
ViewContext
viewContext,
361
ViewContext
viewContext,
399
ViewContext
viewContext,
424
ViewContext
viewContext,
487
ViewContext
viewContext,
506
ViewContext
viewContext,
530
ViewContext
viewContext,
597
ViewContext
viewContext,
685
ViewContext
viewContext,
711
ViewContext
viewContext,
802
ViewContext
viewContext,
901
ViewContext
viewContext,
1028
internal static string EvalString(
ViewContext
viewContext, string key, string format)
1064
internal static object GetModelStateValue(
ViewContext
viewContext, string key, Type destinationType)
1077
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
1088
ViewContext
viewContext,
1117
/// <param name="viewContext">The <see cref="
ViewContext
"/>.</param>
1130
ViewContext
viewContext,
1361
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
1366
ViewContext
viewContext,
1408
private static bool EvalBoolean(
ViewContext
viewContext, string key)
1413
private static string EvalString(
ViewContext
viewContext, string key)
1486
ViewContext
viewContext,
DefaultHtmlGeneratorExtensions.cs (4)
17
/// <param name="viewContext">The <see cref="
ViewContext
"/>.</param>
27
ViewContext
viewContext,
50
/// <param name="viewContext">The <see cref="
ViewContext
"/>.</param>
59
ViewContext
viewContext,
DefaultValidationHtmlAttributeProvider.cs (1)
45
ViewContext
viewContext,
Diagnostics\MvcDiagnostics.cs (4)
237
public BeforeViewEventData(IView view,
ViewContext
viewContext)
251
public
ViewContext
ViewContext { get; }
280
public AfterViewEventData(IView view,
ViewContext
viewContext)
294
public
ViewContext
ViewContext { get; }
HtmlHelper.cs (6)
56
private
ViewContext
_viewContext;
95
public
ViewContext
ViewContext
181
public virtual void Contextualize(
ViewContext
viewContext)
547
var
viewContext = new ViewContext(ViewContext, view, newViewData, writer);
894
/// In this context, "renders" means the method writes its output using <see cref="
ViewContext
.Writer"/>.
952
/// In this context, "renders" means the method writes its output using <see cref="
ViewContext
.Writer"/>.
HtmlHelperOfT.cs (2)
48
public override void Contextualize(
ViewContext
viewContext)
56
typeof(
ViewContext
)),
HtmlHelperOptions.cs (1)
9
/// Provides programmatic configuration for the HTML helpers and <see cref="
ViewContext
"/>.
IHtmlGenerator.cs (40)
44
/// <param name="viewContext">The <see cref="
ViewContext
"/> instance for the current scope.</param>
65
ViewContext
viewContext,
78
/// <param name="viewContext">The <see cref="
ViewContext
"/> instance for the current scope.</param>
99
ViewContext
viewContext,
112
/// <param name="viewContext">The <see cref="
ViewContext
"/> instance for the current scope.</param>
117
IHtmlContent GenerateAntiforgery(
ViewContext
viewContext);
122
/// <param name="viewContext">The <see cref="
ViewContext
"/> instance for the current scope.</param>
134
ViewContext
viewContext,
146
ViewContext
viewContext,
154
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
172
ViewContext
viewContext,
183
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
202
ViewContext
viewContext,
214
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
231
ViewContext
viewContext,
240
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
253
ViewContext
viewContext,
263
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
275
ViewContext
viewContext,
284
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
296
ViewContext
viewContext,
305
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
318
ViewContext
viewContext,
328
/// <param name="viewContext">The <see cref="
ViewContext
"/> instance for the current scope.</param>
348
ViewContext
viewContext,
360
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
392
ViewContext
viewContext,
403
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
441
ViewContext
viewContext,
466
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
479
ViewContext
viewContext,
489
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
502
ViewContext
viewContext,
513
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
523
/// <see cref="
ViewContext
.ValidationMessageElement"/>.
530
/// <remarks><see cref="
ViewContext
.ValidationMessageElement"/> is <c>"span"</c> by default.</remarks>
532
ViewContext
viewContext,
554
ViewContext
viewContext,
563
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
595
ViewContext
viewContext,
IViewContextAware.cs (3)
9
/// Contract for contextualizing a property activated by a view with the <see cref="
ViewContext
"/>.
17
/// <param name="viewContext">The <see cref="
ViewContext
"/>.</param>
18
void Contextualize(
ViewContext
viewContext);
MvcViewFeaturesDiagnosticListenerExtensions.cs (4)
123
ViewContext
viewContext)
132
private static void BeforeViewImpl(DiagnosticListener diagnosticListener, IView view,
ViewContext
viewContext)
145
ViewContext
viewContext)
154
private static void AfterViewImpl(DiagnosticListener diagnosticListener, IView view,
ViewContext
viewContext)
MvcViewOptions.cs (1)
23
/// Gets or sets programmatic configuration for the HTML helpers and <see cref="Rendering.
ViewContext
"/>.
NameAndIdProvider.cs (6)
18
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
32
public static string CreateSanitizedId(
ViewContext
viewContext, string fullName, string invalidCharReplacement)
78
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
92
ViewContext
viewContext,
122
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
128
public static string GetFullHtmlFieldName(
ViewContext
viewContext, string expression)
NullView.cs (1)
15
public Task RenderAsync(
ViewContext
context)
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\HtmlHelperValidationExtensions.cs (19)
21
/// A new <see cref="IHtmlContent"/> containing a <see cref="
ViewContext
.ValidationMessageElement"/> element.
50
/// A new <see cref="IHtmlContent"/> containing a <see cref="
ViewContext
.ValidationMessageElement"/> element.
72
/// (<see cref="
ViewContext
.ValidationMessageElement"/>) element. Alternatively, an
77
/// A new <see cref="IHtmlContent"/> containing a <see cref="
ViewContext
.ValidationMessageElement"/> element.
108
/// <see cref="
ViewContext
.ValidationMessageElement"/>.
139
/// (<see cref="
ViewContext
.ValidationMessageElement"/>) element. Alternatively, an
144
/// A new <see cref="IHtmlContent"/> containing a <see cref="
ViewContext
.ValidationMessageElement"/> element.
168
/// A new <see cref="IHtmlContent"/> containing a <see cref="
ViewContext
.ValidationMessageElement"/> element.
200
/// A new <see cref="IHtmlContent"/> containing a <see cref="
ViewContext
.ValidationMessageElement"/> element.
228
/// (<see cref="
ViewContext
.ValidationMessageElement"/>) element. Alternatively, an
235
/// A new <see cref="IHtmlContent"/> containing a <see cref="
ViewContext
.ValidationMessageElement"/> element.
264
/// <see cref="
ViewContext
.ValidationMessageElement"/>.
336
/// <see cref="
ViewContext
.ValidationSummaryMessageElement" /> element (which wraps the
359
/// <see cref="
ViewContext
.ValidationSummaryMessageElement" />.
388
/// <see cref="
ViewContext
.ValidationSummaryMessageElement" /> element (which, in turn, wraps the
419
/// <see cref="
ViewContext
.ValidationSummaryMessageElement" /> element (which wraps the
450
/// <see cref="
ViewContext
.ValidationSummaryMessageElement" />.
483
/// <see cref="
ViewContext
.ValidationSummaryMessageElement" />.
521
/// <see cref="
ViewContext
.ValidationSummaryMessageElement" /> element (which wraps the
Rendering\IHtmlHelper.cs (7)
41
ViewContext
ViewContext { get; }
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"/>.
679
/// <see cref="
ViewContext
.ValidationMessageElement"/>.
702
/// <see cref="
ViewContext
.ValidationSummaryMessageElement" />.
Rendering\IHtmlHelperOfT.cs (1)
409
/// <see cref="
ViewContext
.ValidationMessageElement"/>.
Rendering\MvcForm.cs (3)
15
private readonly
ViewContext
_viewContext;
23
/// <param name="viewContext">The <see cref="
ViewContext
"/>.</param>
25
public MvcForm(
ViewContext
viewContext, HtmlEncoder htmlEncoder)
Rendering\ViewContext.cs (5)
24
/// Creates an empty <see cref="
ViewContext
"/>.
39
/// Initializes a new instance of <see cref="
ViewContext
"/>.
78
/// Initializes a new instance of <see cref="
ViewContext
"/>.
80
/// <param name="viewContext">The <see cref="
ViewContext
"/> to copy values from.</param>
85
ViewContext
viewContext,
TemplateBuilder.cs (2)
18
private readonly
ViewContext
_viewContext;
31
ViewContext
viewContext,
TemplateRenderer.cs (5)
73
private readonly
ViewContext
_viewContext;
81
ViewContext
viewContext,
122
var
viewContext = new ViewContext(_viewContext, viewEngineResult.View, _viewData, writer);
238
private static IHtmlHelper MakeHtmlHelper(
ViewContext
viewContext, ViewDataDictionary viewData)
244
var
newViewContext = new ViewContext(viewContext, viewContext.View, viewData, viewContext.Writer);
ValidationHtmlAttributeProvider.cs (4)
17
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
28
ViewContext
viewContext,
37
/// <param name="viewContext">A <see cref="
ViewContext
"/> instance for the current scope.</param>
51
ViewContext
viewContext,
ViewComponent.cs (1)
129
public
ViewContext
ViewContext => ViewComponentContext.ViewContext;
ViewComponentResultExecutor.cs (2)
102
var
viewContext = new ViewContext(
136
private static void OnExecuting(
ViewContext
viewContext)
ViewComponents\DefaultViewComponentHelper.cs (2)
26
private
ViewContext
_viewContext = default!;
59
public void Contextualize(
ViewContext
viewContext)
ViewComponents\ViewComponentContext.cs (3)
43
ViewContext
viewContext,
90
/// Gets or sets the <see cref="Rendering.
ViewContext
"/>.
95
public
ViewContext
ViewContext { get; set; }
ViewComponents\ViewViewComponentResult.cs (2)
73
var
viewContext = context.ViewContext;
118
var
childViewContext = new ViewContext(
ViewContextAttribute.cs (1)
8
/// <see cref="Rendering.
ViewContext
"/> when creating the tag helper. The property must have a
ViewEngines\IView.cs (2)
23
/// <param name="context">The <see cref="
ViewContext
"/>.</param>
25
Task RenderAsync(
ViewContext
context);
ViewExecutor.cs (4)
157
var
viewContext = new ViewContext(
171
/// <param name="viewContext">The <see cref="
ViewContext
"/> associated with the current request.</param>
181
ViewContext
viewContext,
233
private static void OnExecuting(
ViewContext
viewContext)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (139)
DefaultDisplayTemplatesTest.cs (1)
350
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
DefaultEditorTemplatesTest.cs (3)
1298
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
1384
public
ViewContext
ViewContext
1404
public void Contextualize(
ViewContext
viewContext)
DefaultHtmlGeneratorTest.cs (32)
32
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
53
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
73
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
86
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
114
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
142
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
169
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
198
var
viewContext = GetViewContext<ModelWithMaxLengthMetadata>(model: null, metadataProvider: metadataProvider);
222
var
viewContext = GetViewContext<ModelWithMaxLengthMetadata>(model: null, metadataProvider: metadataProvider);
246
var
viewContext = GetViewContext<ModelWithMaxLengthMetadata>(model: null, metadataProvider: metadataProvider);
268
var
viewContext = GetViewContext<ModelWithMaxLengthMetadata>(model: null, metadataProvider: metadataProvider);
290
var
viewContext = GetViewContext<ModelWithMaxLengthMetadata>(model: null, metadataProvider: metadataProvider);
313
var
viewContext = GetViewContext<ModelWithMaxLengthMetadata>(model: null, metadataProvider: metadataProvider);
365
var
viewContext = GetViewContext<Model>(model: null, metadataProvider, htmlHelperOptions);
395
var
viewContext = GetViewContext<Model>(model: null, metadataProvider, htmlHelperOptions);
421
var
viewContext = GetViewContext<ModelWithMaxLengthMetadata>(model: null, metadataProvider: metadataProvider);
442
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
469
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
498
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
521
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
588
var
viewContext = GetViewContext<Model>(model, metadataProvider);
616
var
viewContext = GetViewContext<Model>(model, metadataProvider);
664
var
viewContext = GetViewContext<Model>(model, metadataProvider);
692
var
viewContext = GetViewContext<Model>(model, metadataProvider);
716
var
viewContext = GetViewContext<Model>(model, metadataProvider);
770
var
viewContext = GetViewContext<Model>(model, metadataProvider);
799
var
viewContext = GetViewContext<Model>(model, metadataProvider);
826
var
viewContext = GetViewContext<Model>(model, metadataProvider);
938
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
965
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
990
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
1031
private static
ViewContext
GetViewContext<TModel>(TModel model, IModelMetadataProvider metadataProvider, HtmlHelperOptions options = default)
DefaultValidationHtmlAttributeProviderTest.cs (12)
28
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
63
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
97
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
120
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
131
It.IsAny<
ViewContext
>(),
148
It.IsAny<
ViewContext
>(),
161
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
195
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
206
It.IsAny<
ViewContext
>(),
223
It.IsAny<
ViewContext
>(),
235
var
viewContext = GetViewContext<Model>(model: null, metadataProvider: metadataProvider);
251
private static
ViewContext
GetViewContext<TModel>(TModel model, IModelMetadataProvider metadataProvider)
PartialViewResultTest.cs (1)
185
.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
Rendering\DefaultTemplatesUtilities.cs (3)
288
var
viewContext = new ViewContext(
307
.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
308
.Callback(async (
ViewContext
v) =>
Rendering\HtmlHelperDisplayExtensionsTest.cs (26)
51
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
52
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData["SomeProperty"].ToString()))
134
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
135
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData.TemplateInfo.FormattedModelValue.ToString()))
160
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
161
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData.TemplateInfo.FormattedModelValue.ToString()))
186
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
187
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData["SomeProperty"].ToString()))
214
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
215
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData.TemplateInfo.HtmlFieldPrefix))
242
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
243
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData["SomeProperty"].ToString()))
289
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
290
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData["SomeProperty"].ToString()))
320
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
321
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData.TemplateInfo.FormattedModelValue.ToString()))
361
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
362
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData.TemplateInfo.FormattedModelValue.ToString()))
386
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
387
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData.TemplateInfo.HtmlFieldPrefix))
414
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
415
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData["SomeProperty"].ToString()))
461
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
462
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData["SomeProperty"].ToString()))
488
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
489
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData.TemplateInfo.HtmlFieldPrefix))
Rendering\HtmlHelperEditorExtensionsTest.cs (4)
18
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
19
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData.TemplateInfo.FormattedModelValue.ToString()))
44
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
45
.Callback((
ViewContext
v) => v.Writer.WriteAsync(v.ViewData.TemplateInfo.FormattedModelValue.ToString()))
Rendering\HtmlHelperFormTest.cs (34)
340
var
viewContext = htmlHelper.ViewContext;
372
It.IsAny<
ViewContext
>(),
381
.Setup(g => g.GenerateAntiforgery(It.IsAny<
ViewContext
>()))
387
var
viewContext = htmlHelper.ViewContext;
410
It.IsAny<
ViewContext
>(),
419
.Setup(g => g.GenerateAntiforgery(It.IsAny<
ViewContext
>()))
425
var
viewContext = htmlHelper.ViewContext;
449
It.IsAny<
ViewContext
>(),
458
.Setup(g => g.GenerateAntiforgery(It.IsAny<
ViewContext
>()))
464
var
viewContext = htmlHelper.ViewContext;
487
It.IsAny<
ViewContext
>(),
496
.Setup(g => g.GenerateAntiforgery(It.IsAny<
ViewContext
>()))
502
var
viewContext = htmlHelper.ViewContext;
527
It.IsAny<
ViewContext
>(),
536
.Setup(g => g.GenerateAntiforgery(It.IsAny<
ViewContext
>()))
542
var
viewContext = htmlHelper.ViewContext;
566
It.IsAny<
ViewContext
>(),
575
.Setup(g => g.GenerateAntiforgery(It.IsAny<
ViewContext
>()))
581
var
viewContext = htmlHelper.ViewContext;
607
It.IsAny<
ViewContext
>(),
615
.Setup(g => g.GenerateAntiforgery(It.IsAny<
ViewContext
>()))
621
var
viewContext = htmlHelper.ViewContext;
644
It.IsAny<
ViewContext
>(),
652
.Setup(g => g.GenerateAntiforgery(It.IsAny<
ViewContext
>()))
658
var
viewContext = htmlHelper.ViewContext;
687
It.IsAny<
ViewContext
>(),
695
.Setup(g => g.GenerateAntiforgery(It.IsAny<
ViewContext
>()))
701
var
viewContext = htmlHelper.ViewContext;
729
It.IsAny<
ViewContext
>(),
737
.Setup(g => g.GenerateAntiforgery(It.IsAny<
ViewContext
>()))
743
var
viewContext = htmlHelper.ViewContext;
773
It.IsAny<
ViewContext
>(),
781
.Setup(g => g.GenerateAntiforgery(It.IsAny<
ViewContext
>()))
787
var
viewContext = htmlHelper.ViewContext;
Rendering\HtmlHelperTest.cs (5)
294
var
viewContext = DefaultTemplatesUtilities
315
var
viewContext = DefaultTemplatesUtilities
319
var expectedMessage = $"Property '{nameof(
ViewContext
.ViewData)}' is of type " +
335
var
viewContext = DefaultTemplatesUtilities
340
var expectedMessage = $"Property '{nameof(
ViewContext
.ViewData)}' is of type " +
Rendering\ViewContextTests.cs (3)
22
var
context = new ViewContext(
49
var
originalContext = new ViewContext(
61
var
context = new ViewContext(originalContext, view, viewData, writer);
ViewComponents\ContentViewComponentResultTest.cs (1)
42
var
viewContext = new ViewContext(
ViewComponents\HtmlContentViewComponentResultTest.cs (1)
42
var
viewContext = new ViewContext(
ViewComponents\ViewComponentContextTest.cs (2)
25
var
viewContext = new ViewContext(
87
var
viewContext = new ViewContext(
ViewComponents\ViewViewComponentResultTest.cs (5)
30
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
69
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
103
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
264
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
522
var
viewContext = new ViewContext(
ViewComponentTests.cs (1)
242
var
viewContext = new ViewContext();
ViewExecutorTest.cs (4)
301
view.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
302
.Callback((
ViewContext
v) =>
380
private IView CreateView(Func<
ViewContext
, Task> action)
384
.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
ViewResultTest.cs (1)
197
.Setup(v => v.RenderAsync(It.IsAny<
ViewContext
>()))
RazorWebSite (2)
Services\BackSlashExpander.cs (1)
17
if (context.ActionContext is
ViewContext
viewContext && (string)viewContext.ViewData["back-slash"] == "true")
Services\TestBodyTagHelperComponent.cs (1)
26
public
ViewContext
ViewContext { get; set; }
TagHelpersWebSite (3)
TagHelpers\ATagHelper.cs (1)
24
public
ViewContext
ViewContext { get; set; }
TagHelpers\PrettyTagHelper.cs (1)
29
public
ViewContext
ViewContext { get; set; }
TagHelpers\TagCloudViewComponentTagHelper.cs (1)
36
public
ViewContext
ViewContext { get; set; }