16 references to ViewContext
HtmlGenerationWebSite (2)
Components\CheckViewData - LackModel.cs (1)
15
var writer =
ViewContext
.Writer;
Components\CheckViewData.cs (1)
14
var writer =
ViewContext
.Writer;
Microsoft.AspNetCore.Mvc.ViewFeatures (6)
ViewComponent.cs (6)
34
public HttpContext HttpContext =>
ViewContext
?.HttpContext!;
39
public HttpRequest Request =>
ViewContext
?.HttpContext?.Request!;
44
public IPrincipal User =>
ViewContext
?.HttpContext?.User!;
49
public ClaimsPrincipal UserClaimsPrincipal =>
ViewContext
?.HttpContext?.User!;
54
public RouteData RouteData =>
ViewContext
?.RouteData!;
127
/// Gets the <see cref="
ViewContext
"/>.
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (8)
ViewComponentTests.cs (8)
225
Assert.NotNull(viewComponent.
ViewContext
);
226
Assert.NotNull(viewComponent.
ViewContext
.ViewData);
227
Assert.Null(viewComponent.
ViewContext
.TempData);
230
Assert.Empty(viewComponent.
ViewContext
.ViewData);
233
Assert.Same(viewComponent.ViewData, viewComponent.
ViewContext
.ViewData);
252
Assert.NotNull(viewComponent.
ViewContext
.TempData);
253
Assert.Empty(viewComponent.
ViewContext
.TempData);
254
Assert.Same(viewComponent.TempData, viewComponent.
ViewContext
.TempData);