RouteTemplate Class

Namespace
Microsoft.AspNetCore.Routing.Template
Assemblies
  • Microsoft.AspNetCore.Routing

Syntax

[DebuggerDisplay("{DebuggerToString()}")]
public class RouteTemplate
class Microsoft.AspNetCore.Routing.Template.RouteTemplate

Constructors

RouteTemplate(System.String, System.Collections.Generic.List<Microsoft.AspNetCore.Routing.Template.TemplateSegment>)
public RouteTemplate(string template, List<TemplateSegment> segments)

Methods

GetParameter(System.String)

Gets the parameter matching the given name.

Arguments:name (System.String) – The name of the parameter to match.
Return type:Microsoft.AspNetCore.Routing.Template.TemplatePart
Returns:The matching parameter or <code>null</code> if no parameter matches the given name.
public TemplatePart GetParameter(string name)
GetSegment(System.Int32)
Return type:Microsoft.AspNetCore.Routing.Template.TemplateSegment
public TemplateSegment GetSegment(int index)

Properties

Microsoft.AspNetCore.Routing.Template.RouteTemplate.Parameters
Return type:System.Collections.Generic.IList<Microsoft.AspNetCore.Routing.Template.TemplatePart>
public IList<TemplatePart> Parameters { get; }
Microsoft.AspNetCore.Routing.Template.RouteTemplate.Segments
Return type:System.Collections.Generic.IList<Microsoft.AspNetCore.Routing.Template.TemplateSegment>
public IList<TemplateSegment> Segments { get; }
Microsoft.AspNetCore.Routing.Template.RouteTemplate.TemplateText
Return type:System.String
public string TemplateText { get; }