You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 27, 2018. It is now read-only.
Does TemplateMatcher ignore the InlineConstraints specified in a TemplatePart by design?
var segment = new TemplateSegment();
segment.Parts.Add(TemplatePart.CreateLiteral("page"));
var segment2 = new TemplateSegment();
segment2.Parts.Add(TemplatePart.CreateParameter("id",
isCatchAll: false,
isOptional: false,
defaultValue: null,
inlineConstraints: new InlineConstraint[] { new InlineConstraint("int") }));
var segments = new TemplateSegment[] {
segment,
segment2
};
var template = new RouteTemplate("page", segments.ToList());
var templateMatcher = new TemplateMatcher(template, new RouteValueDictionary());
The templateMatcher at above code will return true for both /page/10 and /page/BBB.