-
Notifications
You must be signed in to change notification settings - Fork 122
Conversation
JamesNK
commented
Nov 17, 2018
•
edited
Loading
edited
- Matching
- Link generation
- Fix MvcEndpointDataSource tests
src/Microsoft.AspNetCore.Routing/Patterns/DefaultRoutePatternTransformer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Routing/CompositeEndpointDataSource.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.Routing/Internal/RequiredValueHelpers.cs
Outdated
Show resolved
Hide resolved
Matching is passing! |
} | ||
} | ||
|
||
AddLiteralNode(includeLabel, nextParents, parent, requiredValue.ToString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a case like Foo/{action=Index}
where rv: { action = "Index" }
how does Foo
match? Is that handled by the handling for default values? This is worth a comment at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that handled by the handling for default values?
Yes, HasAdditionalRequiredSegments will add the endpoint as a match for the current node. I don't think this needs a comment to call that out here. There is no difference between how that logic interacts with required values and anything else.
I'll add a comment about the what is happening to the required value before it is used as a literal.
test/Microsoft.AspNetCore.Routing.Tests/Matching/DfaMatcherBuilderTest.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As promised, I gave this another look. It really seems like its on the right track
🆙 📅 |
We're merging Routing today into aspnet/AspNetCore. If you can merge this in the next 30 minutes or so, we can bring this along. Otherwise, you'll have to open a new PR against https://github.com/aspnet/AspNetCore. |
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line. According to people like you this is very important
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this is important 🙏
test/Microsoft.AspNetCore.Routing.Tests/Template/TemplateBinderTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! 👍
FYI @ryanbrandenburg this will likely be the last change to master before I make this repo readonly. |
This requires a reaction in MVC tho |
Will be rebased. Close this 💀 |
Just chatted with James. Yes, this will need to be rebased onto aspnet/AspNetCore. I'm going to close this PR, but I'll make sure to leave this branch around so you can copy the code over. |