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