1 type derived from Endpoint
Microsoft.AspNetCore.Routing (1)
RouteEndpoint.cs (1)
12public sealed class RouteEndpoint : Endpoint
4 instantiations of Endpoint
Microsoft.AspNetCore.Mvc.Core (1)
Routing\InertEndpointBuilder.cs (1)
13return new Endpoint(RequestDelegate, new EndpointMetadataCollection(Metadata), DisplayName);
Microsoft.AspNetCore.Routing (3)
Matching\AcceptsMatcherPolicy.cs (1)
251return Http415Endpoint ??= new Endpoint(context =>
Matching\HttpMethodMatcherPolicy.cs (1)
383return new Endpoint(
Matching\NegotiationMatcherPolicy.cs (1)
349Http406Endpoint ??= new Endpoint(
447 references to Endpoint
Microsoft.AspNetCore (1)
WebApplication.cs (1)
271public IReadOnlyList<Endpoint> Endpoints
Microsoft.AspNetCore.Antiforgery (5)
AntiforgeryMiddleware.cs (1)
18var endpoint = context.GetEndpoint();
src\aspnetcore\src\Shared\HttpExtensions.cs (4)
36internal static Endpoint? GetOriginalEndpoint(HttpContext context) 38var endpoint = context.GetEndpoint(); 42if (endpoint == null && context.Items.TryGetValue(OriginalEndpointKey, out var e) && e is Endpoint originalEndpoint) 51var endpoint = context.GetEndpoint();
Microsoft.AspNetCore.Authentication.Cookies (1)
CookieAuthenticationEvents.cs (1)
121var endpoint = context.GetEndpoint();
Microsoft.AspNetCore.Authorization.Policy (8)
AuthorizationMiddleware.cs (1)
98var endpoint = context.GetEndpoint();
AuthorizationPolicyCache.cs (5)
13private readonly DataSourceDependentCache<ConcurrentDictionary<Endpoint, AuthorizationPolicy>> _policyCache; 19_policyCache = new DataSourceDependentCache<ConcurrentDictionary<Endpoint, AuthorizationPolicy>>(dataSource, (_) => 22return new ConcurrentDictionary<Endpoint, AuthorizationPolicy>(); 27public AuthorizationPolicy? Lookup(Endpoint endpoint) 33public void Store(Endpoint endpoint, AuthorizationPolicy policy)
src\aspnetcore\src\Http\Routing\src\DataSourceDependentCache.cs (2)
16private readonly Func<IReadOnlyList<Endpoint>, T> _initializeCore; 27public DataSourceDependentCache(EndpointDataSource dataSource, Func<IReadOnlyList<Endpoint>, T> initialize)
Microsoft.AspNetCore.Components.Endpoints (12)
Builder\RazorComponentEndpointDataSource.cs (4)
30private List<Endpoint>? _endpoints; 65public override IReadOnlyList<Endpoint> Endpoints 108var endpoints = new List<Endpoint>(); 184private void AddBlazorWebEndpoints(List<Endpoint> endpoints)
Builder\RazorComponentEndpointFactory.cs (1)
23List<Endpoint> endpoints,
Builder\RazorComponentsEndpointConventionBuilder.cs (2)
83List<Endpoint> endpoints, 86public List<Endpoint> Endpoints { get; } = endpoints;
Builder\RenderModeEndpointProvider.cs (1)
35List<Endpoint> endpoints,
Builder\ResourceCollectionUrlEndpoint.cs (2)
22List<Endpoint> endpoints, 55var endpoint = builder.Build();
RazorComponentEndpointInvoker.cs (1)
61var endpoint = context.GetEndpoint() ?? throw new InvalidOperationException($"An endpoint must be set on the '{nameof(HttpContext)}'.");
Rendering\EndpointHtmlRenderer.cs (1)
151var endpoint = httpContext.GetEndpoint();
Microsoft.AspNetCore.Components.Server (1)
DependencyInjection\ServerRazorComponentsBuilderExtensions.cs (1)
148foreach (var endpoint in ds.Endpoints)
Microsoft.AspNetCore.Cors (1)
Infrastructure\CorsMiddleware.cs (1)
98var endpoint = context.GetEndpoint();
Microsoft.AspNetCore.Diagnostics (9)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
336var endpoint = context.GetEndpoint();
ExceptionHandler\ExceptionHandlerFeature.cs (1)
21public Endpoint? Endpoint { get; set; }
src\aspnetcore\src\Shared\HttpExtensions.cs (4)
36internal static Endpoint? GetOriginalEndpoint(HttpContext context) 38var endpoint = context.GetEndpoint(); 42if (endpoint == null && context.Items.TryGetValue(OriginalEndpointKey, out var e) && e is Endpoint originalEndpoint) 51var endpoint = context.GetEndpoint();
StatusCodePage\StatusCodePagesMiddleware.cs (2)
43var endpoint = context.GetEndpoint(); 86private static bool HasSkipStatusCodePagesMetadata(Endpoint? endpoint)
StatusCodePage\StatusCodeReExecuteFeature.cs (1)
25public Endpoint? Endpoint { get; set; }
Microsoft.AspNetCore.Diagnostics.Abstractions (4)
IExceptionHandlerFeature.cs (2)
26/// Gets the selected <see cref="Http.Endpoint"/> for the original request. 28Endpoint? Endpoint => null;
IStatusCodeReExecuteFeature.cs (2)
37/// Gets the selected <see cref="Http.Endpoint"/> for the original request. 39Endpoint? Endpoint => null;
Microsoft.AspNetCore.Diagnostics.Middleware (2)
Logging\HttpUtilityExtensions.cs (1)
40var endpoint = request.HttpContext.GetEndpoint();
Logging\IncomingHttpRouteUtility.cs (1)
42var endpoint = request.HttpContext.GetEndpoint();
Microsoft.AspNetCore.Hosting (6)
Internal\HostingApplicationDiagnostics.cs (2)
177var endpoint = HttpExtensions.GetOriginalEndpoint(httpContext); 532var endpoint = HttpExtensions.GetOriginalEndpoint(httpContext);
src\aspnetcore\src\Shared\HttpExtensions.cs (4)
36internal static Endpoint? GetOriginalEndpoint(HttpContext context) 38var endpoint = context.GetEndpoint(); 42if (endpoint == null && context.Items.TryGetValue(OriginalEndpointKey, out var e) && e is Endpoint originalEndpoint) 51var endpoint = context.GetEndpoint();
Microsoft.AspNetCore.Http (5)
Builder\ApplicationBuilder.cs (1)
170var endpoint = context.GetEndpoint();
Features\FormFeature.cs (3)
20private readonly Endpoint? _endpoint; 58internal FormFeature(HttpRequest request, FormOptions options, Endpoint? endpoint) 392private static FormOptions GetFormOptionsFromMetadata(FormOptions baseFormOptions, Endpoint endpoint)
Timeouts\RequestTimeoutsMiddleware.cs (1)
36var endpoint = context.GetEndpoint();
Microsoft.AspNetCore.Http.Abstractions (28)
Extensions\EndpointBuilder.cs (4)
9/// A base class for building an new <see cref="Endpoint"/>. 41/// Creates an instance of <see cref="Endpoint"/> from the <see cref="EndpointBuilder"/>. 43/// <returns>The created <see cref="Endpoint"/>.</returns> 44public abstract Endpoint Build();
HttpContext.cs (1)
93public Endpoint? Endpoint => _context.GetEndpoint();
HttpResults\INestedHttpResult.cs (1)
14/// Gets the actual <see cref="IResult"/> returned by the <see cref="Endpoint"/> route handler delegate.
Metadata\IEndpointDescriptionMetadata.cs (1)
7/// Defines a contract used to specify a description in <see cref="Endpoint.Metadata"/>.
Metadata\IEndpointMetadataProvider.cs (4)
10/// Indicates that a type provides a static method that provides <see cref="Endpoint"/> metadata when declared as a parameter type or the 11/// returned type of an <see cref="Endpoint"/> route handler delegate. 16/// Populates metadata for the related <see cref="Endpoint"/> and <see cref="MethodInfo"/>. 21/// Add or remove objects on the <see cref="EndpointBuilder.Metadata"/> property of the <paramref name="builder"/> to modify the <see cref="Endpoint.Metadata"/> being built.
Metadata\IEndpointParameterMetadataProvider.cs (4)
10/// Indicates that a type provides a static method that provides <see cref="Endpoint"/> metadata when declared as the 11/// parameter type of an <see cref="Endpoint"/> route handler delegate. 16/// Populates metadata for the related <see cref="Endpoint"/> and <see cref="ParameterInfo"/>. 21/// Add or remove objects on the <see cref="EndpointBuilder.Metadata"/> property of the <paramref name="builder"/> to modify the <see cref="Endpoint.Metadata"/> being built.
Metadata\ISkipStatusCodePagesMetadata.cs (1)
8/// middleware in <see cref="Endpoint.Metadata"/>.
Metadata\ISummaryMetadata.cs (1)
7/// Defines a contract used to specify a summary in <see cref="Endpoint.Metadata"/>.
Metadata\ITagsMetadata.cs (1)
7/// Defines a contract used to specify a collection of tags in <see cref="Endpoint.Metadata"/>.
Routing\Endpoint.cs (1)
15/// Creates a new instance of <see cref="Endpoint"/>.
Routing\EndpointHttpContextExtensions.cs (7)
14/// Extension method for getting the <see cref="Endpoint"/> for the current request. 17/// <returns>The <see cref="Endpoint"/> or <c>null</c> if the request doesn't have an endpoint.</returns> 22public static Endpoint? GetEndpoint(this HttpContext context) 30/// Extension method for setting the <see cref="Endpoint"/> for the current request. 33/// <param name="endpoint">The <see cref="Endpoint"/>. A <c>null</c> value clears the endpoint for the current request.</param> 34public static void SetEndpoint(this HttpContext context, Endpoint? endpoint) 64public Endpoint? Endpoint { get; set; }
Routing\IEndpointFeature.cs (2)
13/// Gets or sets the selected <see cref="Http.Endpoint"/> for the current 16Endpoint? Endpoint { get; set; }
Microsoft.AspNetCore.Http.Extensions (4)
EndpointDescriptionAttribute.cs (1)
10/// Specifies a description for the endpoint in <see cref="Endpoint.Metadata"/>.
EndpointSummaryAttribute.cs (1)
11/// Specifies a summary in <see cref="Endpoint.Metadata"/>.
RequestDelegateFactory.cs (1)
2947public override Endpoint Build()
TagsAttribute.cs (1)
11/// Specifies a collection of tags in <see cref="Endpoint.Metadata"/>.
Microsoft.AspNetCore.Http.Results (5)
ResultsOfT.Generated.cs (5)
35/// Gets the actual <see cref="IResult"/> returned by the <see cref="Endpoint"/> route handler delegate. 99/// Gets the actual <see cref="IResult"/> returned by the <see cref="Endpoint"/> route handler delegate. 172/// Gets the actual <see cref="IResult"/> returned by the <see cref="Endpoint"/> route handler delegate. 254/// Gets the actual <see cref="IResult"/> returned by the <see cref="Endpoint"/> route handler delegate. 345/// Gets the actual <see cref="IResult"/> returned by the <see cref="Endpoint"/> route handler delegate.
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
DependencyInjection\EndpointMethodInfoApiExplorerServiceCollectionExtensions.cs (2)
13/// Extensions for configuring ApiExplorer using <see cref="Endpoint.Metadata"/>. 18/// Configures ApiExplorer using <see cref="Endpoint.Metadata"/>.
EndpointMetadataApiDescriptionProvider.cs (1)
58foreach (var endpoint in _endpointDataSource.Endpoints)
Microsoft.AspNetCore.Mvc.Core (41)
Authorization\AuthorizeFilter.cs (2)
137var endpoint = context.HttpContext.GetEndpoint(); 224var endpoint = context.HttpContext.GetEndpoint();
Infrastructure\ActionSelectionTable.cs (4)
78public static ActionSelectionTable<Endpoint> Create(IEnumerable<Endpoint> endpoints) 80return CreateCore<Endpoint>( 88return e.GetType() == typeof(Endpoint);
Routing\ActionConstraintMatcherPolicy.cs (3)
31public bool AppliesToEndpoints(IReadOnlyList<Endpoint> endpoints) 40var endpoint = endpoints[i]; 136var endpoint = candidate.Endpoint;
Routing\ActionEndpointDataSourceBase.cs (4)
28private List<Endpoint>? _endpoints; 41public override IReadOnlyList<Endpoint> Endpoints 52public override IReadOnlyList<Endpoint> GetGroupedEndpoints(RouteGroupContext context) 64protected abstract List<Endpoint> CreateEndpoints(
Routing\ActionEndpointFactory.cs (3)
39List<Endpoint> endpoints, 175List<Endpoint> endpoints, 527var endpoint = context.GetEndpoint()!;
Routing\ControllerActionEndpointDataSource.cs (2)
65protected override List<Endpoint> CreateEndpoints( 73var endpoints = new List<Endpoint>();
Routing\DynamicControllerEndpointMatcherPolicy.cs (3)
30public bool AppliesToEndpoints(IReadOnlyList<Endpoint> endpoints) 76var endpoint = candidates[i].Endpoint; 162private DynamicControllerEndpointSelector ResolveSelector(DynamicControllerEndpointSelector? currentSelector, Endpoint endpoint)
Routing\DynamicControllerEndpointSelector.cs (7)
12private readonly DataSourceDependentCache<ActionSelectionTable<Endpoint>> _cache; 18_cache = new DataSourceDependentCache<ActionSelectionTable<Endpoint>>(dataSource, Initialize); 21private ActionSelectionTable<Endpoint> Table => _cache.EnsureInitialized(); 23public IReadOnlyList<Endpoint> SelectEndpoints(RouteValueDictionary values) 32private static ActionSelectionTable<Endpoint> Initialize(IReadOnlyList<Endpoint> endpoints) 34return ActionSelectionTable<Endpoint>.Create(endpoints);
Routing\DynamicControllerEndpointSelectorCache.cs (1)
26public DynamicControllerEndpointSelector GetEndpointSelector(Endpoint endpoint)
Routing\DynamicRouteValueTransformer.cs (7)
23/// <see cref="FilterAsync(HttpContext, RouteValueDictionary, IReadOnlyList{Endpoint})" /> as well as 33/// <item><description><see cref="FilterAsync(HttpContext, RouteValueDictionary, IReadOnlyList{Endpoint})" /></description></item> 77/// Implementations of <see cref="FilterAsync(HttpContext, RouteValueDictionary, IReadOnlyList{Endpoint})" /> may further 82/// <see cref="FilterAsync(HttpContext, RouteValueDictionary, IReadOnlyList{Endpoint})" /> will not be called in the case 86public virtual ValueTask<IReadOnlyList<Endpoint>> FilterAsync(HttpContext httpContext, RouteValueDictionary values, IReadOnlyList<Endpoint> endpoints) 88return new ValueTask<IReadOnlyList<Endpoint>>(endpoints);
Routing\EndpointRoutingUrlHelper.cs (1)
96public Endpoint[] Items => _helper._endpointDataSource.Endpoints.ToArray();
Routing\InertEndpointBuilder.cs (1)
11public override Endpoint Build()
Routing\UrlHelperFactory.cs (1)
43var endpoint = httpContext.GetEndpoint();
src\aspnetcore\src\Http\Routing\src\DataSourceDependentCache.cs (2)
16private readonly Func<IReadOnlyList<Endpoint>, T> _initializeCore; 27public DataSourceDependentCache(EndpointDataSource dataSource, Func<IReadOnlyList<Endpoint>, T> initialize)
Microsoft.AspNetCore.Mvc.RazorPages (16)
CompiledPageActionDescriptor.cs (1)
66public Endpoint? Endpoint { get; set; }
Infrastructure\DefaultPageLoader.cs (1)
65var endpoints = new List<Endpoint>();
Infrastructure\DynamicPageEndpointMatcherPolicy.cs (4)
33public bool AppliesToEndpoints(IReadOnlyList<Endpoint> endpoints) 78var endpoint = candidates[i].Endpoint; 156var loadedEndpoints = new List<Endpoint>(endpoints); 179private DynamicPageEndpointSelector ResolveSelector(DynamicPageEndpointSelector? currentSelector, Endpoint endpoint)
Infrastructure\DynamicPageEndpointSelector.cs (7)
13private readonly DataSourceDependentCache<ActionSelectionTable<Endpoint>> _cache; 20_cache = new DataSourceDependentCache<ActionSelectionTable<Endpoint>>(dataSource, Initialize); 23private ActionSelectionTable<Endpoint> Table => _cache.EnsureInitialized(); 25public IReadOnlyList<Endpoint> SelectEndpoints(RouteValueDictionary values) 34private static ActionSelectionTable<Endpoint> Initialize(IReadOnlyList<Endpoint> endpoints) 36return ActionSelectionTable<Endpoint>.Create(endpoints);
Infrastructure\DynamicPageEndpointSelectorCache.cs (1)
27public DynamicPageEndpointSelector? GetEndpointSelector(Endpoint endpoint)
Infrastructure\PageActionEndpointDataSource.cs (2)
44protected override List<Endpoint> CreateEndpoints( 52var endpoints = new List<Endpoint>();
Microsoft.AspNetCore.Mvc.TagHelpers (1)
ScriptTagHelper.cs (1)
195/// the import map will be retrieved by default from the current <see cref="Endpoint.Metadata"/>.
Microsoft.AspNetCore.RateLimiting (1)
RateLimitingMiddleware.cs (1)
67var endpoint = context.GetEndpoint();
Microsoft.AspNetCore.Routing (284)
_generated\0\LoggerMessage.g.cs (18)
219private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Endpoint, global::System.Exception?> __ExecutingEndpointCallback = 220global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Endpoint>(global::Microsoft.Extensions.Logging.LogLevel.Information, new global::Microsoft.Extensions.Logging.EventId(0, "ExecutingEndpoint"), "Executing endpoint '{EndpointName}'", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 227public static partial void ExecutingEndpoint(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Endpoint endpointName) 235private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Endpoint, global::System.Exception?> __ExecutedEndpointCallback = 236global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Endpoint>(global::Microsoft.Extensions.Logging.LogLevel.Information, new global::Microsoft.Extensions.Logging.EventId(1, "ExecutedEndpoint"), "Executed endpoint '{EndpointName}'", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 243public static partial void ExecutedEndpoint(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Endpoint endpointName) 308private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Endpoint, global::System.Exception?> __ExecutingEndpointCallback = 309global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Endpoint>(global::Microsoft.Extensions.Logging.LogLevel.Information, new global::Microsoft.Extensions.Logging.EventId(4, "ExecutingEndpoint"), "The endpoint '{EndpointName}' is being executed without running additional middleware.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 316public static partial void ExecutingEndpoint(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Endpoint endpointName) 324private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Endpoint, global::System.Exception?> __ExecutedEndpointCallback = 325global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Endpoint>(global::Microsoft.Extensions.Logging.LogLevel.Information, new global::Microsoft.Extensions.Logging.EventId(5, "ExecutedEndpoint"), "The endpoint '{EndpointName}' has been executed without running additional middleware.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 332public static partial void ExecutedEndpoint(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Endpoint endpointName) 340private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Endpoint, global::System.Exception?> __ShortCircuitedEndpointCallback = 341global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Endpoint>(global::Microsoft.Extensions.Logging.LogLevel.Information, new global::Microsoft.Extensions.Logging.EventId(6, "ShortCircuitedEndpoint"), "The endpoint '{EndpointName}' is being short circuited without running additional middleware or producing a response.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 348public static partial void ShortCircuitedEndpoint(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Endpoint endpointName) 356private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Http.Endpoint, global::System.Exception?> __FallbackMatchCallback = 357global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Http.Endpoint>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(7, "FallbackMatch"), "Matched endpoint '{EndpointName}' is a fallback endpoint.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 364public static partial void FallbackMatch(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Http.Endpoint endpointName)
Builder\EndpointRoutingApplicationBuilderExtensions.cs (5)
32/// Routing adds a point in the middleware pipeline where routing decisions are made and an <see cref="Endpoint"/> 35/// <see cref="Endpoint"/> associated with the <see cref="HttpContext"/>. 67/// This middleware executes the <see cref="Endpoint"/> associated with the current request. 79/// Routing adds a point in the middleware pipeline where routing decisions are made and an <see cref="Endpoint"/> 82/// <see cref="Endpoint"/> associated with the <see cref="HttpContext"/>.
Builder\OpenApiRouteHandlerBuilderExtensions.cs (1)
12/// Extension methods for adding <see cref="Endpoint.Metadata"/> that is
Builder\RoutingEndpointConventionBuilderExtensions.cs (1)
131/// in the endpoint <see cref="Http.Endpoint.Metadata"/> for all endpoints produced on the target
CompositeEndpointDataSource.cs (8)
22private List<Endpoint>? _endpoints; 57/// Gets a <see cref="IChangeToken"/> used to signal invalidation of cached <see cref="Endpoint"/> instances. 67/// Returns a read-only collection of <see cref="Endpoint"/> instances. 69public override IReadOnlyList<Endpoint> Endpoints 79public override IReadOnlyList<Endpoint> GetGroupedEndpoints(RouteGroupContext context) 83return Array.Empty<Endpoint>(); 89var groupedEndpoints = new List<Endpoint>(); 265var endpoints = new List<Endpoint>();
DataSourceDependentCache.cs (2)
16private readonly Func<IReadOnlyList<Endpoint>, T> _initializeCore; 27public DataSourceDependentCache(EndpointDataSource dataSource, Func<IReadOnlyList<Endpoint>, T> initialize)
DataTokensMetadata.cs (1)
12/// Metadata that defines data tokens for an <see cref="Endpoint"/>. This metadata
DefaultEndpointDataSource.cs (11)
12/// Provides a collection of <see cref="Endpoint"/> instances. 17private readonly IReadOnlyList<Endpoint> _endpoints; 22/// <param name="endpoints">The <see cref="Endpoint"/> instances that the data source will return.</param> 23public DefaultEndpointDataSource(params Endpoint[] endpoints) 27_endpoints = (Endpoint[])endpoints.Clone(); 33/// <param name="endpoints">The <see cref="Endpoint"/> instances that the data source will return.</param> 34public DefaultEndpointDataSource(IEnumerable<Endpoint> endpoints) 38_endpoints = new List<Endpoint>(endpoints); 42/// Gets a <see cref="IChangeToken"/> used to signal invalidation of cached <see cref="Endpoint"/> 49/// Returns a read-only collection of <see cref="Endpoint"/> instances. 51public override IReadOnlyList<Endpoint> Endpoints => _endpoints;
DefaultLinkGenerator.cs (5)
327private IReadOnlyList<Endpoint> Endpoints => _serviceProvider.GetRequiredService<EndpointDataSource>().Endpoints; 334public Endpoint[] Items => _generator.Endpoints.ToArray(); 339public static void EndpointsFound(ILogger logger, object? address, IEnumerable<Endpoint> endpoints) 412public static void LinkGenerationSucceeded(ILogger logger, IEnumerable<Endpoint> endpoints, string uri) 427public static void LinkGenerationFailed(ILogger logger, IEnumerable<Endpoint> endpoints)
DefaultLinkParser.cs (3)
172public static void EndpointsFound(ILogger logger, object? address, IEnumerable<Endpoint> endpoints) 187public static void PathParsingSucceeded(ILogger logger, PathString path, Endpoint endpoint) 199public static void PathParsingFailed(ILogger logger, PathString path, IEnumerable<Endpoint> endpoints)
EndpointDataSource.cs (11)
12/// Provides a collection of <see cref="Endpoint"/> instances. 17/// Gets a <see cref="IChangeToken"/> used to signal invalidation of cached <see cref="Endpoint"/> 24/// Returns a read-only collection of <see cref="Endpoint"/> instances. 26public abstract IReadOnlyList<Endpoint> Endpoints { get; } 29/// Get the <see cref="Endpoint"/> instances for this <see cref="EndpointDataSource"/> given the specified <see cref="RouteGroupContext.Prefix"/> and <see cref="RouteGroupContext.Conventions"/>. 31/// <param name="context">Details about how the returned <see cref="Endpoint"/> instances should be grouped and a reference to application services.</param> 33/// Returns a read-only collection of <see cref="Endpoint"/> instances given the specified group <see cref="RouteGroupContext.Prefix"/> and <see cref="RouteGroupContext.Conventions"/>. 35public virtual IReadOnlyList<Endpoint> GetGroupedEndpoints(RouteGroupContext context) 43var endpoint = endpoints[i]; 89internal static string GetDebuggerDisplayStringForEndpoints(IReadOnlyList<Endpoint>? endpoints) 98foreach (var endpoint in endpoints)
EndpointGroupNameAttribute.cs (1)
7/// Specifies the endpoint group name in <see cref="Microsoft.AspNetCore.Http.Endpoint.Metadata"/>.
EndpointMiddleware.cs (7)
35var endpoint = httpContext.GetEndpoint(); 91static async Task AwaitRequestTask(Endpoint endpoint, Task requestTask, ILogger logger) 104private static void ThrowMissingAuthMiddlewareException(Endpoint endpoint) 112private static void ThrowMissingCorsMiddlewareException(Endpoint endpoint) 120private static void ThrowMissingAntiforgeryMiddlewareException(Endpoint endpoint) 132public static partial void ExecutingEndpoint(ILogger logger, Endpoint endpointName); 135public static partial void ExecutedEndpoint(ILogger logger, Endpoint endpointName);
EndpointNameAddressScheme.cs (12)
12private readonly DataSourceDependentCache<FrozenDictionary<string, Endpoint[]>> _cache; 16_cache = new DataSourceDependentCache<FrozenDictionary<string, Endpoint[]>>(dataSource, Initialize); 20internal FrozenDictionary<string, Endpoint[]> Entries => _cache.EnsureInitialized(); 22public IEnumerable<Endpoint> FindEndpoints(string address) 30return result ?? Array.Empty<Endpoint>(); 33private static FrozenDictionary<string, Endpoint[]> Initialize(IReadOnlyList<Endpoint> endpoints) 38var entries = new Dictionary<string, Endpoint[]>(StringComparer.Ordinal); 41var endpoint = endpoints[i]; 61var newEntry = new Endpoint[existing.Length + 1]; 85foreach (var endpoint in group.Value) 94static string? GetEndpointName(Endpoint endpoint)
EndpointNameAttribute.cs (1)
9/// Specifies the endpoint name in <see cref="Endpoint.Metadata"/>.
EndpointNameMetadata.cs (1)
11/// Specifies an endpoint name in <see cref="Endpoint.Metadata"/>.
EndpointRoutingMiddleware.cs (13)
62var endpoint = httpContext.GetEndpoint(); 104var endpoint = httpContext.GetEndpoint(); 158private Task ExecuteShortCircuit(ShortCircuitMetadata shortCircuitMetadata, Endpoint endpoint, HttpContext httpContext) 214static async Task AwaitRequestTask(Endpoint endpoint, Task requestTask, ILogger logger) 284private static void ThrowCannotShortCircuitAnAuthRouteException(Endpoint endpoint) 290private static void ThrowCannotShortCircuitACorsRouteException(Endpoint endpoint) 296private static void ThrowCannotShortCircuitAnAntiforgeryRouteException(Endpoint endpoint) 339public static void MatchSuccess(ILogger logger, Endpoint endpoint) 348public static void MatchSkipped(ILogger logger, Endpoint endpoint) 355public static partial void ExecutingEndpoint(ILogger logger, Endpoint endpointName); 358public static partial void ExecutedEndpoint(ILogger logger, Endpoint endpointName); 361public static partial void ShortCircuitedEndpoint(ILogger logger, Endpoint endpointName); 364public static partial void FallbackMatch(ILogger logger, Endpoint endpointName);
ExcludeFromDescriptionAttribute.cs (1)
11/// Indicates that this <see cref="Endpoint"/> should not be included in the generated API metadata.
IDataTokenMetadata.cs (1)
9/// Metadata that defines data tokens for an <see cref="Endpoint"/>. This metadata
IDynamicEndpointMetadata.cs (2)
10/// A metadata interface that can be used to specify that the associated <see cref="Endpoint" /> 16/// <see cref="MatcherPolicy"/> implementations that an <see cref="Endpoint"/> has dynamic behavior
IEndpointAddressScheme.cs (2)
18/// <returns>A collection of <see cref="Endpoint"/>.</returns> 19IEnumerable<Endpoint> FindEndpoints(TAddress address);
IEndpointGroupNameMetadata.cs (1)
9/// Defines a contract used to specify an endpoint group name in <see cref="Endpoint.Metadata"/>.
IEndpointNameMetadata.cs (1)
9/// Defines a contract use to specify an endpoint name in <see cref="Endpoint.Metadata"/>.
LinkParser.cs (2)
15/// specified by the <see cref="Endpoint"/> matching <paramref name="address"/>. 27/// <see cref="Endpoint"/> instances that match <paramref name="address"/> and then use the route
LinkParserEndpointNameAddressExtensions.cs (2)
15/// specified by the <see cref="Endpoint"/> matching <paramref name="endpointName"/>. 27/// <see cref="Endpoint"/> instances that match <paramref name="endpointName"/> and then use the route
Matching\AcceptsMatcherPolicy.cs (12)
13private static Endpoint? Http415Endpoint; 20public IComparer<Endpoint> Comparer { get; } = new ConsumesMetadataEndpointComparer(); 22bool INodeBuilderPolicy.AppliesToEndpoints(IReadOnlyList<Endpoint> endpoints) 34bool IEndpointSelectorPolicy.AppliesToEndpoints(IReadOnlyList<Endpoint> endpoints) 42private static bool AppliesToEndpointsCore(IReadOnlyList<Endpoint> endpoints) 138public IReadOnlyList<PolicyNodeEdge> GetEdges(IReadOnlyList<Endpoint> endpoints) 150var edges = new Dictionary<string, List<Endpoint>>(StringComparer.OrdinalIgnoreCase); 153var endpoint = endpoints[i]; 166edges.Add(contentType, new List<Endpoint>()); 175var endpoint = endpoints[i]; 224edges.Add(AnyContentType, new List<Endpoint>() 249private static Endpoint CreateRejectionEndpoint()
Matching\Candidate.cs (3)
11public readonly Endpoint Endpoint; 50public Candidate(Endpoint endpoint) 65Endpoint endpoint,
Matching\CandidateSet.cs (15)
14/// Represents a set of <see cref="Endpoint"/> candidates that have been matched 35public CandidateSet(Endpoint[] endpoints, RouteValueDictionary[] values, int[] scores) 74/// Gets the <see cref="CandidateState"/> associated with the candidate <see cref="Endpoint"/> 101/// Gets a value which indicates where the <see cref="Http.Endpoint"/> is considered 152/// Replaces the <see cref="Endpoint"/> at the provided <paramref name="index"/> with the 157/// The <see cref="Endpoint"/> to replace the original <see cref="Endpoint"/> at 165public void ReplaceEndpoint(int index, Endpoint? endpoint, RouteValueDictionary? values) 184/// Replaces the <see cref="Endpoint"/> at the provided <paramref name="index"/> with the 189/// The list of endpoints <see cref="Endpoint"/> to replace the original <see cref="Endpoint"/> at 208public void ExpandEndpoint(int index, IReadOnlyList<Endpoint> endpoints, IComparer<Endpoint> comparer) 278Array.Sort<Endpoint>(buffer, comparer); 339var duplicates = new List<Endpoint>();
Matching\CandidateState.cs (6)
13internal CandidateState(Endpoint endpoint, int score) 20internal CandidateState(Endpoint endpoint, RouteValueDictionary? values, int score) 28/// Gets the <see cref="Http.Endpoint"/>. 30public Endpoint Endpoint { get; } 33/// Gets the score of the <see cref="Http.Endpoint"/> within the current 51/// <see cref="Http.Endpoint"/> and the current request.
Matching\ContentEncodingNegotiationMatcherPolicy.cs (3)
13private protected override bool HasMetadata(Endpoint endpoint) => endpoint.Metadata.GetMetadata<ContentEncodingMetadata>() != null; 15private protected override string? GetMetadataValue(Endpoint endpoint) => endpoint.Metadata.GetMetadata<ContentEncodingMetadata>()?.Value; 23private protected override double? GetMetadataQuality(Endpoint endpoint)
Matching\DataSourceDependentMatcher.cs (1)
38private Matcher CreateMatcher(IReadOnlyList<Endpoint> endpoints)
Matching\DefaultEndpointSelector.cs (2)
60Endpoint? endpoint = null; 111var matches = new List<Endpoint>();
Matching\DfaMatcher.cs (7)
276Endpoint endpoint, 298Endpoint endpoint, 364public static void CandidateRejectedByComplexSegment(ILogger logger, string path, Endpoint endpoint, RoutePatternPathSegment segment) 380public static void CandidateRejectedByConstraint(ILogger logger, string path, Endpoint endpoint, string constraintName, IRouteConstraint constraint, object? value) 396public static void CandidateNotValid(ILogger logger, string path, Endpoint endpoint) 412public static void CandidateValid(ILogger logger, string path, Endpoint endpoint) 428private static string GetRoutePattern(Endpoint endpoint)
Matching\DfaMatcherBuilder.cs (8)
705internal Candidate[] CreateCandidates(IReadOnlyList<Endpoint> endpoints) 715var examplar = endpoints[0]; 720var endpoint = endpoints[i]; 735internal Candidate CreateCandidate(Endpoint endpoint, int score) 911if (!nodeBuilder.AppliesToEndpoints(parent.Matches ?? (IReadOnlyList<Endpoint>)Array.Empty<Endpoint>())) 921var edges = nodeBuilder.GetEdges(parent.Matches ?? (IReadOnlyList<Endpoint>)Array.Empty<Endpoint>());
Matching\DfaNode.cs (5)
26public List<Endpoint> Matches { get; private set; } 58public void AddMatch(Endpoint endpoint) 62Matches = new List<Endpoint>(); 68public void AddMatches(IEnumerable<Endpoint> endpoints) 72Matches = new List<Endpoint>(endpoints);
Matching\EndpointComparer.cs (21)
23internal sealed class EndpointComparer : IComparer<Endpoint>, IEqualityComparer<Endpoint> 25private readonly IComparer<Endpoint>[] _comparers; 30_comparers = new IComparer<Endpoint>[2 + policies.Length]; 39public int Compare(Endpoint? x, Endpoint? y) 52private static int ComparePattern(Endpoint x, Endpoint y) 75public bool Equals(Endpoint? x, Endpoint? y) 85public int GetHashCode(Endpoint obj) 92private int CompareCore(Endpoint x, Endpoint y) 106private sealed class OrderComparer : IComparer<Endpoint> 108public static readonly IComparer<Endpoint> Instance = new OrderComparer(); 110public int Compare(Endpoint? x, Endpoint? y) 133private sealed class PrecedenceComparer : IComparer<Endpoint> 135public static readonly IComparer<Endpoint> Instance = new PrecedenceComparer(); 137public int Compare(Endpoint? x, Endpoint? y)
Matching\EndpointMetadataComparer.cs (15)
13/// A comparer that can order <see cref="Endpoint"/> instances based on implementations of 15/// provider and provided to <see cref="CandidateSet.ExpandEndpoint(int, IReadOnlyList{Endpoint}, IComparer{Endpoint})"/>. 17public sealed class EndpointMetadataComparer : IComparer<Endpoint> 20private IComparer<Endpoint>[]? _comparers; 31private IComparer<Endpoint>[] Comparers 48int IComparer<Endpoint>.Compare(Endpoint? x, Endpoint? y) 69/// a specific type of metadata from <see cref="Endpoint.Metadata"/> for comparison. 76public abstract class EndpointMetadataComparer<TMetadata> : IComparer<Endpoint> where TMetadata : class 94public int Compare(Endpoint? x, Endpoint? y) 105/// <param name="endpoint">The <see cref="Endpoint"/>.</param> 107protected virtual TMetadata? GetMetadata(Endpoint endpoint)
Matching\EndpointSelector.cs (3)
9/// A service that is responsible for the final <see cref="Endpoint"/> selection 16/// Asynchronously selects an <see cref="Endpoint"/> from the <see cref="CandidateSet"/>. 23/// <see cref="EndpointHttpContextExtensions.SetEndpoint(HttpContext, Endpoint)"/>
Matching\HostMatcherPolicy.cs (10)
24public IComparer<Endpoint> Comparer { get; } = new HostMetadataEndpointComparer(); 26bool INodeBuilderPolicy.AppliesToEndpoints(IReadOnlyList<Endpoint> endpoints) 33bool IEndpointSelectorPolicy.AppliesToEndpoints(IReadOnlyList<Endpoint> endpoints) 46private static bool AppliesToEndpointsCore(IReadOnlyList<Endpoint> endpoints) 191public IReadOnlyList<PolicyNodeEdge> GetEdges(IReadOnlyList<Endpoint> endpoints) 203var edges = new Dictionary<EdgeKey, List<Endpoint>>(); 206var endpoint = endpoints[i]; 218edges.Add(host, new List<Endpoint>()); 227var endpoint = endpoints[i]; 277private static EdgeKey[]? GetEdgeKeys(Endpoint endpoint)
Matching\HttpMethodMatcherPolicy.cs (14)
30public IComparer<Endpoint> Comparer => new HttpMethodMetadataEndpointComparer(); 39bool INodeBuilderPolicy.AppliesToEndpoints(IReadOnlyList<Endpoint> endpoints) 51bool IEndpointSelectorPolicy.AppliesToEndpoints(IReadOnlyList<Endpoint> endpoints) 59private static bool AppliesToEndpointsCore(IReadOnlyList<Endpoint> endpoints) 164public IReadOnlyList<PolicyNodeEdge> GetEdges(IReadOnlyList<Endpoint> endpoints) 175var edges = new Dictionary<EdgeKey, List<Endpoint>>(); 178var endpoint = endpoints[i]; 197edges.Add(key, new List<Endpoint>()); 207edges.Add(key, new List<Endpoint>()); 228var endpoint = endpoints[i]; 284var endpoint = CreateRejectionEndpoint(allHttpMethods); 285var matches = new List<Endpoint>() { endpoint, }; 298static (IReadOnlyList<string> httpMethods, bool acceptCorsPreflight) GetHttpMethods(Endpoint e) 380private static Endpoint CreateRejectionEndpoint(IEnumerable<string>? httpMethods)
Matching\IEndpointComparerPolicy.cs (1)
32IComparer<Endpoint> Comparer { get; }
Matching\IEndpointSelectorPolicy.cs (4)
20/// <param name="endpoints">The set of candidate <see cref="Endpoint"/> values.</param> 24bool AppliesToEndpoints(IReadOnlyList<Endpoint> endpoints); 41/// calling <see cref="EndpointHttpContextExtensions.SetEndpoint(HttpContext, Endpoint)"/> 43/// <see cref="Endpoint"/> value that will produce the desired error when executed.
Matching\INodeBuilderPolicy.cs (4)
16/// <param name="endpoints">A list of <see cref="Endpoint"/>.</param> 18bool AppliesToEndpoints(IReadOnlyList<Endpoint> endpoints); 23/// <param name="endpoints">A list of <see cref="Endpoint"/>.</param> 25IReadOnlyList<PolicyNodeEdge> GetEdges(IReadOnlyList<Endpoint> endpoints);
Matching\Matcher.cs (2)
9/// An interface for components that can select an <see cref="Endpoint"/> given the current request, as part 15/// Attempts to asynchronously select an <see cref="Endpoint"/> for the current request.
Matching\MatcherPolicy.cs (1)
47protected static bool ContainsDynamicEndpoints(IReadOnlyList<Endpoint> endpoints)
Matching\NegotiationMatcherPolicy.cs (15)
14private static Endpoint? Http406Endpoint; 21public IComparer<Endpoint> Comparer => new NegotiationMetadataEndpointComparer(); 23bool INodeBuilderPolicy.AppliesToEndpoints(IReadOnlyList<Endpoint> endpoints) => 26bool IEndpointSelectorPolicy.AppliesToEndpoints(IReadOnlyList<Endpoint> endpoints) => 29private bool AppliesToEndpointsCore(IReadOnlyList<Endpoint> endpoints) 33var endpoint = endpoints[i]; 44private protected abstract bool HasMetadata(Endpoint endpoint); 46private protected abstract string? GetMetadataValue(Endpoint endpoint); 52private protected abstract double? GetMetadataQuality(Endpoint endpoint); 250public IReadOnlyList<PolicyNodeEdge> GetEdges(IReadOnlyList<Endpoint> endpoints) 262var edges = new Dictionary<string, List<Endpoint>>(StringComparer.OrdinalIgnoreCase); 265var endpoint = endpoints[i]; 277var endpoint = endpoints[i]; 325private double[] CalculateEndpointQualities(List<Endpoint> values) 348private static Endpoint CreateRejectionEndpoint() =>
Matching\PolicyNodeEdge.cs (2)
18public PolicyNodeEdge(object state, IReadOnlyList<Endpoint> endpoints) 27public IReadOnlyList<Endpoint> Endpoints { get; }
RouteEndpoint.cs (1)
10/// Represents an <see cref="Endpoint"/> that can be used in URL matching or URL generation.
RouteEndpointBuilder.cs (1)
48public override Endpoint Build()
RouteGroupBuilder.cs (6)
50public override IReadOnlyList<Endpoint> Endpoints => 54public override IReadOnlyList<Endpoint> GetGroupedEndpoints(RouteGroupContext context) => 57public IReadOnlyList<Endpoint> GetGroupedEndpointsWithNullablePrefix( 650 => Array.Empty<Endpoint>(), 107private IReadOnlyList<Endpoint> SelectEndpointsFromAllDataSources(RouteGroupContext context) 109var groupedEndpoints = new List<Endpoint>();
RouteValuesAddressScheme.cs (5)
23public IEnumerable<Endpoint> FindEndpoints(RouteValuesAddress address) 59return Array.Empty<Endpoint>(); 62private static IEnumerable<Endpoint> GetEndpoints(IList<OutboundMatchResult> matchResults, int matchCount) 70private StateEntry Initialize(IReadOnlyList<Endpoint> endpoints) 94var endpoint = endpoints[i];
src\aspnetcore\src\Shared\HttpExtensions.cs (4)
36internal static Endpoint? GetOriginalEndpoint(HttpContext context) 38var endpoint = context.GetEndpoint(); 42if (endpoint == null && context.Items.TryGetValue(OriginalEndpointKey, out var e) && e is Endpoint originalEndpoint) 51var endpoint = context.GetEndpoint();
Microsoft.AspNetCore.Routing.Abstractions (1)
Properties\AssemblyInfo.cs (1)
11[assembly: TypeForwardedTo(typeof(Endpoint))]
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Http\HttpProtocol.cs (1)
79private Endpoint? _endpoint;
Internal\Http\HttpProtocol.FeatureCollection.cs (1)
230Endpoint? IEndpointFeature.Endpoint
Microsoft.AspNetCore.StaticAssets (6)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
177var endpoint = _context.GetEndpoint()!;
StaticAssetEndpointDataSource.cs (3)
23private List<Endpoint> _endpoints = null!; 65public override IReadOnlyList<Endpoint> Endpoints 103var endpoints = new List<Endpoint>();
StaticAssetEndpointFactory.cs (1)
19public Endpoint Create(StaticAssetDescriptor resource, List<Action<EndpointBuilder>> conventions, List<Action<EndpointBuilder>> finallyConventions)
StaticAssetsInvoker.cs (1)
163if (context.GetEndpoint() is Endpoint { Metadata: { } metadata } && metadata.GetMetadata<BuildAssetMetadata>() != null)