2 implementations of GetUrlHelper
Microsoft.AspNetCore.Mvc.Core (1)
Routing\UrlHelperFactory.cs (1)
17public IUrlHelper GetUrlHelper(ActionContext context)
Microsoft.AspNetCore.Mvc.Core.Test (1)
AcceptedAtActionResultTests.cs (1)
295public IUrlHelper GetUrlHelper(ActionContext context) => new ForwardingUrlHelper() { ActionValue = "abc" };
64 references to GetUrlHelper
BasicWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
57var urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
ControllersFromServicesClassLibrary (1)
ControllerWithConstructorInjection.cs (1)
27var urlHelper = UrlHelperFactory.GetUrlHelper(ActionContext);
GenericHostWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
57var urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
Microsoft.AspNetCore.Mvc.Core (10)
AcceptedAtActionResult.cs (1)
75urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
AcceptedAtRouteResult.cs (1)
76urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
ControllerBase.cs (1)
144_url = factory?.GetUrlHelper(ControllerContext);
CreatedAtActionResult.cs (1)
75urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
CreatedAtRouteResult.cs (1)
76urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
Infrastructure\LocalRedirectResultExecutor.cs (1)
41var urlHelper = result.UrlHelper ?? _urlHelperFactory.GetUrlHelper(context);
Infrastructure\RedirectResultExecutor.cs (1)
38var urlHelper = result.UrlHelper ?? _urlHelperFactory.GetUrlHelper(context);
Infrastructure\RedirectToActionResultExecutor.cs (1)
39var urlHelper = result.UrlHelper ?? _urlHelperFactory.GetUrlHelper(context);
Infrastructure\RedirectToPageResultExecutor.cs (1)
39var urlHelper = result.UrlHelper ?? _urlHelperFactory.GetUrlHelper(context);
Infrastructure\RedirectToRouteResultExecutor.cs (1)
36var urlHelper = result.UrlHelper ?? _urlHelperFactory.GetUrlHelper(context);
Microsoft.AspNetCore.Mvc.Core.Test (2)
RedirectToRouteResultTest.cs (1)
97.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>()))
Routing\EndpointRoutingUrlHelperTest.cs (1)
144var urlHelper = urlHelperFactory.GetUrlHelper(actionContext);
Microsoft.AspNetCore.Mvc.Razor (4)
RazorPageActivator.cs (1)
42UrlHelperAccessor = urlHelperFactory.GetUrlHelper,
RazorPageBase.cs (1)
357_urlHelper = factory.GetUrlHelper(viewContext);
TagHelpers\UrlResolutionTagHelper.cs (2)
228var urlHelper = UrlHelperFactory.GetUrlHelper(ViewContext); 253var urlHelper = UrlHelperFactory.GetUrlHelper(ViewContext);
Microsoft.AspNetCore.Mvc.Razor.Test (10)
RazorPageActivatorTest.cs (3)
55var urlHelper = UrlHelperFactory.GetUrlHelper(viewContext); 91var urlHelper = UrlHelperFactory.GetUrlHelper(viewContext); 118var urlHelper = UrlHelperFactory.GetUrlHelper(viewContext);
RazorPageTest.cs (1)
840.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>()))
TagHelpers\UrlResolutionTagHelperTest.cs (6)
111.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>())) 171.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>())) 232.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>())) 288.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>())) 365.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>())) 403.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>()))
Microsoft.AspNetCore.Mvc.RazorPages (1)
PageModel.cs (1)
121_urlHelper = factory?.GetUrlHelper(PageContext);
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\DefaultPageFactoryProviderTest.cs (1)
82.Setup(f => f.GetUrlHelper(viewContext))
PageModelTest.cs (1)
1787urlHelperFactory.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>()))
Microsoft.AspNetCore.Mvc.TagHelpers (1)
FormActionTagHelper.cs (1)
247var urlHelper = UrlHelperFactory.GetUrlHelper(ViewContext);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (14)
FormActionTagHelperTest.cs (7)
51.Setup(f => f.GetUrlHelper(viewContext)) 126.Setup(f => f.GetUrlHelper(viewContext)) 231.Setup(f => f.GetUrlHelper(viewContext)) 290.Setup(f => f.GetUrlHelper(viewContext)) 362.Setup(f => f.GetUrlHelper(viewContext)) 416.Setup(f => f.GetUrlHelper(viewContext)) 486.Setup(f => f.GetUrlHelper(viewContext))
ImageTagHelperTest.cs (2)
64.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>())) 391.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>()))
LinkTagHelperTest.cs (2)
62.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>())) 1214.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>()))
ScriptTagHelperTest.cs (2)
61.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>())) 1168.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>()))
TestableHtmlGenerator.cs (1)
133.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>()))
Microsoft.AspNetCore.Mvc.ViewFeatures (9)
DefaultHtmlGenerator.cs (6)
139var urlHelper = _urlHelperFactory.GetUrlHelper(viewContext); 159var urlHelper = _urlHelperFactory.GetUrlHelper(viewContext); 286var urlHelper = _urlHelperFactory.GetUrlHelper(viewContext); 305var urlHelper = _urlHelperFactory.GetUrlHelper(viewContext); 321var urlHelper = _urlHelperFactory.GetUrlHelper(viewContext); 499var urlHelper = _urlHelperFactory.GetUrlHelper(viewContext);
PageRemoteAttribute.cs (1)
45var urlHelper = factory.GetUrlHelper(context.ActionContext);
RemoteAttribute.cs (1)
113var urlHelper = factory.GetUrlHelper(context.ActionContext);
ViewComponent.cs (1)
89_url = factory?.GetUrlHelper(ViewComponentContext.ViewContext!);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (4)
PageRemoteAttributeTest.cs (1)
168.Setup(f => f.GetUrlHelper(actionContext))
RemoteAttributeTest.cs (2)
371.Setup(f => f.GetUrlHelper(actionContext)) 413.Setup(f => f.GetUrlHelper(actionContext))
Rendering\DefaultTemplatesUtilities.cs (1)
247.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>()))
Microsoft.AspNetCore.Mvc.Views.TestCommon (1)
HtmlGeneratorUtilities.cs (1)
21.Setup(f => f.GetUrlHelper(It.IsAny<ActionContext>()))
Mvc.RoutingWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
57var urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
TagHelpersWebSite (1)
TagHelpers\ATagHelper.cs (1)
41var urlHelper = UrlHelperFactory.GetUrlHelper(ViewContext);
VersioningWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
57var urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);