TreeRouter Class

An Microsoft.AspNetCore.Routing.IRouter implementation for attribute routing.

Namespace
Microsoft.AspNetCore.Routing.Tree
Assemblies
  • Microsoft.AspNetCore.Routing

Syntax

public class TreeRouter : IRouter
class Microsoft.AspNetCore.Routing.Tree.TreeRouter

Constructors

TreeRouter(Microsoft.AspNetCore.Routing.Tree.UrlMatchingTree[], System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Routing.Tree.OutboundRouteEntry>, System.Text.Encodings.Web.UrlEncoder, Microsoft.Extensions.ObjectPool.ObjectPool<Microsoft.AspNetCore.Routing.Internal.UriBuildingContext>, Microsoft.Extensions.Logging.ILogger, Microsoft.Extensions.Logging.ILogger, System.Int32)

Creates a new Microsoft.AspNetCore.Routing.Tree.TreeRouter.

Arguments:
public TreeRouter(UrlMatchingTree[] trees, IEnumerable<OutboundRouteEntry> linkGenerationEntries, UrlEncoder urlEncoder, ObjectPool<UriBuildingContext> objectPool, ILogger routeLogger, ILogger constraintLogger, int version)

Methods

GetVirtualPath(Microsoft.AspNetCore.Routing.VirtualPathContext)
Return type:Microsoft.AspNetCore.Routing.VirtualPathData
public VirtualPathData GetVirtualPath(VirtualPathContext context)
RouteAsync(Microsoft.AspNetCore.Routing.RouteContext)
Return type:System.Threading.Tasks.Task
public Task RouteAsync(RouteContext context)

Fields

RouteGroupKey()
Return type:System.String
public static readonly string RouteGroupKey

Properties

Microsoft.AspNetCore.Routing.Tree.TreeRouter.Version

Gets the version of this route.

Return type:System.Int32
public int Version { get; }