TreeRouter Class¶
An Microsoft.AspNetCore.Routing.IRouter implementation for attribute routing.
- Namespace
Microsoft.AspNetCore.Routing.Tree- Assemblies
- Microsoft.AspNetCore.Routing
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: - trees (Microsoft.AspNetCore.Routing.Tree.UrlMatchingTree<Microsoft.AspNetCore.Routing.Tree.UrlMatchingTree>[]) – The list of
Microsoft.AspNetCore.Routing.Tree.UrlMatchingTreethat contains the route entries. - linkGenerationEntries (System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Routing.Tree.OutboundRouteEntry>) – The set of
Microsoft.AspNetCore.Routing.Tree.OutboundRouteEntry. - urlEncoder (System.Text.Encodings.Web.UrlEncoder) – The
System.Text.Encodings.Web.UrlEncoder. - objectPool (Microsoft.Extensions.ObjectPool.ObjectPool<Microsoft.AspNetCore.Routing.Internal.UriBuildingContext>) – The
Microsoft.Extensions.ObjectPool.ObjectPool`1. - routeLogger (Microsoft.Extensions.Logging.ILogger) – The
Microsoft.Extensions.Logging.ILoggerinstance. - constraintLogger (Microsoft.Extensions.Logging.ILogger) – The
Microsoft.Extensions.Logging.ILoggerinstance used inMicrosoft.AspNetCore.Routing.RouteConstraintMatcher. - version (System.Int32) – The version of this route.
public TreeRouter(UrlMatchingTree[] trees, IEnumerable<OutboundRouteEntry> linkGenerationEntries, UrlEncoder urlEncoder, ObjectPool<UriBuildingContext> objectPool, ILogger routeLogger, ILogger constraintLogger, int version)
- trees (Microsoft.AspNetCore.Routing.Tree.UrlMatchingTree<Microsoft.AspNetCore.Routing.Tree.UrlMatchingTree>[]) – The list of
-
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)
-
Properties¶
-
Microsoft.AspNetCore.Routing.Tree.TreeRouter.Version¶ Gets the version of this route.
Return type: System.Int32 public int Version { get; }
-