Commit Graph

26 Commits

Author SHA1 Message Date
James Newton-King 74bfff149e
Use var in for loops (#758) 2018-08-31 08:24:41 +12:00
James Newton-King 99c4f2f36a
Support policy arguments and resolving services by constructors (#753) 2018-08-29 14:51:34 +12:00
Nate McMaster deddb336b7
Merge branch 'release/2.1' into release/2.2 2018-07-24 11:47:18 -07:00
Ryan Nowak b9df95831d Change Branding
For preview one the branding is:

new thing = UseGlobalRouting/UseEndpoint
old thing = UseRouter

We're going to drop the name Dispatcher everywhere and make sure that we
position our new work as 'new and improved routing' instead of
introducing a new product/concept name.

We're not totally sure of the term Global yet, but it's what we're doing
for preview 1. Suggestions welcome for dicussion after we do the first
preview :)
2018-07-22 16:41:59 -07:00
Kiran Challa 9c23ffb215 Added tests for verifying the effects of change made to empty string hashcode from netcoreapp2.0 to 2.1 2018-07-09 13:11:03 -07:00
Kiran Challa 4184b2406d Updated to make routing always use UrlEncoder.Default and not depend on DI to get it.
[Fixes #513] RedirectToAction with Non-English Characters in Parameters and Authentication Causes Error
2018-04-12 05:15:45 -07:00
Jass Bagga 93d20ec78c
Revert Dispatcher changes (#508)
Addresses aspnet/Home#2741
2018-01-10 12:53:17 -08:00
Ryan Nowak 736b49294d Add Template abstraction
This change adds the Template as a top level abstraction. URL templating
is now a two-stage process.

First you use a 'key' to look up a Template, then you use the Template
to create the URL.

This change also has some cleanup of the way RoutePatternBinder gets
instantiated. I added a factory service so that most of the complex
things can be made internal to Dispatcher. Now it's much easier to
constuct and use. These impacts some pubternal APIs that we already
broke, but makes them actually nice :)

Also cleaned up some tests and fixed one that was broken and not
running.
2017-10-25 22:15:24 -07:00
Ryan Nowak 2d661396df Port TemplateBinder to dispatcher 2017-10-25 14:28:20 -07:00
Nate McMaster 248f15dee1 Upgrade to xunit 2.3.0-beta4
Includes some changes as required by the new analyzers in this upgrade
2017-08-22 17:49:54 -07:00
Nate McMaster d075f1bcea Upgrade test framework versions and fix test issues 2017-05-12 15:13:17 -07:00
Ryan Nowak 232b73a151 Fix aspnet/Mvc#6218
This fixes the case described in the comments in TemplateBinder.

This case is much more common for pages which is why we're only seeing it
now. We've had this issue for all of 1.0.0 in both conventional and
attribute routing.
2017-04-28 17:00:35 -07:00
Steve Sanderson 8c58086030 Make TreeRouter restore RouteData snapshots consistently. Fixes #394. 2017-04-11 15:36:34 +01:00
Ajay Bhargav Baaskaran 4569750d86 Using NullLogger types from Logging.Abstractions (#389) 2017-03-14 12:19:33 -07:00
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