예제 #1
0
 internal PathSegment(StringLiteral literal, int start, int end)
 {
     this.Span      = new Span(literal, start, end);
     this.Parameter = TemplateParameter.TryParse(this.Span, out var parameter)
         ? parameter
         : (TemplateParameter?)null;
 }
예제 #2
0
 public Component(LiteralExpressionSyntax literal, int start, int end)
 {
     this.Text      = new TextAndLocation(literal, start, end);
     this.Parameter = TemplateParameter.TryParse(this.Text, out var parameter)
         ? parameter
         : (TemplateParameter?)null;
 }