TreeRouteBuilder Class¶
Builder for Microsoft.AspNetCore.Routing.Tree.TreeRouter instances.
- Namespace
Microsoft.AspNetCore.Routing.Tree- Assemblies
- Microsoft.AspNetCore.Routing
Constructors¶
-
TreeRouteBuilder(Microsoft.Extensions.Logging.ILoggerFactory, System.Text.Encodings.Web.UrlEncoder, Microsoft.Extensions.ObjectPool.ObjectPool<Microsoft.AspNetCore.Routing.Internal.UriBuildingContext>, Microsoft.AspNetCore.Routing.IInlineConstraintResolver)¶ Initializes a new instance of
Microsoft.AspNetCore.Routing.Tree.TreeRouteBuilder.Arguments: - loggerFactory (Microsoft.Extensions.Logging.ILoggerFactory) – The
Microsoft.Extensions.Logging.ILoggerFactory. - 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. - constraintResolver (Microsoft.AspNetCore.Routing.IInlineConstraintResolver) – The
Microsoft.AspNetCore.Routing.IInlineConstraintResolver.
public TreeRouteBuilder(ILoggerFactory loggerFactory, UrlEncoder urlEncoder, ObjectPool<UriBuildingContext> objectPool, IInlineConstraintResolver constraintResolver)
- loggerFactory (Microsoft.Extensions.Logging.ILoggerFactory) – The
-
Methods¶
-
Build()¶ Builds a
Microsoft.AspNetCore.Routing.Tree.TreeRouterwith theMicrosoft.AspNetCore.Routing.Tree.TreeRouteBuilder.InboundEntriesandMicrosoft.AspNetCore.Routing.Tree.TreeRouteBuilder.OutboundEntriesdefined in thisMicrosoft.AspNetCore.Routing.Tree.TreeRouteBuilder.Return type: Microsoft.AspNetCore.Routing.Tree.TreeRouter Returns: The Microsoft.AspNetCore.Routing.Tree.TreeRouter.public TreeRouter Build()
-
Build(System.Int32) Builds a
Microsoft.AspNetCore.Routing.Tree.TreeRouterwith theMicrosoft.AspNetCore.Routing.Tree.TreeRouteBuilder.InboundEntriesandMicrosoft.AspNetCore.Routing.Tree.TreeRouteBuilder.OutboundEntriesdefined in thisMicrosoft.AspNetCore.Routing.Tree.TreeRouteBuilder.Arguments: version (System.Int32) – The version of the Microsoft.AspNetCore.Routing.Tree.TreeRouter.Return type: Microsoft.AspNetCore.Routing.Tree.TreeRouter Returns: The Microsoft.AspNetCore.Routing.Tree.TreeRouter.public TreeRouter Build(int version)
-
Clear()¶ Removes all
Microsoft.AspNetCore.Routing.Tree.TreeRouteBuilder.InboundEntriesandMicrosoft.AspNetCore.Routing.Tree.TreeRouteBuilder.OutboundEntriesfrom thisMicrosoft.AspNetCore.Routing.Tree.TreeRouteBuilder.public void Clear()
-
MapInbound(Microsoft.AspNetCore.Routing.IRouter, Microsoft.AspNetCore.Routing.Template.RouteTemplate, System.String, System.Int32)¶ Adds a new inbound route to the
Microsoft.AspNetCore.Routing.Tree.TreeRouter.Arguments: - handler (Microsoft.AspNetCore.Routing.IRouter) – The
Microsoft.AspNetCore.Routing.IRouterfor handling the route. - routeTemplate (Microsoft.AspNetCore.Routing.Template.RouteTemplate) – The
Microsoft.AspNetCore.Routing.Template.RouteTemplateof the route. - routeName (System.String) – The route name.
- order (System.Int32) – The route order.
Return type: Returns: public InboundRouteEntry MapInbound(IRouter handler, RouteTemplate routeTemplate, string routeName, int order)
- handler (Microsoft.AspNetCore.Routing.IRouter) – The
-
MapOutbound(Microsoft.AspNetCore.Routing.IRouter, Microsoft.AspNetCore.Routing.Template.RouteTemplate, Microsoft.AspNetCore.Routing.RouteValueDictionary, System.String, System.Int32)¶ Adds a new outbound route to the
Microsoft.AspNetCore.Routing.Tree.TreeRouter.Arguments: - handler (Microsoft.AspNetCore.Routing.IRouter) – The
Microsoft.AspNetCore.Routing.IRouterfor handling the link generation. - routeTemplate (Microsoft.AspNetCore.Routing.Template.RouteTemplate) – The
Microsoft.AspNetCore.Routing.Template.RouteTemplateof the route. - requiredLinkValues (Microsoft.AspNetCore.Routing.RouteValueDictionary) – The
Microsoft.AspNetCore.Routing.RouteValueDictionarycontaining the route values. - routeName (System.String) – The route name.
- order (System.Int32) – The route order.
Return type: Returns: public OutboundRouteEntry MapOutbound(IRouter handler, RouteTemplate routeTemplate, RouteValueDictionary requiredLinkValues, string routeName, int order)
- handler (Microsoft.AspNetCore.Routing.IRouter) – The
-
Properties¶
-
Microsoft.AspNetCore.Routing.Tree.TreeRouteBuilder.InboundEntries¶ Gets the list of
Microsoft.AspNetCore.Routing.Tree.InboundRouteEntry.Return type: System.Collections.Generic.IList<Microsoft.AspNetCore.Routing.Tree.InboundRouteEntry> public IList<InboundRouteEntry> InboundEntries { get; }
-
Microsoft.AspNetCore.Routing.Tree.TreeRouteBuilder.OutboundEntries¶ Gets the list of
Microsoft.AspNetCore.Routing.Tree.OutboundRouteEntry.Return type: System.Collections.Generic.IList<Microsoft.AspNetCore.Routing.Tree.OutboundRouteEntry> public IList<OutboundRouteEntry> OutboundEntries { get; }
-