9 writes to ViewContext
Microsoft.AspNetCore.Mvc.Razor.Test (4)
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.TagHelpers.Test (5)
ImageTagHelperTest.cs (2)
195
helper.
ViewContext
= viewContext;
329
ViewContext
= viewContext,
LinkTagHelperTest.cs (2)
822
helper.
ViewContext
= viewContext;
1118
ViewContext
= viewContext,
ScriptTagHelperTest.cs (1)
1086
ViewContext
= viewContext,
33 references to ViewContext
Microsoft.AspNetCore.Mvc.Razor (4)
TagHelpers\UrlResolutionTagHelper.cs (4)
110
/// The <see cref="
ViewContext
"/>.
228
var urlHelper = UrlHelperFactory.GetUrlHelper(
ViewContext
);
253
var urlHelper = UrlHelperFactory.GetUrlHelper(
ViewContext
);
340
return
ViewContext
.HttpContext.GetEndpoint()?.Metadata.GetMetadata<ResourceAssetCollection>();
Microsoft.AspNetCore.Mvc.TagHelpers (12)
ImageTagHelper.cs (3)
136
FileVersionProvider =
ViewContext
.HttpContext.RequestServices.GetRequiredService<IFileVersionProvider>();
144
var pathBase =
ViewContext
.HttpContext.Request.PathBase;
145
if (ResourceCollectionUtilities.TryResolveFromAssetCollection(
ViewContext
, url, out var resolvedUrl))
LinkTagHelper.cs (4)
477
ViewContext
.HttpContext.Request.PathBase);
485
FileVersionProvider =
ViewContext
.HttpContext.RequestServices.GetRequiredService<IFileVersionProvider>();
536
var pathBase =
ViewContext
.HttpContext.Request.PathBase;
538
if (ResourceCollectionUtilities.TryResolveFromAssetCollection(
ViewContext
, url, out var resolvedUrl))
ScriptTagHelper.cs (5)
247
var importMap = ImportMap ??
ViewContext
.HttpContext.GetEndpoint()?.Metadata.GetMetadata<ImportMapDefinition>();
416
var pathBase =
ViewContext
.HttpContext.Request.PathBase;
417
if (ResourceCollectionUtilities.TryResolveFromAssetCollection(
ViewContext
, srcValue, out var resolvedUrl))
465
ViewContext
.HttpContext.Request.PathBase);
473
FileVersionProvider =
ViewContext
.HttpContext.RequestServices.GetRequiredService<IFileVersionProvider>();
Microsoft.AspNetCore.Mvc.TagHelpers.Test (17)
ImageTagHelperTest.cs (3)
196
helper.
ViewContext
.HttpContext = new DefaultHttpContext();
197
helper.
ViewContext
.HttpContext.SetEndpoint(CreateEndpoint());
200
helper.
ViewContext
.HttpContext.Request.PathBase = new PathString(pathBase);
LinkTagHelperTest.cs (5)
750
helper.
ViewContext
.HttpContext.SetEndpoint(CreateEndpoint());
791
helper.
ViewContext
.HttpContext.SetEndpoint(CreateEndpoint());
792
helper.
ViewContext
.HttpContext.Request.PathBase = "/approot";
925
helper.
ViewContext
.HttpContext.SetEndpoint(CreateEndpoint());
1080
helper.
ViewContext
.HttpContext.SetEndpoint(CreateEndpoint());
ScriptTagHelperTest.cs (9)
659
helper.
ViewContext
.HttpContext.SetEndpoint(CreateEndpoint());
696
helper.
ViewContext
.HttpContext.SetEndpoint(CreateEndpoint());
697
helper.
ViewContext
.HttpContext.Request.PathBase = "/approot";
742
helper.
ViewContext
.HttpContext.SetEndpoint(CreateEndpoint());
786
helper.
ViewContext
.HttpContext.SetEndpoint(CreateEndpoint(importMap));
882
helper.
ViewContext
.HttpContext.SetEndpoint(CreateEndpoint());
1012
helper.
ViewContext
.HttpContext.SetEndpoint(CreateEndpoint());
1051
helper.
ViewContext
.HttpContext.SetEndpoint(CreateEndpoint());
1052
helper.
ViewContext
.HttpContext.Request.PathBase = "/approot";