Class RouterConfig

Configures runtime routing behavior for router instances.

Inheritance
object
RouterConfig
HttpListenerRouterConfig
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: NanoRoute
Assembly: NanoRoute.dll
Syntax
public class RouterConfig
Examples
HttpMessageRouter router = builder.CreateRouter(config =>
{
    config.MatchingPrecedence = MatchingPrecedence.ParameterizedFirst;
});

Constructors

RouterConfig()

Declaration
public RouterConfig()

Properties

MatchingPrecedence

Gets or sets how NanoRoute prioritizes literal and parameterized child segments at the same depth.

Declaration
public MatchingPrecedence MatchingPrecedence { get; set; }
Property Value
Type Description
MatchingPrecedence
Examples
HttpMessageRouter router = builder.CreateRouter(config =>
{
    config.MatchingPrecedence = MatchingPrecedence.ParameterizedFirst;
});
Exceptions
Type Condition
ArgumentOutOfRangeException

Thrown when the assigned value is not a defined MatchingPrecedence value.

In this article
Back to top Generated by DocFX