Microsoft.AspNetCore.Routing.Matching Namespace

Provides types that are used to customize endpoint route matching.

Classes

CandidateSet

Represents a set of Endpoint candidates that have been matched by the routing system. Used by implementations of EndpointSelector and IEndpointSelectorPolicy.

EndpointMetadataComparer

A comparer that can order Endpoint instances based on implementations of IEndpointComparerPolicy. The implementation can be retrieved from the service provider and provided to ExpandEndpoint(Int32, IReadOnlyList<Endpoint>, IComparer<Endpoint>).

EndpointMetadataComparer<TMetadata>

A base class for IComparer<T> implementations that use a specific type of metadata from Metadata for comparison. Useful for implementing Comparer.

EndpointSelector

A service that is responsible for the final Endpoint selection decision. To use a custom EndpointSelector register an implementation of EndpointSelector in the dependency injection container as a singleton.

HostMatcherPolicy

A MatcherPolicy that implements filtering and selection by the host header of a request.

HttpMethodMatcherPolicy

An MatcherPolicy that implements filtering and selection by the HTTP method of a request.

PolicyJumpTable

Supports retrieving endpoints that fulfill a certain matcher policy.

Structs

CandidateState

The state associated with a candidate in a CandidateSet.

PolicyJumpTableEdge

Represents an entry in a PolicyJumpTable.

PolicyNodeEdge

Represents an edge in a matcher policy graph.

Interfaces

IEndpointComparerPolicy

A MatcherPolicy interface that can be implemented to sort endpoints. Implementations of IEndpointComparerPolicy must inherit from MatcherPolicy and should be registered in the dependency injection container as singleton services of type MatcherPolicy.

IEndpointSelectorPolicy

A MatcherPolicy interface that can implemented to filter endpoints in a CandidateSet. Implementations of IEndpointSelectorPolicy must inherit from MatcherPolicy and should be registered in the dependency injection container as singleton services of type MatcherPolicy.

INodeBuilderPolicy

Implements an interface for a matcher policy with support for generating graph representations of the endpoints.

IParameterLiteralNodeMatchingPolicy

Defines the contract that a class must implement in order to check if a literal value is valid for a given constraint. When a parameter implements this interface, the router is able to optimize away some paths from the route table that don't match this constraint.

Remarks

For more information about routing, see Routing in ASP.NET Core.