Reuse routing components out of ASP.NET application #58206
Unanswered
huoyaoyuan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In a collection application, I need to parse urls and make decisions around their patterns. Instead of using Regex, the ASP.NET routing also looks attractive. Basically I need to reuse the parser and matching logic, without being bounded to http handling and the response pipeline.
I'm quite close to what I want with
RoutePatternFactory.Parse
andTemplateMatcher.TryMatch
. However, I can't find a way to build the parameter constraints directly.RoutePatternFactory.Parse
produces danglingRoutePatternParameterPolicyReference
and I can't find a way to easily useIInlineConstraintResolver
with it.Is there any suggestion for this?
Beta Was this translation helpful? Give feedback.
All reactions