2 implementations of IUrlHelperFactory
Microsoft.AspNetCore.Mvc.Core (1)
Routing\UrlHelperFactory.cs (1)
14public class UrlHelperFactory : IUrlHelperFactory
Microsoft.AspNetCore.Mvc.Core.Test (1)
AcceptedAtActionResultTests.cs (1)
293private class ForwardingUrlHelperFactory : IUrlHelperFactory
128 references to IUrlHelperFactory
BasicWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
57var urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
ControllersFromServicesClassLibrary (2)
ControllerWithConstructorInjection.cs (2)
11public ConstructorInjectionController(IUrlHelperFactory urlHelperFactory, QueryValueService queryService) 22private IUrlHelperFactory UrlHelperFactory { get; }
GenericHostWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
57var urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
Microsoft.AspNetCore.Mvc.Core (18)
AcceptedAtActionResult.cs (1)
75urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
AcceptedAtRouteResult.cs (1)
76urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
ControllerBase.cs (2)
143var factory = HttpContext?.RequestServices?.GetRequiredService<IUrlHelperFactory>();
CreatedAtActionResult.cs (1)
75urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
CreatedAtRouteResult.cs (1)
76urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
229services.TryAddSingleton<IUrlHelperFactory, UrlHelperFactory>();
Infrastructure\LocalRedirectResultExecutor.cs (2)
19private readonly IUrlHelperFactory _urlHelperFactory; 26public LocalRedirectResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\RedirectResultExecutor.cs (2)
16private readonly IUrlHelperFactory _urlHelperFactory; 23public RedirectResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\RedirectToActionResultExecutor.cs (2)
17private readonly IUrlHelperFactory _urlHelperFactory; 24public RedirectToActionResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\RedirectToPageResultExecutor.cs (2)
17private readonly IUrlHelperFactory _urlHelperFactory; 24public RedirectToPageResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\RedirectToRouteResultExecutor.cs (2)
17private readonly IUrlHelperFactory _urlHelperFactory; 24public RedirectToRouteResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Routing\UrlHelperFactory.cs (1)
12/// A default implementation of <see cref="IUrlHelperFactory"/>.
Microsoft.AspNetCore.Mvc.Core.Test (12)
LocalRedirectResultTest.cs (1)
140serviceCollection.AddSingleton<IUrlHelperFactory, UrlHelperFactory>();
RedirectResultTest.cs (1)
29serviceCollection.AddSingleton<IUrlHelperFactory, UrlHelperFactory>();
RedirectToActionResultTest.cs (1)
151services.AddSingleton<IUrlHelperFactory, UrlHelperFactory>();
RedirectToPageResultTest.cs (2)
292private static IServiceProvider CreateServices(IUrlHelperFactory factory = null) 303services.AddSingleton<IUrlHelperFactory, UrlHelperFactory>();
RedirectToRouteResultTest.cs (4)
95var factory = new Mock<IUrlHelperFactory>(); 165private static HttpContext GetHttpContext(IUrlHelperFactory factory = null) 175private static IServiceCollection CreateServices(IUrlHelperFactory factory = null) 186services.AddSingleton<IUrlHelperFactory, UrlHelperFactory>();
Routing\EndpointRoutingUrlHelperTest.cs (3)
143var urlHelperFactory = httpContext.RequestServices.GetRequiredService<IUrlHelperFactory>(); 288services.TryAddSingleton<IUrlHelperFactory, UrlHelperFactory>();
Microsoft.AspNetCore.Mvc.Razor (7)
RazorPageActivator.cs (1)
31IUrlHelperFactory urlHelperFactory,
RazorPageBase.cs (2)
356var factory = services.GetRequiredService<IUrlHelperFactory>();
TagHelpers\UrlResolutionTagHelper.cs (4)
88/// <param name="urlHelperFactory">The <see cref="IUrlHelperFactory"/>.</param> 90public UrlResolutionTagHelper(IUrlHelperFactory urlHelperFactory, HtmlEncoder htmlEncoder) 100/// The <see cref="IUrlHelperFactory"/>. 102protected IUrlHelperFactory UrlHelperFactory { get; }
Microsoft.AspNetCore.Mvc.Razor.Test (10)
RazorPageActivatorTest.cs (1)
43private IUrlHelperFactory UrlHelperFactory { get; }
RazorPageTest.cs (2)
838var factory = new Mock<IUrlHelperFactory>(); 849services.Setup(s => s.GetService(typeof(IUrlHelperFactory)))
TagHelpers\UrlResolutionTagHelperTest.cs (7)
76var tagHelper = new UrlResolutionTagHelper(Mock.Of<IUrlHelperFactory>(), new HtmlTestEncoder()); 109var urlHelperFactory = new Mock<IUrlHelperFactory>(); 169var urlHelperFactory = new Mock<IUrlHelperFactory>(); 230var urlHelperFactory = new Mock<IUrlHelperFactory>(); 286var urlHelperFactory = new Mock<IUrlHelperFactory>(); 363var urlHelperFactory = new Mock<IUrlHelperFactory>(); 401var urlHelperFactory = new Mock<IUrlHelperFactory>();
Microsoft.AspNetCore.Mvc.RazorPages (3)
Infrastructure\DefaultPageFactoryProvider.cs (1)
24IUrlHelperFactory urlHelperFactory,
PageModel.cs (2)
120var factory = HttpContext?.RequestServices?.GetRequiredService<IUrlHelperFactory>();
Microsoft.AspNetCore.Mvc.RazorPages.Test (4)
Infrastructure\DefaultPageFactoryProviderTest.cs (3)
79var urlHelperFactory = new Mock<IUrlHelperFactory>(); 368IUrlHelperFactory urlHelperFactory = null, 377urlHelperFactory ?? Mock.Of<IUrlHelperFactory>(),
PageModelTest.cs (1)
1786var urlHelperFactory = new Mock<IUrlHelperFactory>();
Microsoft.AspNetCore.Mvc.TagHelpers (12)
FormActionTagHelper.cs (4)
83/// <param name="urlHelperFactory">The <see cref="IUrlHelperFactory"/>.</param> 84public FormActionTagHelper(IUrlHelperFactory urlHelperFactory) 100/// Gets the <see cref="IUrlHelperFactory"/> used to create an <see cref="IUrlHelper"/> to generate links. 102protected IUrlHelperFactory UrlHelperFactory { get; }
ImageTagHelper.cs (4)
36/// <param name="urlHelperFactory">The <see cref="IUrlHelperFactory"/>.</param> 43IUrlHelperFactory urlHelperFactory) 57/// <param name="urlHelperFactory">The <see cref="IUrlHelperFactory"/>.</param> 64IUrlHelperFactory urlHelperFactory)
LinkTagHelper.cs (2)
103/// <param name="urlHelperFactory">The <see cref="IUrlHelperFactory"/>.</param> 112IUrlHelperFactory urlHelperFactory)
ScriptTagHelper.cs (2)
94/// <param name="urlHelperFactory">The <see cref="IUrlHelperFactory"/>.</param> 103IUrlHelperFactory urlHelperFactory)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (36)
DefaultTagHelperActivatorTest.cs (1)
62.AddSingleton(Mock.Of<IUrlHelperFactory>())
FormActionTagHelperTest.cs (17)
49var urlHelperFactory = new Mock<IUrlHelperFactory>(MockBehavior.Strict); 124var urlHelperFactory = new Mock<IUrlHelperFactory>(MockBehavior.Strict); 229var urlHelperFactory = new Mock<IUrlHelperFactory>(MockBehavior.Strict); 288var urlHelperFactory = new Mock<IUrlHelperFactory>(MockBehavior.Strict); 360var urlHelperFactory = new Mock<IUrlHelperFactory>(MockBehavior.Strict); 414var urlHelperFactory = new Mock<IUrlHelperFactory>(MockBehavior.Strict); 484var urlHelperFactory = new Mock<IUrlHelperFactory>(MockBehavior.Strict); 515var urlHelperFactory = new Mock<IUrlHelperFactory>().Object; 560var urlHelperFactory = new Mock<IUrlHelperFactory>().Object; 598var urlHelperFactory = new Mock<IUrlHelperFactory>().Object; 636var urlHelperFactory = new Mock<IUrlHelperFactory>().Object; 674var urlHelperFactory = new Mock<IUrlHelperFactory>().Object;
ImageTagHelperTest.cs (5)
62var urlHelperFactory = new Mock<IUrlHelperFactory>(); 185var urlHelperFactory = MakeUrlHelperFactory(value => 314IUrlHelperFactory urlHelperFactory = null, 381private static IUrlHelperFactory MakeUrlHelperFactory(Func<string, string> contentAction = null) 389var urlHelperFactory = new Mock<IUrlHelperFactory>();
LinkTagHelperTest.cs (5)
60var urlHelperFactory = new Mock<IUrlHelperFactory>(); 780var urlHelperFactory = MakeUrlHelperFactory(value => 1100IUrlHelperFactory urlHelperFactory = null, 1204private static IUrlHelperFactory MakeUrlHelperFactory(Func<string,string> content = null) 1212var urlHelperFactory = new Mock<IUrlHelperFactory>();
ScriptTagHelperTest.cs (6)
59var urlHelperFactory = new Mock<IUrlHelperFactory>(); 685var urlHelperFactory = MakeUrlHelperFactory(value => 1043var urlHelperFactory = MakeUrlHelperFactory(value => 1068IUrlHelperFactory urlHelperFactory = null, 1158private static IUrlHelperFactory MakeUrlHelperFactory(Func<string, string> urlResolver = null) 1166var urlHelperFactory = new Mock<IUrlHelperFactory>();
TestableHtmlGenerator.cs (2)
129private static IUrlHelperFactory CreateUrlHelperFactory(IUrlHelper urlHelper) 131var factory = new Mock<IUrlHelperFactory>();
Microsoft.AspNetCore.Mvc.ViewFeatures (9)
DefaultHtmlGenerator.cs (3)
40private readonly IUrlHelperFactory _urlHelperFactory; 52/// <param name="urlHelperFactory">The <see cref="IUrlHelperFactory"/>.</param> 59IUrlHelperFactory urlHelperFactory,
PageRemoteAttribute.cs (2)
44var factory = services.GetRequiredService<IUrlHelperFactory>();
RemoteAttribute.cs (2)
112var factory = services.GetRequiredService<IUrlHelperFactory>();
ViewComponent.cs (2)
88var factory = services?.GetRequiredService<IUrlHelperFactory>();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (7)
PageRemoteAttributeTest.cs (2)
161var factory = new Mock<IUrlHelperFactory>(MockBehavior.Strict); 162serviceCollection.AddSingleton<IUrlHelperFactory>(factory.Object);
RemoteAttributeTest.cs (4)
364var factory = new Mock<IUrlHelperFactory>(MockBehavior.Strict); 365serviceCollection.AddSingleton<IUrlHelperFactory>(factory.Object); 411var factory = new Mock<IUrlHelperFactory>(MockBehavior.Strict); 417serviceCollection.AddSingleton<IUrlHelperFactory>(factory.Object);
Rendering\DefaultTemplatesUtilities.cs (1)
245var urlHelperFactory = new Mock<IUrlHelperFactory>();
Microsoft.AspNetCore.Mvc.Views.TestCommon (2)
HtmlGeneratorUtilities.cs (2)
19var urlHelperFactory = new Mock<IUrlHelperFactory>(); 27public static IHtmlGenerator GetHtmlGenerator(IModelMetadataProvider provider, IUrlHelperFactory urlHelperFactory, MvcViewOptions options)
Mvc.RoutingWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
57var urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
TagHelpersWebSite (2)
TagHelpers\ATagHelper.cs (2)
14public ATagHelper(IUrlHelperFactory urlHelperFactory) 20public IUrlHelperFactory UrlHelperFactory { get; }
VersioningWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
57var urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);