Table of Contents

Class RouteTree

Namespace
Velvet
Assembly
Velvet.Docs.dll

Matching engine over the route definition tree. Flattens the tree into ranked branches: every leaf route is paired with its full ancestor chain, each branch is scored for specificity, and Match(string) returns the highest-scoring branch whose pattern matches the path. Matching is therefore best-match, not declaration-order. Supports literal, dynamic (:param), optional (:param? / segment?), and splat (*) segments.

public sealed class RouteTree
Inheritance
object
RouteTree

Constructors

RouteTree(RouteDefinition[])

Builds the route definition tree and pre-computes ranked branches.

Methods

Match(string)

Searches for the best-matching route branch for the given path.