Microsoft.AspNetCore.Routing Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains types that are used with ASP.NET Core routing and URL generation. Routing middleware is responsible for matching incoming HTTP requests and dispatching those requests to the app's executable Endpoint instances. URL generation uses LinkGenerator to create a URL path from a set of route values.
Classes
CompositeEndpointDataSource |
Represents an EndpointDataSource whose values come from a collection of EndpointDataSource instances. |
ContentEncodingMetadata |
Metadata used to negotiate wich endpoint to select based on the value of the Accept-Encoding header. |
ControllerLinkGeneratorExtensions |
Extension methods for using LinkGenerator to generate links to MVC controllers. |
DataTokensMetadata |
Metadata that defines data tokens for an Endpoint. This metadata type provides data tokens value for DataTokens associated with an endpoint. |
DefaultEndpointDataSource |
Provides a collection of Endpoint instances. |
DefaultInlineConstraintResolver |
The default implementation of IInlineConstraintResolver. Resolves constraints by parsing a constraint key and constraint arguments, using a map to resolve the constraint type, and calling an appropriate constructor for the constraint type. |
EndpointDataSource |
Provides a collection of Endpoint instances. |
EndpointGroupNameAttribute |
Specifies the endpoint group name in Metadata. |
EndpointNameAttribute |
Specifies the endpoint name in Metadata. |
EndpointNameMetadata |
Specifies an endpoint name in Metadata. |
EndpointSelectorContext | |
ExcludeFromDescriptionAttribute |
Indicates that this Endpoint should not be included in the generated API metadata. |
HostAttribute |
Attribute for providing host metdata that is used during routing. |
HttpMethodMetadata |
Represents HTTP method metadata used during routing. |
IdentityApiEndpointRouteBuilderExtensions |
Provides extension methods for IEndpointRouteBuilder to add identity endpoints. |
InlineRouteParameterParser |
Contains methods for parsing processing constraints from a route definition. |
LinkGenerator |
Defines a contract to generate absolute and related URIs based on endpoint routing. |
LinkGeneratorEndpointNameAddressExtensions |
Extension methods for using LinkGenerator with and endpoint name. |
LinkGeneratorRouteValuesAddressExtensions |
Extension methods for using LinkGenerator with RouteValuesAddress. |
LinkOptions |
Configures options for generated URLs. |
LinkParser |
Defines a contract to parse URIs using information from routing. |
LinkParserEndpointNameAddressExtensions |
Extension methods for using LinkParser with an endpoint name. |
MatcherPolicy |
Defines a policy that applies behaviors to the URL matcher. Implementations of MatcherPolicy and related interfaces must be registered in the dependency injection container as singleton services of type MatcherPolicy. |
PageLinkGeneratorExtensions |
Extension methods for using LinkGenerator to generate links to Razor Pages. |
ParameterPolicyFactory |
Defines an abstraction for resolving inline parameter policies as instances of IParameterPolicy. |
RequestDelegateRouteBuilderExtensions |
Provides extension methods for adding new handlers to a IRouteBuilder. |
Route |
Represents an instance of a route. |
RouteBase |
Base class implementation of an IRouter. |
RouteBuilder |
Provides support for specifying routes in an application. |
RouteCollection |
Supports managing a collection for multiple routes. |
RouteConstraintBuilder |
A builder for produding a mapping of keys to see IRouteConstraint. |
RouteConstraintMatcher |
Use to evaluate if all route parameter values match their constraints. |
RouteContext |
A context object for RouteAsync(RouteContext). |
RouteCreationException |
The exception that is thrown for invalid routes or constraints. |
RouteData |
Information about the current routing path. |
RouteEndpoint |
Represents an Endpoint that can be used in URL matching or URL generation. |
RouteEndpointBuilder |
Supports building a new RouteEndpoint. |
RouteGroupBuilder |
A builder for defining groups of endpoints with a common prefix that implements both the IEndpointRouteBuilder and IEndpointConventionBuilder interfaces. This can be used to add endpoints with the prefix defined by MapGroup(IEndpointRouteBuilder, RoutePattern) and to customize those endpoints using conventions. |
RouteGroupContext |
Represents the information accessible to GetGroupedEndpoints(RouteGroupContext). |
RouteHandler |
Supports implementing a handler that executes for a given route. |
RouteHandlerOptions |
Options for controlling the behavior of MapGet(IEndpointRouteBuilder, String, Delegate) and similar methods. |
RouteHandlerServices |
Provides methods used for invoking the route endpoint infrastructure with custom funcs for populating metadata and creating request delegates. Intended to be consumed from the RequestDeleatgeGenerator only. |
RouteNameMetadata |
Metadata used during link generation to find the associated endpoint using route name. |
RouteOptions |
Represents the configurable options on a route. |
RouteShortCircuitEndpointRouteBuilderExtensions |
Provides extension methods for IEndpointRouteBuilder to add short circuited endpoints. |
RouteValueDictionary |
An IDictionary<TKey,TValue> type for route values. |
RouteValueEqualityComparer |
An IEqualityComparer<T> implementation that compares objects as-if they were route value strings. |
RouteValuesAddress |
An address of route name and values. |
RouteValuesAddressMetadata |
Metadata used during link generation to find the associated endpoint using route values. |
RoutingFeature |
A feature for routing functionality. |
RoutingHttpContextExtensions |
Extension methods for HttpContext related to routing. |
SuppressLinkGenerationMetadata |
Represents metadata used during link generation. If SuppressLinkGeneration is |
SuppressMatchingMetadata |
Metadata used to prevent URL matching. If SuppressMatching is |
VirtualPathContext |
A context for virtual path generation operations. |
VirtualPathData |
Represents information about the route and virtual path that are the result of generating a URL with the ASP.NET routing middleware. |
Structs
RouteData.RouteDataSnapshot |
A snapshot of the state of a RouteData instance. |
RouteValueDictionary.Enumerator |
Interfaces
IDataTokensMetadata |
Metadata that defines data tokens for an Endpoint. This metadata type provides data tokens value for DataTokens associated with an endpoint. |
IDynamicEndpointMetadata |
A metadata interface that can be used to specify that the associated Endpoint will be dynamically replaced during matching. |
IEndpointAddressScheme<TAddress> |
Defines a contract to find endpoints based on the provided address. |
IEndpointGroupNameMetadata |
Defines a contract used to specify an endpoint group name in Metadata. |
IEndpointNameMetadata |
Defines a contract use to specify an endpoint name in Metadata. |
IEndpointRouteBuilder |
Defines a contract for a route builder in an application. A route builder specifies the routes for an application. |
IExcludeFromDescriptionMetadata |
Indicates whether or not that API explorer data should be emitted for this endpoint. |
IHostMetadata |
Represents host metadata used during routing. |
IHttpMethodMetadata |
Represents HTTP method metadata used during routing. |
IInlineConstraintResolver |
Defines an abstraction for resolving inline constraints as instances of IRouteConstraint. |
INamedRouter |
An interface for an IRouter with a name. |
IOutboundParameterTransformer |
Defines the contract that a class must implement to transform route values while building a URI. |
IParameterPolicy |
A marker interface for types that are associated with route parameters. |
IRouteBuilder |
Defines a contract for a route builder in an application. A route builder specifies the routes for an application. |
IRouteCollection |
Interface for a router that supports appending new routes. |
IRouteConstraint |
Defines the contract that a class must implement in order to check whether a URL parameter value is valid for a constraint. |
IRouteHandler |
Defines a contract for a handler of a route. |
IRouteNameMetadata |
Represents metadata used during link generation to find the associated endpoint using route name. |
IRouter |
Interface for implementing a router. |
IRouteValuesAddressMetadata |
Represents metadata used during link generation to find the associated endpoint using route values. |
IRoutingFeature |
A feature interface for routing functionality. |
ISuppressLinkGenerationMetadata |
Represents metadata used during link generation. If SuppressLinkGeneration is |
ISuppressMatchingMetadata |
Metadata used to prevent URL matching. If SuppressMatching is |
Enums
RouteDirection |
Indicates whether ASP.NET routing is processing a URL from an HTTP request or generating a URL. |
Remarks
For more information about routing, see Routing in ASP.NET Core.