Microsoft.AspNetCore.Routing
Initializes a fast .
This constructor does not cache the helper. For caching, use .
Gets the backing .
Gets (or sets in derived types) the property name.
Gets the property value getter.
Gets the property value setter.
Returns the property value for the specified .
The object whose property value will be returned.
The property value.
Sets the property value for the specified .
The object whose property value will be set.
The property value.
Creates and caches fast property helpers that expose getters for every public get property on the
underlying type.
The type info to extract property accessors for.
A cached array of all public properties of the specified type.
Creates and caches fast property helpers that expose getters for every public get property on the
specified type.
The type to extract property accessors for.
A cached array of all public properties of the specified type.
Creates and caches fast property helpers that expose getters for every non-hidden get property
on the specified type.
excludes properties defined on base types that have been
hidden by definitions using the new keyword.
The type info to extract property accessors for.
A cached array of all public properties of the specified type.
Creates and caches fast property helpers that expose getters for every non-hidden get property
on the specified type.
excludes properties defined on base types that have been
hidden by definitions using the new keyword.
The type to extract property accessors for.
A cached array of all public properties of the specified type.
Creates a single fast property getter. The result is not cached.
propertyInfo to extract the getter for.
a fast getter.
This method is more memory efficient than a dynamically compiled lambda, and about the
same speed.
Creates a single fast property getter which is safe for a null input object. The result is not cached.
propertyInfo to extract the getter for.
a fast getter.
This method is more memory efficient than a dynamically compiled lambda, and about the
same speed.
Creates a single fast property setter for reference types. The result is not cached.
propertyInfo to extract the setter for.
a fast getter.
This method is more memory efficient than a dynamically compiled lambda, and about the
same speed. This only works for reference types.
Given an object, adds each instance property with a public get method as a key and its
associated value to a dictionary.
If the object is already an instance, then a copy
is returned.
The implementation of PropertyHelper will cache the property accessors per-type. This is
faster when the same type is used multiple times with ObjectToDictionary.
Contains extension methods to .
Adds services required for routing requests.
The to add the services to.
The so that additional calls can be chained.
Adds services required for routing requests.
The to add the services to.
The routing options to configure the middleware with.
The so that additional calls can be chained.
Extension methods for adding the middleware to an .
Adds a middleware to the specified with the specified .
The to add the middleware to.
The to use for routing requests.
A reference to this instance after the operation has completed.
Adds a middleware to the specified
with the built from configured .
The to add the middleware to.
An to configure the provided .
A reference to this instance after the operation has completed.
Provides extension methods for to add routes.
Adds a route to the with the specified name and template.
The to add the route to.
The name of the route.
The URL pattern of the route.
A reference to this instance after the operation has completed.
Adds a route to the with the specified name, template, and default values.
The to add the route to.
The name of the route.
The URL pattern of the route.
An object that contains default values for route parameters. The object's properties represent the names
and values of the default values.
A reference to this instance after the operation has completed.
Adds a route to the with the specified name, template, default values, and
constraints.
The to add the route to.
The name of the route.
The URL pattern of the route.
An object that contains default values for route parameters. The object's properties represent the names
and values of the default values.
An object that contains constraints for the route. The object's properties represent the names and values
of the constraints.
A reference to this instance after the operation has completed.
Adds a route to the with the specified name, template, default values, and
data tokens.
The to add the route to.
The name of the route.
The URL pattern of the route.
An object that contains default values for route parameters. The object's properties represent the names
and values of the default values.
An object that contains constraints for the route. The object's properties represent the names and values
of the constraints.
An object that contains data tokens for the route. The object's properties represent the names and values
of the data tokens.
A reference to this instance after the operation has completed.
Represents an whose values come from a collection of instances.
Gets a used to signal invalidation of cached
instances.
The .
Returns a read-only collection of instances.
Constrains a route parameter to contain only lowercase or uppercase letters A through Z in the English alphabet.
Initializes a new instance of the class.
Constrains a route parameter to represent only Boolean values.
Constrains a route by several child constraints.
Initializes a new instance of the class.
The child constraints that must match for this constraint to match.
Gets the child constraints that must match for this constraint to match.
Constrains a route parameter to represent only values.
This constraint tries to parse strings by using all of the formats returned by the
CultureInfo.InvariantCulture.DateTimeFormat.GetAllDateTimePatterns() method.
For a sample on how to list all formats which are considered, please visit
http://msdn.microsoft.com/en-us/library/aszyst2c(v=vs.110).aspx
Constrains a route parameter to represent only decimal values.
Constrains a route parameter to represent only 64-bit floating-point values.
Constrains a route parameter to represent only 32-bit floating-point values.
Constrains a route parameter to represent only values.
Matches values specified in any of the five formats "N", "D", "B", "P", or "X",
supported by Guid.ToString(string) and Guid.ToString(String, IFormatProvider) methods.
Constrains the HTTP method of request or a route.
Creates a new instance of that accepts the HTTP methods specified
by .
The allowed HTTP methods.
Gets the HTTP methods allowed by the constraint.
Constrains a route parameter to represent only 32-bit integer values.
Constrains a route parameter to be a string of a given length or within a given range of lengths.
Initializes a new instance of the class that constrains
a route parameter to be a string of a given length.
The length of the route parameter.
Initializes a new instance of the class that constrains
a route parameter to be a string of a given length.
The minimum length allowed for the route parameter.
The maximum length allowed for the route parameter.
Gets the minimum length allowed for the route parameter.
Gets the maximum length allowed for the route parameter.
Constrains a route parameter to represent only 64-bit integer values.
Constrains a route parameter to be a string with a maximum length.
Initializes a new instance of the class.
The maximum length allowed for the route parameter.
Gets the maximum length allowed for the route parameter.
Constrains a route parameter to be an integer with a maximum value.
Initializes a new instance of the class.
The maximum value allowed for the route parameter.
Gets the maximum allowed value of the route parameter.
Constrains a route parameter to be a string with a minimum length.
Initializes a new instance of the class.
The minimum length allowed for the route parameter.
Gets the minimum length allowed for the route parameter.
Constrains a route parameter to be a long with a minimum value.
Initializes a new instance of the class.
The minimum value allowed for the route parameter.
Gets the minimum allowed value of the route parameter.
Defines a constraint on an optional parameter. If the parameter is present, then it is constrained by InnerConstraint.
Constraints a route parameter to be an integer within a given range of values.
Initializes a new instance of the class.
The minimum value.
The maximum value.
The minimum value should be less than or equal to the maximum value.
Gets the minimum allowed value of the route parameter.
Gets the maximum allowed value of the route parameter.
Represents a regex constraint which can be used as an inlineConstraint.
Initializes a new instance of the class.
The regular expression pattern to match.
Constraints a route parameter that must have a value.
This constraint is primarily used to enforce that a non-parameter value is present during
URL generation.
Constrains a route parameter to contain only a specified string.
Initializes a new instance of the class.
The constraint value to match.
Metadata that defines data tokens for an . This metadata
type provides data tokens value for associated
with an endpoint.
Get the data tokens.
Provides a collection of instances.
Initializes a new instance of the class.
The instances that the data source will return.
Initializes a new instance of the class.
The instances that the data source will return.
Gets a used to signal invalidation of cached
instances.
The .
Returns a read-only collection of instances.
The default implementation of . 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.
Initializes a new instance of the class.
Accessor for containing the constraints of interest.
A typical constraint looks like the following
"exampleConstraint(arg1, arg2, 12)".
Here if the type registered for exampleConstraint has a single constructor with one argument,
The entire string "arg1, arg2, 12" will be treated as a single argument.
In all other cases arguments are split at comma.
Provides a collection of instances.
Gets a used to signal invalidation of cached
instances.
The .
Returns a read-only collection of instances.
Specifies an endpoint name in .
Endpoint names must be unique within an application, and can be used to unambiguously
identify a desired endpoint for URI generation using .
Creates a new instance of with the provided endpoint name.
The endpoint name.
Gets the endpoint name.
Gets or sets the selected for the current
request.
Gets or sets the associated with the currrent
request.
Gets or sets the for the current request.
The setter is not implemented. Use to set the route values.
Represents HTTP method metadata used during routing.
Initializes a new instance of the class.
The HTTP methods used during routing.
An empty collection means any HTTP method will be accepted.
Initializes a new instance of the class.
The HTTP methods used during routing.
An empty collection means any HTTP method will be accepted.
A value indicating whether routing accepts CORS preflight requests.
Returns a value indicating whether the associated endpoint should accept CORS preflight requests.
Returns a read-only collection of HTTP methods used during routing.
An empty collection means any HTTP method will be accepted.
Metadata that defines data tokens for an . This metadata
type provides data tokens value for associated
with an endpoint.
Get the data tokens.
Defines a contract to find endpoints based on the provided address.
The address type to look up endpoints.
Finds endpoints based on the provided .
The information used to look up endpoints.
A collection of .
Defines a contract use to specify an endpoint name in .
Endpoint names must be unique within an application, and can be used to unambiguously
identify a desired endpoint for URI generation using .
Gets the endpoint name.
Represents HTTP method metadata used during routing.
Returns a value indicating whether the associated endpoint should accept CORS preflight requests.
Returns a read-only collection of HTTP methods used during routing.
An empty collection means any HTTP method will be accepted.
Defines an abstraction for resolving inline constraints as instances of .
Resolves the inline constraint.
The inline constraint to resolve.
The the inline constraint was resolved to.
A singleton service that can be used to write the route table as a state machine
in GraphViz DOT language https://www.graphviz.org/doc/info/lang.html
You can use http://www.webgraphviz.com/ to visualize the results.
This type has no support contract, and may be removed or changed at any time in
a future release.
A marker class used to determine if all the routing services were added
to the before routing is configured.
Defines a contract for a route builder in an application. A route builder specifies the routes for
an application.
Gets the .
Gets or sets the default that is used as a handler if an
is added to the list of routes but does not specify its own.
Gets the sets the used to resolve services for routes.
Gets the routes configured in the builder.
Builds an that routes the routes specified in the property.
Represents metadata used during link generation to find
the associated endpoint using route values.
Gets the route name. Can be null.
Gets the required route values.
Represents metadata used during link generation. If is true
the associated endpoint will not be used for link generation.
Gets a value indicating whether the assocated endpoint should be used for link generation.
Metadata used to prevent URL matching. If is true the
associated endpoint will not be considered for URL matching.
Gets a value indicating whether the assocated endpoint should be used for URL matching.
Extension methods for using with and endpoint name.
Generates a URI with an absolute path based on the provided values.
The .
The associated with the current request.
The endpoint name. Used to resolve endpoints.
The route values. Used to expand parameters in the route template. Optional.
An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of will be used.
An optional URI fragment. Appended to the resulting URI.
An optional . Settings on provided object override the settings with matching
names from RouteOptions.
A URI with an absolute path, or null.
Generates a URI with an absolute path based on the provided values.
The .
The endpoint name. Used to resolve endpoints.
The route values. Used to expand parameters in the route template. Optional.
An optional URI path base. Prepended to the path in the resulting URI.
An optional URI fragment. Appended to the resulting URI.
An optional . Settings on provided object override the settings with matching
names from RouteOptions.
A URI with an absolute path, or null.
Generates an absolute URI based on the provided values.
The .
The associated with the current request.
The endpoint name. Used to resolve endpoints.
The route values. Used to expand parameters in the route template. Optional.
The URI scheme, applied to the resulting URI. Optional. If not provided, the value of will be used.
The URI host/authority, applied to the resulting URI. Optional. If not provided, the value will be used.
See the remarks section for details about the security implications of the .
An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of will be used.
An optional URI fragment. Appended to the resulting URI.
An optional . Settings on provided object override the settings with matching
names from RouteOptions.
A URI with an absolute path, or null.
The value of should be a trusted value. Relying on the value of the current request
can allow untrusted input to influence the resulting URI unless the Host header has been validated.
See the deployment documentation for instructions on how to properly validate the Host header in
your deployment environment.
Generates an absolute URI based on the provided values.
The .
The endpoint name. Used to resolve endpoints.
The route values. Used to expand parameters in the route template. Optional.
The URI scheme, applied to the resulting URI.
The URI host/authority, applied to the resulting URI.
See the remarks section for details about the security implications of the .
An optional URI path base. Prepended to the path in the resulting URI.
An optional URI fragment. Appended to the resulting URI.
An optional . Settings on provided object override the settings with matching
names from RouteOptions.
An absolute URI, or null.
The value of should be a trusted value. Relying on the value of the current request
can allow untrusted input to influence the resulting URI unless the Host header has been validated.
See the deployment documentation for instructions on how to properly validate the Host header in
your deployment environment.
Extension methods for using with .
Generates a URI with an absolute path based on the provided values.
The .
The associated with the current request.
The route name. Used to resolve endpoints. Optional.
The route values. Used to resolve endpoints and expand parameters in the route template. Optional.
An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of will be used.
An optional URI fragment. Appended to the resulting URI.
An optional . Settings on provided object override the settings with matching
names from RouteOptions.
A URI with an absolute path, or null.
Generates a URI with an absolute path based on the provided values.
The .
The route name. Used to resolve endpoints. Optional.
The route values. Used to resolve endpoints and expand parameters in the route template. Optional.
An optional URI path base. Prepended to the path in the resulting URI.
An optional URI fragment. Appended to the resulting URI.
An optional . Settings on provided object override the settings with matching
names from RouteOptions.
A URI with an absolute path, or null.
Generates an absolute URI based on the provided values.
The .
The associated with the current request.
The route name. Used to resolve endpoints. Optional.
The route values. Used to resolve endpoints and expand parameters in the route template. Optional.
The URI scheme, applied to the resulting URI. Optional. If not provided, the value of will be used.
The URI host/authority, applied to the resulting URI. Optional. If not provided, the value will be used.
See the remarks section for details about the security implications of the .
An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of will be used.
An optional URI fragment. Appended to the resulting URI.
An optional . Settings on provided object override the settings with matching
names from RouteOptions.
A URI with an absolute path, or null.
The value of should be a trusted value. Relying on the value of the current request
can allow untrusted input to influence the resulting URI unless the Host header has been validated.
See the deployment documentation for instructions on how to properly validate the Host header in
your deployment environment.
Generates an absolute URI based on the provided values.
The .
The route name. Used to resolve endpoints. Optional.
The route values. Used to resolve endpoints and expand parameters in the route template. Optional.
The URI scheme, applied to the resulting URI.
The URI host/authority, applied to the resulting URI.
See the remarks section for details about the security implications of the .
An optional URI path base. Prepended to the path in the resulting URI.
An optional URI fragment. Appended to the resulting URI.
An optional . Settings on provided object override the settings with matching
names from RouteOptions.
An absolute URI, or null.
The value of should be a trusted value. Relying on the value of the current request
can allow untrusted input to influence the resulting URI unless the Host header has been validated.
See the deployment documentation for instructions on how to properly validate the Host header in
your deployment environment.
An exception which indicates multiple matches in endpoint selection.
Represents a set of candidates that have been matched
by the routing system. Used by implementations of
and .
Initializes a new instances of the class with the provided ,
, and .
The constructor is provided to enable unit tests of implementations of
and .
The list of endpoints, sorted in descending priority order.
The list of instances.
The list of endpoint scores. .
Gets the count of candidates in the set.
Gets the associated with the candidate
at .
The candidate index.
A reference to the . The result is returned by reference.
Gets a value which indicates where the is considered
a valid candiate for the current request.
The candidate index.
true if the candidate at position is considered value
for the current request, otherwise false.
Sets the validitity of the candidate at the provided index.
The candidate index.
The value to set. If true the candidate is considered valid for the current request.
The state associated with a candidate in a .
Gets the .
Gets the score of the within the current
.
Candidates within a set are ordered in priority order and then assigned a
sequential score value based on that ordering. Candiates with the same
score are considered to have equal priority.
The score values are used in the to determine
whether a set of matching candidates is an ambiguous match.
Gets associated with the
and the current request.
A base class for implementations that use
a specific type of metadata from for comparison.
Useful for implementing .
The type of metadata to compare. Typically this is a type of metadata related
to the application concern being handled.
Compares two objects and returns a value indicating whether one is less than, equal to,
or greater than the other.
The first object to compare.
The second object to compare.
An implementation of this method must return a value less than zero if
x is less than y, zero if x is equal to y, or a value greater than zero if x is
greater than y.
Gets the metadata of type from the provided endpoint.
The .
The instance or null.
Compares two instances.
The first object to compare.
The second object to compare.
An implementation of this method must return a value less than zero if
x is less than y, zero if x is equal to y, or a value greater than zero if x is
greater than y.
The base-class implementation of this method will compare metadata based on whether
or not they are null. The effect of this is that when endpoints are being
compared, the endpoint that defines an instance of
will be considered higher priority.
A service that is responsible for the final selection
decision. To use a custom register an implementation
of in the dependency injection container as a singleton.
Asynchronously selects an from the .
The associated with the current request.
The associated with the current request.
The .
A that completes asynchronously once endpoint selection is complete.
An should assign the
and properties once an endpoint is selected.
An that implements filtering and selection by
the HTTP method of a request.
For framework use only.
For framework use only.
For framework use only.
For framework use only.
For framework use only.
A interface that can be implemented to sort
endpoints. Implementations of must
inherit from and should be registered in
the dependency injection container as singleton services of type .
Candidates in a are sorted based on their priority. Defining
a adds an additional criterion to the sorting
operation used to order candidates.
As an example, the implementation of implements
to ensure that endpoints matching specific HTTP
methods are sorted with a higher priority than endpoints without a specific HTTP method
requirement.
Gets an that will be used to sort the endpoints.
A interface that can implemented to filter endpoints
in a . Implementations of must
inherit from and should be registered in
the dependency injection container as singleton services of type .
Returns a value that indicates whether the applies
to any endpoint in .
The set of candidate values.
true if the policy applies to any endpoint in , otherwise false.
Applies the policy to the .
The associated with the current request.
The associated with the current request.
The .
Implementations of should implement this method
and filter the set of candidates in the by setting
to false where desired.
To signal an error condition, set to an
value that will produce the desired error when executed.
An interface for components that can select an given the current request, as part
of the execution of .
Attempts to asynchronously select an for the current request.
The associated with the current request.
The associated with the current request. The
will be mutated to contain the result of the operation.
A which represents the asynchronous completion of the operation.
Defines a policy that applies behaviors to the URL matcher. Implementations
of and related interfaces must be registered
in the dependency injection container as singleton services of type
.
implementations can implement the following
interfaces , ,
and .
Gets a value that determines the order the should
be applied. Policies are applied in ascending numeric value of the
property.
Defines an abstraction for resolving inline parameter policies as instances of .
Creates a parameter policy.
The parameter the parameter policy is being created for.
The inline text to resolve.
The for the parameter.
Creates a parameter policy.
The parameter the parameter policy is being created for.
An existing parameter policy.
The for the parameter.
Creates a parameter policy.
The parameter the parameter policy is being created for.
The reference to resolve.
The for the parameter.
Represents a parsed route template with default values and constraints.
Use to create
instances. Instances of are immutable.
Gets the set of default values for the route pattern.
The keys of are the route parameter names.
Gets the set of parameter policy references for the route pattern.
The keys of are the route parameter names.
Gets the precedence value of the route pattern for URL matching.
Precedence is a computed value based on the structure of the route pattern
used for building URL matching data structures.
Gets the precedence value of the route pattern for URL generation.
Precedence is a computed value based on the structure of the route pattern
used for building URL generation data structures.
Gets the raw text supplied when parsing the route pattern. May be null.
Gets the list of route parameters.
Gets the list of path segments.
Gets the parameter matching the given name.
The name of the parameter to match.
The matching parameter or null if no parameter matches the given name.
An exception that is thrown for error constructing a .
Creates a new instance of .
The route pattern as raw text.
The exception message.
Gets the route pattern associated with this exception.
Populates a with the data needed to serialize the target object.
The to populate with data.
The destination () for this serialization.
Contains factory methods for creating and related types.
Use to parse a route pattern in
string format.
Creates a from its string representation.
The route pattern string to parse.
The .
Creates a from its string representation along
with provided default values and parameter policies.
The route pattern string to parse.
Additional default values to associated with the route pattern. May be null.
The provided object will be converted to key-value pairs using
and then merged into the parsed route pattern.
Additional parameter policies to associated with the route pattern. May be null.
The provided object will be converted to key-value pairs using
and then merged into the parsed route pattern.
The .
Creates a new instance of from a collection of segments.
The collection of segments.
The .
Creates a new instance of from a collection of segments.
The raw text to associate with the route pattern. May be null.
The collection of segments.
The .
Creates a from a collection of segments along
with provided default values and parameter policies.
Additional default values to associated with the route pattern. May be null.
The provided object will be converted to key-value pairs using
and then merged into the route pattern.
Additional parameter policies to associated with the route pattern. May be null.
The provided object will be converted to key-value pairs using
and then merged into the route pattern.
The collection of segments.
The .
Creates a from a collection of segments along
with provided default values and parameter policies.
The raw text to associate with the route pattern.
Additional default values to associated with the route pattern. May be null.
The provided object will be converted to key-value pairs using
and then merged into the route pattern.
Additional parameter policies to associated with the route pattern. May be null.
The provided object will be converted to key-value pairs using
and then merged into the route pattern.
The collection of segments.
The .
Creates a new instance of from a collection of segments.
The collection of segments.
The .
Creates a new instance of from a collection of segments.
The raw text to associate with the route pattern. May be null.
The collection of segments.
The .
Creates a from a collection of segments along
with provided default values and parameter policies.
Additional default values to associated with the route pattern. May be null.
The provided object will be converted to key-value pairs using
and then merged into the route pattern.
Additional parameter policies to associated with the route pattern. May be null.
The provided object will be converted to key-value pairs using
and then merged into the route pattern.
The collection of segments.
The .
Creates a from a collection of segments along
with provided default values and parameter policies.
The raw text to associate with the route pattern.
Additional default values to associated with the route pattern. May be null.
The provided object will be converted to key-value pairs using
and then merged into the route pattern.
Additional parameter policies to associated with the route pattern. May be null.
The provided object will be converted to key-value pairs using
and then merged into the route pattern.
The collection of segments.
The .
Creates a from the provided collection
of parts.
The collection of parts.
The .
Creates a from the provided collection
of parts.
The collection of parts.
The .
Creates a from the provided text
content.
The text content.
The .
Creates a from the provided text
content.
The text content.
The .
Creates a from the provided parameter name.
The parameter name.
The .
Creates a from the provided parameter name
and default value.
The parameter name.
The parameter default value. May be null.
The .
Creates a from the provided parameter name
and default value, and parameter kind.
The parameter name.
The parameter default value. May be null.
The parameter kind.
The .
Creates a from the provided parameter name
and default value, parameter kind, and parameter policies.
The parameter name.
The parameter default value. May be null.
The parameter kind.
The parameter policies to associated with the parameter.
The .
Creates a from the provided parameter name
and default value, parameter kind, and parameter policies.
The parameter name.
The parameter default value. May be null.
The parameter kind.
The parameter policies to associated with the parameter.
The .
Creates a from the provided contraint.
The constraint object, which must be of type
or . If the constraint object is a
then it will be tranformed into an instance of .
The .
Creates a from the provided constraint.
The constraint object.
The .
Creates a from the provided constraint.
The constraint text, which will be resolved by .
The .
Creates a from the provided object.
The parameter policy object.
The .
Creates a from the provided object.
The parameter policy text, which will be resolved by .
The .
Resprents a literal text part of a route pattern. Instances of
are immutable.
Gets the text content.
Defines the kinds of instances.
The of a standard parameter
without optional or catch all behavior.
The of an optional parameter.
The of a catch-all parameter.
Represents a parameter part in a route pattern. Instances of
are immutable.
Gets the list of parameter policies associated with this parameter.
Gets the value indicating if slashes in current parameter's value should be encoded.
Gets the default value of this route parameter. May be null.
Returns true if this part is a catch-all parameter.
Otherwise returns false.
Returns true if this part is an optional parameter.
Otherwise returns false.
Gets the of this parameter.
Gets the parameter name.
The parsed representation of a policy in a parameter. Instances
of are immutable.
Gets the constraint text.
Gets a pre-existing that was used to construct this reference.
Represents a part of a route pattern.
Gets the of this part.
Returns true if this part is literal text. Otherwise returns false.
Returns true if this part is a route parameter. Otherwise returns false.
Returns true if this part is an optional separator. Otherwise returns false.
Defines the kinds of instances.
The of a .
The of a .
The of a .
Represents a path segment in a route pattern. Instances of are
immutable.
Route patterns are made up of URL path segments, delimited by /. A
contains a group of
that represent the structure of a segment
in a route pattern.
Returns true if the segment contains a single part;
otherwise returns false.
Gets the list of parts in this segment.
Represents an optional separator part of a route pattern. Instances of
are immutable.
An optional separator is a literal text delimiter that appears between
two parameter parts in the last segment of a route pattern. The only separator
that is recognized is ..
In the route pattern /{controller}/{action}/{id?}.{extension?}
the . character is an optional separator.
An optional separator character does not need to present in the URL path
of a request for the route pattern to match.
Gets the text content of the part.
Value must be greater than or equal to {0}.
Value must be greater than or equal to {0}.
The value for argument '{0}' should be less than or equal to the value for the argument '{1}'.
The value for argument '{0}' should be less than or equal to the value for the argument '{1}'.
The '{0}' property of '{1}' must not be null.
The '{0}' property of '{1}' must not be null.
The supplied route name '{0}' is ambiguous and matched more than one route.
The supplied route name '{0}' is ambiguous and matched more than one route.
A default handler must be set on the {0}.
A default handler must be set on the {0}.
The constructor to use for activating the constraint type '{0}' is ambiguous. Multiple constructors were found with the following number of parameters: {1}.
The constructor to use for activating the constraint type '{0}' is ambiguous. Multiple constructors were found with the following number of parameters: {1}.
Could not find a constructor for constraint type '{0}' with the following number of parameters: {1}.
Could not find a constructor for constraint type '{0}' with the following number of parameters: {1}.
The constraint type '{0}' which is mapped to constraint key '{1}' must implement the '{2}' interface.
The constraint type '{0}' which is mapped to constraint key '{1}' must implement the '{2}' interface.
A path segment that contains more than one section, such as a literal section or a parameter, cannot contain a catch-all parameter.
A path segment that contains more than one section, such as a literal section or a parameter, cannot contain a catch-all parameter.
The route parameter '{0}' has both an inline default value and an explicit default value specified. A route parameter cannot contain an inline default value when a default value is specified explicitly. Consider removing one of them.
The route parameter '{0}' has both an inline default value and an explicit default value specified. A route parameter cannot contain an inline default value when a default value is specified explicitly. Consider removing one of them.
A path segment cannot contain two consecutive parameters. They must be separated by a '/' or by a literal string.
A path segment cannot contain two consecutive parameters. They must be separated by a '/' or by a literal string.
The route template separator character '/' cannot appear consecutively. It must be separated by either a parameter or a literal value.
The route template separator character '/' cannot appear consecutively. It must be separated by either a parameter or a literal value.
A catch-all parameter cannot be marked optional.
A catch-all parameter cannot be marked optional.
An optional parameter cannot have default value.
An optional parameter cannot have default value.
A catch-all parameter can only appear as the last segment of the route template.
A catch-all parameter can only appear as the last segment of the route template.
The literal section '{0}' is invalid. Literal sections cannot contain the '?' character.
The literal section '{0}' is invalid. Literal sections cannot contain the '?' character.
The route parameter name '{0}' is invalid. Route parameter names must be non-empty and cannot contain these characters: '{{', '}}', '/'. The '?' character marks a parameter as optional, and can occur only at the end of the parameter. The '*' character marks a parameter as catch-all, and can occur only at the start of the parameter.
The route parameter name '{0}' is invalid. Route parameter names must be non-empty and cannot contain these characters: '{{', '}}', '/'. The '?' character marks a parameter as optional, and can occur only at the end of the parameter. The '*' character marks a parameter as catch-all, and can occur only at the start of the parameter.
The route template cannot start with a '~' character unless followed by a '/'.
The route template cannot start with a '~' character unless followed by a '/'.
There is an incomplete parameter in the route template. Check that each '{' character has a matching '}' character.
There is an incomplete parameter in the route template. Check that each '{' character has a matching '}' character.
The route parameter name '{0}' appears more than one time in the route template.
The route parameter name '{0}' appears more than one time in the route template.
The constraint entry '{0}' - '{1}' on the route '{2}' must have a string value or be of a type which implements '{3}'.
The constraint entry '{0}' - '{1}' on the route '{2}' must have a string value or be of a type which implements '{3}'.
The constraint entry '{0}' - '{1}' on the route '{2}' could not be resolved by the constraint resolver of type '{3}'.
The constraint entry '{0}' - '{1}' on the route '{2}' could not be resolved by the constraint resolver of type '{3}'.
In a route parameter, '{' and '}' must be escaped with '{{' and '}}'.
In a route parameter, '{' and '}' must be escaped with '{{' and '}}'.
In the segment '{0}', the optional parameter '{1}' is preceded by an invalid segment '{2}'. Only a period (.) can precede an optional parameter.
In the segment '{0}', the optional parameter '{1}' is preceded by an invalid segment '{2}'. Only a period (.) can precede an optional parameter.
An optional parameter must be at the end of the segment. In the segment '{0}', optional parameter '{1}' is followed by '{2}'.
An optional parameter must be at the end of the segment. In the segment '{0}', optional parameter '{1}' is followed by '{2}'.
Two or more routes named '{0}' have different templates.
Two or more routes named '{0}' have different templates.
Unable to find the required services. Please add all the required services by calling '{0}.{1}' inside the call to '{2}' in the application startup code.
Unable to find the required services. Please add all the required services by calling '{0}.{1}' inside the call to '{2}' in the application startup code.
An error occurred while creating the route with name '{0}' and template '{1}'.
An error occurred while creating the route with name '{0}' and template '{1}'.
The request matched multiple endpoints. Matches: {0}{0}{1}
The request matched multiple endpoints. Matches: {0}{0}{1}
Value cannot be null or empty.
Value cannot be null or empty.
The collection cannot be empty.
The collection cannot be empty.
The constraint entry '{0}' - '{1}' must have a string value or be of a type which implements '{2}'.
The constraint entry '{0}' - '{1}' must have a string value or be of a type which implements '{2}'.
Invalid constraint '{0}'. A constraint must be of type 'string' or '{1}'.
Invalid constraint '{0}'. A constraint must be of type 'string' or '{1}'.
Invalid constraint '{0}' for parameter '{1}'. A constraint must be of type 'string', '{2}', or '{3}'.
Invalid constraint '{0}' for parameter '{1}'. A constraint must be of type 'string', '{2}', or '{3}'.
The constraint reference '{0}' could not be resolved to a type. Register the constraint type with '{1}.{2}'.
The constraint reference '{0}' could not be resolved to a type. Register the constraint type with '{1}.{2}'.
Invalid constraint type '{0}' registered as '{1}'. A constraint type must either implement '{2}', or inherit from '{3}'.
Invalid constraint type '{0}' registered as '{1}'. A constraint type must either implement '{2}', or inherit from '{3}'.
Endpoints with endpoint name '{0}':
Endpoints with endpoint name '{0}':
The following endpoints with a duplicate endpoint name were found.
The following endpoints with a duplicate endpoint name were found.
Adds a route to the for the given , and
.
The .
The route template.
The route handler.
A reference to the after this operation has completed.
Adds a route to the for the given , and
.
The .
The route template.
The action to apply to the .
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP DELETE requests for the given
, and .
The .
The route template.
The route handler.
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP DELETE requests for the given
, and .
The .
The route template.
The action to apply to the .
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP DELETE requests for the given
, and .
The .
The route template.
The route handler.
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP GET requests for the given
, and .
The .
The route template.
The route handler.
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP GET requests for the given
, and .
The .
The route template.
The action to apply to the .
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP GET requests for the given
, and .
The .
The route template.
The route handler.
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP POST requests for the given
, and .
The .
The route template.
The route handler.
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP POST requests for the given
, and .
The .
The route template.
The action to apply to the .
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP POST requests for the given
, and .
The .
The route template.
The route handler.
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP PUT requests for the given
, and .
The .
The route template.
The route handler.
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP PUT requests for the given
, and .
The .
The route template.
The action to apply to the .
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP PUT requests for the given
, and .
The .
The route template.
The route handler.
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP requests for the given
, , and .
The .
The HTTP verb allowed by the route.
The route template.
The route handler.
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP requests for the given
, , and .
The .
The HTTP verb allowed by the route.
The route template.
The route handler.
A reference to the after this operation has completed.
Adds a route to the that only matches HTTP requests for the given
, , and .
The .
The HTTP verb allowed by the route.
The route template.
The action to apply to the .
A reference to the after this operation has completed.
A builder for produding a mapping of keys to see .
allows iterative building a set of route constraints, and will
merge multiple entries for the same key.
Creates a new instance of instance.
The .
The display name (for use in error messages).
Builds a mapping of constraints.
An of the constraints.
Adds a constraint instance for the given key.
The key.
The constraint instance. Must either be a string or an instance of .
If the is a string, it will be converted to a .
For example, the string Product[0-9]+ will be converted to the regular expression
^(Product[0-9]+). See for more details.
Adds a constraint for the given key, resolved by the .
The key.
The text to be resolved by .
The can create instances
based on . See to register
custom constraint types.
Sets the given key as optional.
The key.
The exception that is thrown for invalid routes or constraints.
Initializes a new instance of the class with a specified error message.
The message that describes the error.
Initializes a new instance of the class with a specified error message
and a reference to the inner exception that is the cause of this exception.
The error message that explains the reason for the exception.
The exception that is the cause of the current exception.
Represents an that can be used in URL matching or URL generation.
Initializes a new instance of the class.
The delegate used to process requests for the endpoint.
The to use in URL matching.
The order assigned to the endpoint.
The or metadata associated with the endpoint.
The informational display name of the endpoint.
Gets the order value of endpoint.
The order value provides absolute control over the priority
of an endpoint. Endpoints with a lower numeric value of order have higher priority.
Gets the associated with the endpoint.
Gets or sets a value indicating whether all generated paths URLs are lower-case.
Use to configure the behavior for query strings.
Gets or sets a value indicating whether a generated query strings are lower-case.
This property will not be used unless is also true.
Gets or sets a value indicating whether a trailing slash should be appended to the generated URLs.
An implementation that compares objects as-if
they were route value strings.
Values that are are not strings are converted to strings using
Convert.ToString(x, CultureInfo.InvariantCulture). null values are converted
to the empty string.
strings are compared using .
An address of route name and values.
Gets or sets the route name.
Gets or sets the route values that are explicitly specified.
Gets or sets ambient route values from the current HTTP request.
Metadata used during link generation to find the associated endpoint using route values.
Creates a new instance of with the provided route name.
The route name. Can be null.
Creates a new instance of with the provided required route values.
The required route values.
Creates a new instance of with the provided route name and required route values.
The route name. Can be null.
The required route values.
Gets the route name. Can be null.
Gets the required route values.
Decision tree is built using the 'required values' of actions.
- When generating a url using route values, decision tree checks the explicitly supplied route values +
ambient values to see if they have a match for the required-values-based-tree.
- When generating a url using route name, route values for controller, action etc.might not be provided
(this is expected because as a user I want to avoid writing all those and instead chose to use a
routename which is quick). So since these values are not provided and might not be even in ambient
values, decision tree would fail to find a match. So for this reason decision tree is not used for named
matches. Instead all named matches are returned as is and the LinkGenerator uses a TemplateBinder to
decide which of the matches can generate a url.
For example, for a route defined like below with current ambient values like new { controller = "Home",
action = "Index" }
"api/orders/{id}",
routeName: "OrdersApi",
defaults: new { controller = "Orders", action = "GetById" },
requiredValues: new { controller = "Orders", action = "GetById" },
A call to GetLink("OrdersApi", new { id = "10" }) cannot generate url as neither the supplied values or
current ambient values do not satisfy the decision tree that is built based on the required values.
Represents metadata used during link generation. If is true
the associated endpoint will not be used for link generation.
Gets a value indicating whether the assocated endpoint should be used for link generation.
Metadata used to prevent URL matching. If is true the
associated endpoint will not be considered for URL matching.
Gets a value indicating whether the assocated endpoint should be used for URL matching.
The parsed representation of an inline constraint in a route parameter.
Creates a new instance of .
The constraint text.
Gets the constraint text.
Computes precedence for a route template.
Gets the parameter matching the given name.
The name of the parameter to match.
The matching parameter or null if no parameter matches the given name.
Converts the to the equivalent
A .
Creates a new instance of .
The .
The .
The to bind values to.
The default values for .
Creates a new instance of .
The .
The .
The to bind values to.
The default values for . Optional.
Keys used to determine if the ambient values apply. Optional.
A list of (, ) pairs to evalute when producing a URI.
Compares two objects for equality as parts of a case-insensitive path.
An object to compare.
An object to compare.
True if the object are equal, otherwise false.
The values used as inputs for constraints and link generation.
The set of values that will appear in the URL.
The set of values that that were supplied for URL generation.
This combines implicit (ambient) values from the of the current request
(if applicable), explictly provided values, and default values for parameters that appear in
the route template.
Implicit (ambient) values which are invalidated due to changes in values lexically earlier in the
route template are excluded from this set.
A candidate route to match incoming URLs in a .
Gets or sets the .
Gets or sets the .
Used to build an . Represents a URL template tha will be used to match incoming
request URLs.
Gets or sets the route constraints.
Gets or sets the route defaults.
Gets or sets the to invoke when this entry matches.
Gets or sets the order of the entry.
Entries are ordered first by (ascending) then by (descending).
Gets or sets the precedence of the entry.
Entries are ordered first by (ascending) then by (descending).
Gets or sets the name of the route.
Gets or sets the .
A candidate match for link generation in a .
Gets or sets the .
Gets or sets the .
Used to build a . Represents a URL template that will be used to generate
outgoing URLs.
Gets or sets the route constraints.
Gets or sets the route defaults.
The to invoke when this entry matches.
Gets or sets the order of the entry.
Entries are ordered first by (ascending) then by (descending).
Gets or sets the precedence of the template for link generation. A greater value of
means that an entry is considered first.
Entries are ordered first by (ascending) then by (descending).
Gets or sets the name of the route.
Gets or sets the set of values that must be present for link genration.
Gets or sets the .
Gets or sets the data that is associated with this entry.
Builder for instances.
This constructor is obsolete and will be removed in a future version. The recommended
alternative is the overload that does not take a UrlEncoder.
Initializes a new instance of .
The .
The .
The .
The .
Initializes a new instance of .
The .
The .
The .
Adds a new inbound route to the .
The for handling the route.
The of the route.
The route name.
The route order.
The .
Adds a new outbound route to the .
The for handling the link generation.
The of the route.
The containing the route values.
The route name.
The route order.
The .
Gets the list of .
Gets the list of .
Builds a with the
and defined in this .
The .
Builds a with the
and defined in this .
The version of the .
The .
Removes all and from this
.
An implementation for attribute routing.
Creates a new instance of .
The list of that contains the route entries.
The set of .
The .
The .
The instance.
The instance used
in .
The version of this route.
Gets the version of this route.
A node in a .
Initializes a new instance of .
The length of the path to this node in the .
Gets the length of the path to this node in the .
Gets or sets a value indicating whether this node represents a catch all segment.
Gets the list of matching route entries associated with this node.
These entries are sorted by precedence then template.
Gets the literal segments following this segment.
Gets or sets the representing
parameter segments with constraints following this segment in the .
Gets or sets the representing
parameter segments following this segment in the .
Gets or sets the representing
catch all parameter segments with constraints following this segment in the .
Gets or sets the representing
catch all parameter segments following this segment in the .
A tree part of a .
Initializes a new instance of .
The order associated with routes in this .
Gets the order of the routes associated with this .
Gets the root of the .