Commit Graph

16 Commits

Author SHA1 Message Date
Ryan Nowak 49c2317c14 Fix #810 2018-09-24 21:55:56 -07:00
James Newton-King 412944e1f5
Transform parameters before lower casing in link generation (#793) 2018-09-14 17:19:43 +12:00
James Newton-King cee960f3c5
Add IParameterTransformer (#750) 2018-09-12 21:45:25 +12:00
Kiran Challa 731767837a Introducing new **catchAll parameter to allow generating links with unencoded values 2018-08-16 15:52:09 -07:00
Ryan Nowak 54e5370e8f Add CORS support to HttpMethodMatcherPolicy
Also removes HttpMethodEndpointConstraint, since it's been fully
replaced.
2018-07-26 23:01:11 -07:00
Ryan Nowak 147c9527f3
Implement EndpointSelector and MatcherPolicy (#646)
Implement EndpointSelector and MatcherPolicy

This change makes the EndpointSelector API more concrete, and is the
beggining of removing EndpointConstraint by making it obsolete.

To that end, I'm introducing MatcherPolicy, which is a
feature-collection API for registering policies that interact with the
DfaMatcher. The two policies that we'll need to start are:
- ability to order endpoints
- ability to append 'policy' nodes to the graph

These two concepts together replace EndpointConstraint. Extending our
graph representation is a really efficient way to processing most common
scenarios.

---

In general this helps with common cases where 4 or so endpoints match
the URL, but with different HTTP methods supported on each. Today we
have to process route values and call into some 'policy' to make a
decision about which one is the winner. This change pushes this
knowledge down into the graph so that it's roughly as cheap as a
dictionary lookup, and can be done allocation-free.

The big savings here is ability to remove more candidates *before*
collecting route data.

---

Along with this change, I also built 'rejection' into the DFA node
model, you can see an example with the HTTP Method handling that I
implemented. I implemented a policy that can treat failure to resolve an
HTTP method as a 405 response by returning a failure endpoint. This is
at the heart of much of the feedback we've gotten in this area around
versioning and http method handling. We also have a version of this
feature in MVC for [Consumes].
2018-07-24 17:31:51 -07:00
Kiran Challa 71cb933a08 Show a flattened tree in LinkGenerationDecisionTree's DebuggerDisplayString
[Fixes #636] Flatten the LinkGenerationDecisionTree to show as debugger display string
2018-07-24 17:11:53 -07:00
Kiran Challa 1009705283 Added a RouteValuesBasedEndpointFinder 2018-06-28 10:53:10 -07:00
Kiran Challa d3ddc1709a Added initial support for link generation when using Dispatcher 2018-06-14 15:31:30 -07:00
James Newton-King 84bc8351c9
Initial endpoint constraints functionality (#548) 2018-06-12 09:43:17 +12:00
Jass Bagga 93d20ec78c
Revert Dispatcher changes (#508)
Addresses aspnet/Home#2741
2018-01-10 12:53:17 -08:00
Jass Bagga fdc5f21428 Port PathTokenizer (#478) 2017-10-20 13:24:00 -07:00
Ryan Nowak e8ce0e7523 TreeRouter cleanup 2016-04-20 18:12:10 -07:00
Doug Bunting 67f424360c React to HttpAbstractions namespace changes
- aspnet/HttpAbstractions#549 and aspnet/HttpAbstractions#592
- clean up `using`s
2016-03-30 16:10:41 -07:00
N. Taylor Mullen 70d674410e Rename AspNet 5 file contents.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:24:38 -08:00
N. Taylor Mullen ace4553d77 Rename AspNet 5 folders and files.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:24:31 -08:00