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
Uh oh!
There was an error while loading. Please reload this page.
-
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.ParseandTemplateMatcher.TryMatch. However, I can't find a way to build the parameter constraints directly.RoutePatternFactory.Parseproduces danglingRoutePatternParameterPolicyReferenceand I can't find a way to easily useIInlineConstraintResolverwith it.Is there any suggestion for this?
Beta Was this translation helpful? Give feedback.
All reactions