2 types derived from LinkGenerator
Microsoft.AspNetCore.Http.Results.Tests (1)
TestLinkGenerator.cs (1)
8internal sealed class TestLinkGenerator : LinkGenerator
Microsoft.AspNetCore.Routing (1)
DefaultLinkGenerator.cs (1)
22internal sealed partial class DefaultLinkGenerator : LinkGenerator, IDisposable
127 references to LinkGenerator
Microsoft.AspNetCore.Http.Results (10)
AcceptedAtRoute.cs (2)
81var linkGenerator = httpContext.RequestServices.GetRequiredService<LinkGenerator>();
AcceptedAtRouteOfT.cs (2)
95var linkGenerator = httpContext.RequestServices.GetRequiredService<LinkGenerator>();
CreatedAtRoute.cs (2)
81var linkGenerator = httpContext.RequestServices.GetRequiredService<LinkGenerator>();
CreatedAtRouteOfT.cs (2)
95var linkGenerator = httpContext.RequestServices.GetRequiredService<LinkGenerator>();
RedirectToRouteHttpResult.cs (2)
161var linkGenerator = httpContext.RequestServices.GetRequiredService<LinkGenerator>();
Microsoft.AspNetCore.Http.Results.Tests (11)
AcceptedAtRouteOfTResultTests.cs (2)
212private static HttpContext GetHttpContext(LinkGenerator linkGenerator) 219private static IServiceProvider CreateServices(LinkGenerator linkGenerator)
AcceptedAtRouteResultTests.cs (2)
122private static HttpContext GetHttpContext(LinkGenerator linkGenerator) 129private static IServiceProvider CreateServices(LinkGenerator linkGenerator)
CreatedAtRouteOfTResultTests.cs (3)
179private static HttpContext GetHttpContext(LinkGenerator linkGenerator) 188private static IServiceProvider CreateServices(LinkGenerator linkGenerator) 192services.AddSingleton<LinkGenerator>(linkGenerator);
CreatedAtRouteResultTests.cs (3)
125private static HttpContext GetHttpContext(LinkGenerator linkGenerator) 134private static IServiceProvider CreateServices(LinkGenerator linkGenerator) 138services.AddSingleton<LinkGenerator>(linkGenerator);
RedirectToRouteResultTests.cs (1)
111services.AddSingleton<LinkGenerator>(new TestLinkGenerator { Url = path });
Microsoft.AspNetCore.Identity (2)
IdentityApiEndpointRouteBuilderExtensions.cs (2)
48var linkGenerator = endpoints.ServiceProvider.GetRequiredService<LinkGenerator>();
Microsoft.AspNetCore.Mvc.Core (24)
Routing\ControllerLinkGeneratorExtensions.cs (9)
12/// Extension methods for using <see cref="LinkGenerator"/> to generate links to MVC controllers. 19/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 41this LinkGenerator generator, 67/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 80this LinkGenerator generator, 99/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 135this LinkGenerator generator, 165/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 188this LinkGenerator generator,
Routing\EndpointRoutingUrlHelper.cs (3)
12/// An implementation of <see cref="IUrlHelper"/> that uses <see cref="LinkGenerator"/> to build URLs 20private readonly LinkGenerator _linkGenerator; 24LinkGenerator linkGenerator,
Routing\PageLinkGeneratorExtensions.cs (9)
12/// Extension methods for using <see cref="LinkGenerator"/> to generate links to Razor Pages. 19/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 40this LinkGenerator generator, 66/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 83this LinkGenerator generator, 101/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 136this LinkGenerator generator, 166/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 189this LinkGenerator generator,
Routing\UrlHelperBase.cs (1)
404nameof(LinkGenerator),
Routing\UrlHelperFactory.cs (2)
47var linkGenerator = services.GetRequiredService<LinkGenerator>();
Microsoft.AspNetCore.Mvc.Core.Test (15)
Routing\ControllerLinkGeneratorExtensionsTest.cs (8)
22var linkGenerator = CreateLinkGenerator(endpoint1); 55var linkGenerator = CreateLinkGenerator(endpoint1, endpoint2); 85var linkGenerator = CreateLinkGenerator(endpoint1, endpoint2); 113var linkGenerator = CreateLinkGenerator(endpoint1, endpoint2); 144var linkGenerator = CreateLinkGenerator(endpoint1, endpoint2); 174var linkGenerator = CreateLinkGenerator(endpoint1, endpoint2); 224private LinkGenerator CreateLinkGenerator(params Endpoint[] endpoints) 227return services.GetRequiredService<LinkGenerator>();
Routing\PageLinkGeneratorExtensionsTest.cs (7)
27var linkGenerator = CreateLinkGenerator(endpoint1, endpoint2); 56var linkGenerator = CreateLinkGenerator(endpoint1, endpoint2); 84var linkGenerator = CreateLinkGenerator(endpoint1, endpoint2); 114var linkGenerator = CreateLinkGenerator(endpoint1, endpoint2); 144var linkGenerator = CreateLinkGenerator(endpoint1, endpoint2); 194private LinkGenerator CreateLinkGenerator(params Endpoint[] endpoints) 197return services.GetRequiredService<LinkGenerator>();
Microsoft.AspNetCore.Routing (38)
DependencyInjection\RoutingServiceCollectionExtensions.cs (1)
96services.TryAddSingleton<LinkGenerator, DefaultLinkGenerator>();
EndpointNameAttribute.cs (1)
13/// identify a desired endpoint for URI generation using <see cref="Microsoft.AspNetCore.Routing.LinkGenerator"/>
EndpointNameMetadata.cs (1)
15/// identify a desired endpoint for URI generation using <see cref="LinkGenerator"/>.
IEndpointNameMetadata.cs (1)
13/// identify a desired endpoint for URI generation using <see cref="LinkGenerator"/>.
LinkGeneratorEndpointNameAddressExtensions.cs (17)
11/// Extension methods for using <see cref="LinkGenerator"/> with and endpoint name. 18/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 33this LinkGenerator generator, 58/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 73this LinkGenerator generator, 98/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 110this LinkGenerator generator, 126/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 138this LinkGenerator generator, 154/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 184this LinkGenerator generator, 213/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 243this LinkGenerator generator, 272/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 297this LinkGenerator generator, 321/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 346this LinkGenerator generator,
LinkGeneratorRouteValuesAddressExtensions.cs (17)
11/// Extension methods for using <see cref="LinkGenerator"/> with <see cref="RouteValuesAddress"/>. 18/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 33this LinkGenerator generator, 58/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 73this LinkGenerator generator, 98/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 110this LinkGenerator generator, 126/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 138this LinkGenerator generator, 154/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 184this LinkGenerator generator, 213/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 243this LinkGenerator generator, 272/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 297this LinkGenerator generator, 315/// <param name="generator">The <see cref="LinkGenerator"/>.</param> 340this LinkGenerator generator,
Microsoft.AspNetCore.Routing.Abstractions (2)
LinkGenerator.cs (2)
20/// The methods provided by the <see cref="LinkGenerator"/> type are general infrastructure, and support 22/// <see cref="LinkGenerator"/> is through extension methods that perform operations for a specific
Microsoft.AspNetCore.Routing.Microbenchmarks (8)
LinkGeneration\LinkGenerationGithubBenchmark.cs (2)
13private LinkGenerator _linkGenerator; 24_linkGenerator = services.GetRequiredService<LinkGenerator>();
LinkGeneration\SingleRouteWithConstraintsBenchmark.cs (2)
14private LinkGenerator _linkGenerator; 27_linkGenerator = services.GetRequiredService<LinkGenerator>();
LinkGeneration\SingleRouteWithNoParametersBenchmark.cs (2)
14private LinkGenerator _linkGenerator; 27_linkGenerator = services.GetRequiredService<LinkGenerator>();
LinkGeneration\SingleRouteWithParametersBenchmark.cs (2)
14private LinkGenerator _linkGenerator; 27_linkGenerator = services.GetRequiredService<LinkGenerator>();
Microsoft.AspNetCore.Routing.Tests (1)
LinkGeneratorIntegrationTest.cs (1)
208private LinkGenerator LinkGenerator { get; }
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (1)
1463var linkGenerator = app.Services.GetService(typeof(LinkGenerator));
WebHostTests.cs (1)
93var linkGenerator = host.Services.GetService(typeof(LinkGenerator));
Mvc.RoutingWebSite (10)
Areas\Admin\LG3Controller.cs (2)
12private readonly LinkGenerator _linkGenerator; 14public LG3Controller(LinkGenerator linkGenerator)
Controllers\EndpointNameController.cs (2)
10private readonly LinkGenerator _generator; 12public EndpointNameController(LinkGenerator generator)
Controllers\LG1Controller.cs (2)
10private readonly LinkGenerator _linkGenerator; 12public LG1Controller(LinkGenerator linkGenerator)
Pages\LGAnotherPage.cshtml.cs (2)
11private readonly LinkGenerator _linkGenerator; 13public LGAnotherPageModel(LinkGenerator linkGenerator)
Pages\LGPage.cshtml.cs (2)
11private readonly LinkGenerator _linkGenerator; 13public LGPageModel(LinkGenerator linkGenerator)
RoutingWebSite (4)
UseEndpointRoutingStartup.cs (4)
98var linkGenerator = httpContext.RequestServices.GetRequiredService<LinkGenerator>(); 110var linkGenerator = httpContext.RequestServices.GetRequiredService<LinkGenerator>();