4 implementations of IUrlHelper
Microsoft.AspNetCore.Mvc.Core (1)
Routing\UrlHelperBase.cs (1)
17public abstract class UrlHelperBase : IUrlHelper
Microsoft.AspNetCore.Mvc.Core.Test (1)
AcceptedAtActionResultTests.cs (1)
298private class ForwardingUrlHelper : IUrlHelper
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
PageRemoteAttributeTest.cs (1)
226private class MockUrlHelper : IUrlHelper
RemoteAttributeTest.cs (1)
499private class MockUrlHelper : IUrlHelper
341 references to IUrlHelper
BasicWebSite (3)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (3)
34var urlHelper = GetUrlHelper(_actionContext); 54private IUrlHelper GetUrlHelper(ActionContext context) 57var urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
ControllersFromServicesClassLibrary (1)
ControllerWithConstructorInjection.cs (1)
27var urlHelper = UrlHelperFactory.GetUrlHelper(ActionContext);
GenericHostWebSite (3)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (3)
34var urlHelper = GetUrlHelper(_actionContext); 54private IUrlHelper GetUrlHelper(ActionContext context) 57var urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
Identity.ExternalClaims (3)
Extensions\UrlHelperExtensions.cs (3)
13public static string GetLocalUrl(this IUrlHelper urlHelper, string localUrl) 23public static string EmailConfirmationLink(this IUrlHelper urlHelper, string userId, string code, string scheme) 32public static string ResetPasswordCallbackLink(this IUrlHelper urlHelper, string userId, string code, string scheme)
Microsoft.AspNetCore.Mvc.Abstractions (13)
Routing\UrlActionContext.cs (7)
7/// Context object to be used for the URLs that <see cref="IUrlHelper.Action(UrlActionContext)"/> generates. 12/// The name of the action method that <see cref="IUrlHelper.Action(UrlActionContext)"/> uses to generate URLs. 21/// The name of the controller that <see cref="IUrlHelper.Action(UrlActionContext)"/> uses to generate URLs. 30/// The object that contains the route values that <see cref="IUrlHelper.Action(UrlActionContext)"/> 40/// The protocol for the URLs that <see cref="IUrlHelper.Action(UrlActionContext)"/> generates, 50/// The host name for the URLs that <see cref="IUrlHelper.Action(UrlActionContext)"/> generates. 59/// The fragment for the URLs that <see cref="IUrlHelper.Action(UrlActionContext)"/> generates.
Routing\UrlRouteContext.cs (6)
7/// Context object to be used for the URLs that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> generates. 12/// The name of the route that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> uses to generate URLs. 21/// The object that contains the route values that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> 31/// The protocol for the URLs that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> generates, 41/// The host name for the URLs that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> generates. 50/// The fragment for the URLs that <see cref="IUrlHelper.RouteUrl(UrlRouteContext)"/> generates.
Microsoft.AspNetCore.Mvc.Core (88)
AcceptedAtActionResult.cs (3)
43/// Gets or sets the <see cref="IUrlHelper" /> used to generate URLs. 45public IUrlHelper? UrlHelper { get; set; } 71var urlHelper = UrlHelper;
AcceptedAtRouteResult.cs (3)
51/// Gets or sets the <see cref="IUrlHelper" /> used to generate URLs. 53public IUrlHelper? UrlHelper { get; set; } 72var urlHelper = UrlHelper;
ControllerBase.cs (3)
31private IUrlHelper? _url; 134/// Gets or sets the <see cref="IUrlHelper"/>. 137public IUrlHelper Url
CreatedAtActionResult.cs (3)
43/// Gets or sets the <see cref="IUrlHelper" /> used to generate URLs. 45public IUrlHelper? UrlHelper { get; set; } 71var urlHelper = UrlHelper;
CreatedAtRouteResult.cs (3)
51/// Gets or sets the <see cref="IUrlHelper" /> used to generate URLs. 53public IUrlHelper? UrlHelper { get; set; } 72var urlHelper = UrlHelper;
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);
LocalRedirectResult.cs (2)
82/// Gets or sets the <see cref="IUrlHelper"/> for this result. 84public IUrlHelper? UrlHelper { get; set; }
MvcOptions.cs (1)
56/// URLs with <see cref="IUrlHelper"/>.
RedirectResult.cs (2)
84/// Gets or sets the <see cref="IUrlHelper"/> for this result. 86public IUrlHelper? UrlHelper { get; set; }
RedirectToActionResult.cs (2)
132/// Gets or sets the <see cref="IUrlHelper" /> used to generate URLs. 134public IUrlHelper? UrlHelper { get; set; }
RedirectToPageResult.cs (2)
160/// Gets or sets the <see cref="IUrlHelper" /> used to generate URLs. 162public IUrlHelper? UrlHelper { get; set; }
RedirectToRouteResult.cs (2)
129/// Gets or sets the <see cref="IUrlHelper" /> used to generate URLs. 131public IUrlHelper? UrlHelper { get; set; }
Routing\EndpointRoutingUrlHelper.cs (1)
12/// An implementation of <see cref="IUrlHelper"/> that uses <see cref="LinkGenerator"/> to build URLs
Routing\IUrlHelperFactory.cs (4)
7/// A factory for creating <see cref="IUrlHelper"/> instances. 12/// Gets an <see cref="IUrlHelper"/> for the request associated with <paramref name="context"/>. 15/// <returns>An <see cref="IUrlHelper"/> for the request associated with <paramref name="context"/></returns> 16IUrlHelper GetUrlHelper(ActionContext context);
Routing\UrlHelper.cs (1)
10/// An implementation of <see cref="IUrlHelper"/> that contains methods to
Routing\UrlHelperBase.cs (1)
15/// An abstraction for <see cref="IUrlHelper" />.
Routing\UrlHelperFactory.cs (4)
17public IUrlHelper GetUrlHelper(ActionContext context) 38if (httpContext.Items.TryGetValue(typeof(IUrlHelper), out var value) && value is IUrlHelper urlHelper) 60httpContext.Items[typeof(IUrlHelper)] = urlHelper;
UrlHelperExtensions.cs (46)
18/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 20public static string? Action(this IUrlHelper helper) 37/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 40public static string? Action(this IUrlHelper helper, string? action) 51/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 55public static string? Action(this IUrlHelper helper, string? action, object? values) 66/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 70public static string? Action(this IUrlHelper helper, string? action, string? controller) 81/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 86public static string? Action(this IUrlHelper helper, string? action, string? controller, object? values) 98/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 113this IUrlHelper helper, 131/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 147this IUrlHelper helper, 166/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 183this IUrlHelper helper, 207/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 210public static string? RouteUrl(this IUrlHelper helper, object? values) 220/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 223public static string? RouteUrl(this IUrlHelper helper, string? routeName) 234/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 238public static string? RouteUrl(this IUrlHelper helper, string? routeName, object? values) 250/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 264this IUrlHelper helper, 281/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 296this IUrlHelper helper, 314/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 330this IUrlHelper helper, 352/// <param name="urlHelper">The <see cref="IUrlHelper"/>.</param> 355public static string? Page(this IUrlHelper urlHelper, string? pageName) 361/// <param name="urlHelper">The <see cref="IUrlHelper"/>.</param> 365public static string? Page(this IUrlHelper urlHelper, string? pageName, string? pageHandler) 371/// <param name="urlHelper">The <see cref="IUrlHelper"/>.</param> 375public static string? Page(this IUrlHelper urlHelper, string? pageName, object? values) 381/// <param name="urlHelper">The <see cref="IUrlHelper"/>.</param> 387this IUrlHelper urlHelper, 397/// <param name="urlHelper">The <see cref="IUrlHelper"/>.</param> 412this IUrlHelper urlHelper, 423/// <param name="urlHelper">The <see cref="IUrlHelper"/>.</param> 439this IUrlHelper urlHelper, 451/// <param name="urlHelper">The <see cref="IUrlHelper"/>.</param> 468this IUrlHelper urlHelper, 498/// <param name="helper">The <see cref="IUrlHelper"/>.</param> 515this IUrlHelper helper, 547/// <param name="urlHelper">The <see cref="IUrlHelper"/>.</param> 564this IUrlHelper urlHelper,
Microsoft.AspNetCore.Mvc.Core.Test (128)
AcceptedAtActionResultTests.cs (6)
130var urlHelper = GetMockUrlHelper(url); 154var urlHelper = GetMockUrlHelper(expectedUrl); 180var urlHelper = GetMockUrlHelper(returnValue); 280private static IUrlHelper GetMockUrlHelper(string returnValue) 282var urlHelper = new Mock<IUrlHelper>(); 295public IUrlHelper GetUrlHelper(ActionContext context) => new ForwardingUrlHelper() { ActionValue = "abc" };
AcceptedAtRouteResultTests.cs (5)
61var urlHelper = GetMockUrlHelper(url); 110var urlHelper = GetMockUrlHelper(expectedUrl); 129var urlHelper = GetMockUrlHelper(returnValue: null); 188private static IUrlHelper GetMockUrlHelper(string returnValue) 190var urlHelper = new Mock<IUrlHelper>();
Controllers\DefaultControllerActivatorTest.cs (2)
171.Setup(s => s.GetService(typeof(IUrlHelper))) 172.Returns(Mock.Of<IUrlHelper>());
Controllers\DefaultControllerFactoryTest.cs (2)
223.Setup(s => s.GetService(typeof(IUrlHelper))) 224.Returns(Mock.Of<IUrlHelper>());
CreatedAtActionResultTests.cs (4)
27var urlHelper = GetMockUrlHelper(expectedUrl); 50var urlHelper = GetMockUrlHelper(returnValue: null); 100private static IUrlHelper GetMockUrlHelper(string returnValue) 102var urlHelper = new Mock<IUrlHelper>();
CreatedAtRouteResultTests.cs (4)
46var urlHelper = GetMockUrlHelper(expectedUrl); 64var urlHelper = GetMockUrlHelper(returnValue: null); 114private static IUrlHelper GetMockUrlHelper(string returnValue) 116var urlHelper = new Mock<IUrlHelper>();
RedirectToActionResultTest.cs (6)
38var urlHelper = GetMockUrlHelper(expectedUrl); 68var urlHelper = GetMockUrlHelper(returnValue: null); 97var urlHelper = GetMockUrlHelper(expectedUrl); 125var urlHelper = GetMockUrlHelper(expectedUrl); 139private static IUrlHelper GetMockUrlHelper(string returnValue) 141var urlHelper = new Mock<IUrlHelper>();
RedirectToPageResultTest.cs (8)
30var urlHelper = GetUrlHelper(actionContext, returnValue: null); 62var urlHelper = GetUrlHelper(actionContext, expectedUrl); 94var urlHelper = new Mock<IUrlHelper>(); 148var urlHelper = new Mock<IUrlHelper>(); 211var urlHelper = new Mock<IUrlHelper>(); 262var urlHelper = new Mock<IUrlHelper>(); 310private static IUrlHelper GetUrlHelper(ActionContext context, string returnValue) 312var urlHelper = new Mock<IUrlHelper>();
RedirectToRouteResultTest.cs (7)
38var urlHelper = GetMockUrlHelper(expectedUrl); 68var urlHelper = GetMockUrlHelper(returnValue: null); 90var urlHelper = new Mock<IUrlHelper>(); 126var urlHelper = GetMockUrlHelper(expectedUrl); 151var urlHelper = GetMockUrlHelper(expectedUrl); 210private static IUrlHelper GetMockUrlHelper(string returnValue) 212var urlHelper = new Mock<IUrlHelper>();
Routing\EndpointRoutingUrlHelperTest.cs (12)
28var urlHelper = CreateUrlHelper(new[] { endpoint1, endpoint2 }); 53var urlHelper = CreateUrlHelper(new[] { endpoint1, endpoint2 }); 86var urlHelper = CreateUrlHelper(new[] { endpoint1, endpoint2 }); 107var urlHelper = CreateUrlHelper(new[] { endpoint }); 116protected override IUrlHelper CreateUrlHelper(string appRoot, string host, string protocol) 121protected override IUrlHelper CreateUrlHelperWithDefaultRoutes(string appRoot, string host, string protocol) 126protected override IUrlHelper CreateUrlHelperWithDefaultRoutes( 138protected override IUrlHelper CreateUrlHelper(ActionContext actionContext) 144var urlHelper = urlHelperFactory.GetUrlHelper(actionContext); 154protected override IUrlHelper CreateUrlHelper( 170private IUrlHelper CreateUrlHelper(IEnumerable<RouteEndpoint> endpoints, ActionContext actionContext = null) 178private IUrlHelper CreateUrlHelper(
Routing\UrlHelperExtensionsTest.cs (2)
851private static Mock<IUrlHelper> CreateMockUrlHelper(ActionContext context = null) 858var urlHelper = new Mock<IUrlHelper>();
Routing\UrlHelperTest.cs (5)
19protected override IUrlHelper CreateUrlHelper(string appRoot, string host, string protocol) 29protected override IUrlHelper CreateUrlHelperWithDefaultRoutes( 44protected override IUrlHelper CreateUrlHelper(ActionContext actionContext) 49protected override IUrlHelper CreateUrlHelperWithDefaultRoutes(string appRoot, string host, string protocol) 61protected override IUrlHelper CreateUrlHelper(
Routing\UrlHelperTestBase.cs (65)
28var urlHelper = CreateUrlHelper(appRoot); 51var urlHelper = CreateUrlHelper(appRoot); 67var helper = CreateUrlHelper(); 83var helper = CreateUrlHelper(); 98var helper = CreateUrlHelper(); 114var helper = CreateUrlHelper(); 131var helper = CreateUrlHelper(); 146var helper = CreateUrlHelper(appRoot: string.Empty, host: "www.mysite.com", protocol: null); 161var helper = CreateUrlHelper(appRoot: string.Empty, host: "www.mysite.com", protocol: null); 175var helper = CreateUrlHelper(appRoot: string.Empty, host: "www.mysite.com", protocol: null); 192var helper = CreateUrlHelper(appRoot: string.Empty, host: "www.mysite.com", protocol: null); 210var helper = CreateUrlHelper(appRoot: string.Empty, host: "www.mysite.com", protocol: null); 229var helper = CreateUrlHelper(appRoot: string.Empty, host: "www.mysite.com", protocol: null); 246var helper = CreateUrlHelper(appRoot: string.Empty, host: "www.mysite.com", protocol: null); 265var helper = CreateUrlHelper(appRoot: string.Empty, host: "www.mysite.com", protocol: null); 280var helper = CreateUrlHelper(appRoot: string.Empty, host: "www.mysite.com", protocol: null); 298var helper = CreateUrlHelper(appRoot: string.Empty, host: "www.mysite.com", protocol: null); 317var helper = CreateUrlHelper(appRoot: string.Empty, host: "www.mysite.com", protocol: null); 330var urlHelper = CreateUrlHelperWithDefaultRoutes(); 350var urlHelper = CreateUrlHelperWithDefaultRoutes(); 373var urlHelper = CreateUrlHelperWithDefaultRoutes(); 396var urlHelper = CreateUrlHelperWithDefaultRoutes(); 419var urlHelper = CreateUrlHelperWithDefaultRoutes(); 442var urlHelper = CreateUrlHelperWithDefaultRoutes(); 455var urlHelper = CreateUrlHelperWithDefaultRoutes(); 476var urlHelper = CreateUrlHelperWithDefaultRoutes(); 498var urlHelper = CreateUrlHelperWithDefaultRoutes(); 513var urlHelper = CreateUrlHelperWithDefaultRoutes(); 528var urlHelper = CreateUrlHelperWithDefaultRoutes(); 549var urlHelper = CreateUrlHelperWithDefaultRoutes(); 569var urlHelper = CreateUrlHelperWithDefaultRoutes(); 596var urlHelper = CreateUrlHelperWithDefaultRoutes(); 619var urlHelper = CreateUrlHelperWithDefaultRoutes(); 646var urlHelper = CreateUrlHelperWithDefaultRoutes(); 664var urlHelper = CreateUrlHelperWithDefaultRoutes(); 692var urlHelper = CreateUrlHelperWithDefaultRoutes(); 715var urlHelper = CreateUrlHelperWithDefaultRoutes(); 734var urlHelper = CreateUrlHelperWithDefaultRoutes(); 754var urlHelper = CreateUrlHelperWithDefaultRoutes(); 774var urlHelper = CreateUrlHelperWithDefaultRoutes( 800var urlHelper = CreateUrlHelperWithDefaultRoutes( 825var urlHelper = CreateUrlHelperWithDefaultRoutes( 843var urlHelper = CreateUrlHelperWithDefaultRoutes( 861var urlHelper = CreateUrlHelperWithDefaultRoutes( 886var expectedUrlHelper = CreateUrlHelper(); 891{ typeof(IUrlHelper), expectedUrlHelper } 899var urlHelper = urlHelperFactory.GetUrlHelper(actionContext); 917var urlHelper = urlHelperFactory.GetUrlHelper(actionContext); 921Assert.Same(urlHelper, actionContext.HttpContext.Items[typeof(IUrlHelper)] as IUrlHelper); 932{ typeof(IUrlHelper), null } 940var urlHelper = urlHelperFactory.GetUrlHelper(actionContext); 944Assert.Same(urlHelper, actionContext.HttpContext.Items[typeof(IUrlHelper)] as IUrlHelper); 952var urlHelper = CreateUrlHelper( 990var urlHelper = CreateUrlHelper( 1031var urlHelper = CreateUrlHelper( 1068var urlHelper = CreateUrlHelperWithDefaultRoutes(); 1100protected abstract IUrlHelper CreateUrlHelper(ActionContext actionContext); 1102protected abstract IUrlHelper CreateUrlHelperWithDefaultRoutes( 1107protected abstract IUrlHelper CreateUrlHelperWithDefaultRoutes( 1114protected abstract IUrlHelper CreateUrlHelper( 1123protected virtual IUrlHelper CreateUrlHelper(string appRoot, string host, string protocol) 1169private IUrlHelper CreateUrlHelper(string appRoot = "") 1174private IUrlHelper CreateUrlHelperWithDefaultRoutes()
Microsoft.AspNetCore.Mvc.Razor (6)
RazorPageBase.cs (1)
35private IUrlHelper? _urlHelper;
RazorPagePropertyActivator.cs (1)
99else if (property.PropertyType == typeof(IUrlHelper))
TagHelpers\UrlResolutionTagHelper.cs (4)
228var urlHelper = UrlHelperFactory.GetUrlHelper(ViewContext); 253var urlHelper = UrlHelperFactory.GetUrlHelper(ViewContext); 262nameof(IUrlHelper), 263nameof(IUrlHelper.Content),
Microsoft.AspNetCore.Mvc.Razor.Test (13)
RazorPageActivatorTest.cs (4)
55var urlHelper = UrlHelperFactory.GetUrlHelper(viewContext); 91var urlHelper = UrlHelperFactory.GetUrlHelper(viewContext); 118var urlHelper = UrlHelperFactory.GetUrlHelper(viewContext); 280public IUrlHelper Url { get; set; }
RazorPageTest.cs (1)
833var helper = new Mock<IUrlHelper>();
TagHelpers\UrlResolutionTagHelperTest.cs (8)
105var urlHelperMock = new Mock<IUrlHelper>(); 165var urlHelperMock = new Mock<IUrlHelper>(); 226var urlHelperMock = new Mock<IUrlHelper>(); 282var urlHelperMock = new Mock<IUrlHelper>(); 347nameof(IUrlHelper), 348nameof(IUrlHelper.Content), 359var urlHelperMock = new Mock<IUrlHelper>(); 397var urlHelperMock = new Mock<IUrlHelper>();
Microsoft.AspNetCore.Mvc.RazorPages (3)
PageModel.cs (3)
32private IUrlHelper? _urlHelper; 112/// Gets or sets the <see cref="IUrlHelper"/>. 114public IUrlHelper Url
Microsoft.AspNetCore.Mvc.RazorPages.Test (7)
ApplicationModels\DefaultPageApplicationModelProviderTest.cs (2)
490public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; } 512public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
Infrastructure\DefaultPageFactoryProviderTest.cs (3)
80var urlHelper = Mock.Of<IUrlHelper>(); 424public IUrlHelper UrlHelper { get; set; }
PageModelTest.cs (2)
1785var urlHelper = Mock.Of<IUrlHelper>();
Microsoft.AspNetCore.Mvc.TagHelpers (2)
FormActionTagHelper.cs (2)
100/// Gets the <see cref="IUrlHelperFactory"/> used to create an <see cref="IUrlHelper"/> to generate links. 247var urlHelper = UrlHelperFactory.GetUrlHelper(ViewContext);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (24)
AnchorTagHelperTest.cs (1)
51var urlHelper = new Mock<IUrlHelper>();
FormActionTagHelperTest.cs (7)
43var urlHelper = new Mock<IUrlHelper>(MockBehavior.Strict); 118var urlHelper = new Mock<IUrlHelper>(MockBehavior.Strict); 214var urlHelper = new Mock<IUrlHelper>(MockBehavior.Strict); 274var urlHelper = new Mock<IUrlHelper>(MockBehavior.Strict); 353var urlHelper = new Mock<IUrlHelper>(MockBehavior.Strict); 407var urlHelper = new Mock<IUrlHelper>(MockBehavior.Strict); 455var urlHelper = new Mock<IUrlHelper>();
FormTagHelperTest.cs (6)
92var urlHelper = new Mock<IUrlHelper>(); 148var urlHelper = new Mock<IUrlHelper>(); 205var urlHelper = new Mock<IUrlHelper>(); 263var urlHelper = new Mock<IUrlHelper>(); 327var urlHelper = new Mock<IUrlHelper>(); 589var urlHelper = new Mock<IUrlHelper>();
ImageTagHelperTest.cs (2)
55var urlHelper = new Mock<IUrlHelper>(); 383var urlHelper = new Mock<IUrlHelper>();
LinkTagHelperTest.cs (2)
53var urlHelper = new Mock<IUrlHelper>(); 1206var urlHelper = new Mock<IUrlHelper>();
ScriptTagHelperTest.cs (2)
52var urlHelper = new Mock<IUrlHelper>(); 1160var urlHelper = new Mock<IUrlHelper>();
TestableHtmlGenerator.cs (4)
26: this(metadataProvider, Mock.Of<IUrlHelper>()) 30public TestableHtmlGenerator(IModelMetadataProvider metadataProvider, IUrlHelper urlHelper) 42IUrlHelper urlHelper, 129private static IUrlHelperFactory CreateUrlHelperFactory(IUrlHelper urlHelper)
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
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 (3)
26private IUrlHelper? _url; 78/// Gets or sets the <see cref="IUrlHelper"/>. 80public IUrlHelper Url
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (25)
DefaultEditorTemplatesTest.cs (10)
653Mock.Of<IUrlHelper>(), 696Mock.Of<IUrlHelper>(), 738Mock.Of<IUrlHelper>(), 781Mock.Of<IUrlHelper>(), 856Mock.Of<IUrlHelper>(), 928Mock.Of<IUrlHelper>(), 999Mock.Of<IUrlHelper>(), 1069Mock.Of<IUrlHelper>(), 1138Mock.Of<IUrlHelper>(), 1204Mock.Of<IUrlHelper>(),
PageRemoteAttributeTest.cs (1)
158private static ClientModelValidationContext GetValidationContext(IUrlHelper urlHelper, RouteData routeData = null)
RemoteAttributeTest.cs (1)
361IUrlHelper urlHelper)
Rendering\DefaultTemplatesUtilities.cs (6)
60public static HtmlHelper<ObjectTemplateModel> GetHtmlHelper(IUrlHelper urlHelper) 188IUrlHelper urlHelper, 198IUrlHelper urlHelper, 220IUrlHelper urlHelper, 346private static IUrlHelper CreateUrlHelper() 348return Mock.Of<IUrlHelper>();
Rendering\HtmlHelperFormTest.cs (5)
126var urlHelper = new Mock<IUrlHelper>(MockBehavior.Strict); 176var urlHelper = new Mock<IUrlHelper>(MockBehavior.Strict); 230var urlHelper = new Mock<IUrlHelper>(MockBehavior.Strict); 279var urlHelper = new Mock<IUrlHelper>(MockBehavior.Strict); 316var urlHelper = new Mock<IUrlHelper>(MockBehavior.Strict);
Rendering\HtmlHelperLinkGenerationTest.cs (2)
60var urlHelper = new Mock<IUrlHelper>(); 129var urlHelper = new Mock<IUrlHelper>();
Microsoft.AspNetCore.Mvc.Views.TestCommon (1)
HtmlGeneratorUtilities.cs (1)
22.Returns(Mock.Of<IUrlHelper>());
Mvc.RoutingWebSite (3)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (3)
34var urlHelper = GetUrlHelper(_actionContext); 54private IUrlHelper GetUrlHelper(ActionContext context) 57var urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);
RazorBuildWebSite.Views (3)
Pages\Rzc\Page.cs (1)
30public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
Views\Common\CommonView.cs (1)
30public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
Views\Rzc\View.cs (1)
30public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
TagHelpersWebSite (1)
TagHelpers\ATagHelper.cs (1)
41var urlHelper = UrlHelperFactory.GetUrlHelper(ViewContext);
VersioningWebSite (3)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (3)
34var urlHelper = GetUrlHelper(_actionContext); 54private IUrlHelper GetUrlHelper(ActionContext context) 57var urlHelper = services.GetRequiredService<IUrlHelperFactory>().GetUrlHelper(context);