Class
PrefixRoute
Represents an Route which matches the request paths equal to its path or nested under it, comparing whole path segments.
public sealed class PrefixRoute : RouteInheritance #
object ← Route ← PrefixRoute
Inherited Members #
Route.AnyPath, Route.Match(string, Router), Route.ToString(), Route.Get(string, Delegate?), Route.Get(string, RouteAction), Route.Post(string, Delegate?), Route.Post(string, RouteAction), Route.Put(string, Delegate?), Route.Put(string, RouteAction), Route.Patch(string, Delegate?), Route.Patch(string, RouteAction), Route.Head(string, Delegate?), Route.Head(string, RouteAction), Route.Any(string, Delegate?), Route.Any(string, RouteAction), Route.Delete(string, Delegate?), Route.Delete(string, RouteAction), Route.Options(string, Delegate?), Route.Options(string, RouteAction), Route.Query(string, Delegate?), Route.Query(string, RouteAction), Route.Bag, Route.IsAsync, Route.LogMode, Route.UseRegex, Route.UseCors, Route.Method, Route.Path, Route.Name, Route.AllowRewrites, Route.IsStatic, Route.Action, Route.RequestHandlers, Route.BypassGlobalRequestHandlers, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors #
| Name | Description |
|---|---|
| PrefixRoute(RouteMethod, string, string?, RouteAction, IRequestHandler[]?) | Initializes a new instance of the PrefixRoute class. |
Properties #
| Name | Description |
|---|---|
| AllowRewrites | Gets whether the router can redirect requests to this route into their trailing-slash path when ForceTrailingSlash is enabled. |
| IsStatic | Gets whether this route strictly matches its Path as an route template. |
Methods #
| Name | Description |
|---|---|
| Match(string, Router) | Tests if the specified request path matches this route path. The HTTP method is validated by the Router after the path matches. |