Commit Graph

12 Commits

Author SHA1 Message Date
jacalvar 74a3063c45 [Fixes #357] Fix behavior when optional parameters are defined within a route and not at the end 2016-10-03 19:31:17 -07:00
jacalvar 438ec83227 [Fixes #359] Routing is matching empty segments to parameters and defaults are wrong 2016-10-03 15:34:04 -07:00
Pavel Krymets 032bcf43b2 Use TaskCache class from Microsoft.Extensions.TaskCache.Sources (#361)
Instead of Task.FromResult(0)
2016-09-08 09:25:44 -07:00
jacalvar 90dc4bc207 [Fixes #324] Default parameters are not taken into account on attribute routing 2016-07-01 16:06:03 -07:00
jacalvar dd79d0b88c [Fixes #316] TreeRouter does not match a route with the correct length 2016-06-03 12:55:20 -07:00
Ryan Nowak e8ce0e7523 TreeRouter cleanup 2016-04-20 18:12:10 -07:00
Ryan Nowak 9cd3fe34a5 Improve tests for catch-all + defaults/nulls 2016-04-11 15:17:07 -07:00
Ryan Nowak a51c78da06 Remove dictionary alloc in routing
This changes TemplateMatcher to mutate RouteData.Values directly instead
of creating a new dictionary and then merging in values. This is one the
biggest single costs in routing in terms of both allocations and execution
time.

So Match now becomes TryMatch. This will dirty the state of the RVD, so
the caller needs to snapshot it before calling into it (handled
inside the TreeRouter or RouteCollection).

Some subtle changes were needed to how/when values are added to be
compatible with the existing tests. The general idea is that we add null
values for non-parameter defaults or catchalls, but only if they don't
trounce an existing value. This logic used to live in MergeValues but now
it's in TryMatch since TryMatch might be working from existing data.

Also fixed the .sln to avoid building a package that we use as shared
source.
2016-04-08 08:46:00 -07:00
Kiran Challa 0c3f6497db Fixes issue of request path segment length greater than the wildcard template route
Fixes https://github.com/aspnet/Mvc/issues/4256
2016-03-23 17:36:07 -07:00
Ryan Nowak 4b980c8afa Optimize defensive copies where possible 2016-02-03 15:36:42 -08: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