-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Share route pattern parsing logic between analyzers and generators #46342
Comments
Thanks for contacting us. We're moving this issue to the |
Continuing the conversation from https://github.com/dotnet/aspnetcore/pull/46838/files#r1119362420 Compile-time pattern parsing won't work a lot of the time like when the I think our best option is going to be to continue validating the route values during the call to We shouldn't be checking |
Actually, I think this should be doable if we move the check from here to here. This is what uController does anyways (ref) and we've talked about doing it that way before but this detail was missed in the original implementation. I can take a look at fixing this. |
Both the route handler analyzers and the RequestDelegateGenerator share a requirement for being able to parse a route pattern string and extract information about the route parameters in it, constraints on those parameters, etc.
We should identify a way to share this code across the analyzers and generators.
As part of consuming this logic in the RequestDelegateGenerator we want to emit logic that will determine if a parameter appears in the route and sourcing it from the route values dictionary.
cc: @halter73 as this relates to the parameter binding work
cc: @JamesNK who has knowledge in this area
The text was updated successfully, but these errors were encountered: