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