Commit Graph

188 Commits

Author SHA1 Message Date
N. Taylor Mullen 334d14ac66 Remove direct Microsoft.NETCore.Platforms dependency.
- Microsoft.NETCore.App now pulls this package in.

aspnet/Coherence-Signed#344
2016-06-13 15:29:38 -07:00
jacalvar dd79d0b88c [Fixes #316] TreeRouter does not match a route with the correct length 2016-06-03 12:55:20 -07:00
Pranav K 74a246d34c Merge branch 'release' into dev 2016-05-02 15:21:04 -07:00
Pranav K 0ce851680b Fix build warnings 2016-05-02 11:27:25 -07:00
Ryan Nowak 96b7678c8f RVD crazy 2016-04-22 14:06:49 -07:00
Ryan Nowak e8ce0e7523 TreeRouter cleanup 2016-04-20 18:12:10 -07:00
Pranav K f826be9206 Use latest build of dotnet-test-xunit 2016-04-19 14:54:10 -07:00
Pranav K ea2d30ff49 Merge branch 'release' into dev 2016-04-19 14:54:10 -07:00
Pavel Krymets 793cd22aa0 Merge branch 'release' into dev 2016-04-18 17:03:21 -07:00
Pavel Krymets d98924f713 Bring Microsoft.NETCore.Platforms dependency back 2016-04-18 17:03:18 -07:00
Pavel Krymets d7a36ce05e Merge branch 'release' into dev 2016-04-14 16:33:54 -07:00
Pavel Krymets b1f720ef12 Migrate tests, tools and samples to portable 2016-04-14 16:28:13 -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
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
Doug Bunting 39b4f6fe53 An `ObjectPoolProvider` is always registered
- react to aspnet/Hosting/pull#673
2016-03-25 10:08:16 -07:00
David Fowler 7399cc8957 Fixed build 2016-03-25 02:40:08 -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
Ajay Bhargav Baaskaran 3127e7a2e9 [Fixes #294] Set DefaultHandler in RouteBuilder 2016-03-10 15:25:34 -08:00
John Luo b7fc5f06cd Fix test with mismatched literal type 2016-03-10 15:15:56 -08:00
Doug Bunting 27c6d8c665 Remove project name from output path
- aspnet/Coherence-Signed#187
- remove `<RootNamespace>` settings but maintain other unique aspects e.g. `<DnxInvisibleContent ... />`
- in a few cases, standardize on VS version `14.0` and not something more specific
2016-03-02 21:06:00 -08:00
N. Taylor Mullen bb7cb4a0d9 Transition to netstandard.
- dotnet5.X => netstandard1.y (where y = x-1).
- DNXCore50 => netstandardapp1.5.
- Applied the same changes to ifdefs.
2016-03-01 13:37:03 -08:00
John Luo 8c64656882 Updating test TFMs for custom test discovery 2016-02-19 15:08:13 -08:00
Kiran Challa 51c4dd43b3 Enable tests to run using dotnet xunit runner 2016-02-10 15:01:44 -08:00
Ryan Nowak d97947e229 Move routing extensions to .Routing 2016-02-04 09:55:09 -08:00
Ryan Nowak 4b980c8afa Optimize defensive copies where possible 2016-02-03 15:36:42 -08:00
Ryan Nowak 48eb000a0e Fix routing build 2016-02-02 11:44:52 -08:00
Pranav K b4099adefb Fixing build 2016-01-29 09:33:03 -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
jacalvar 9b217a4026 Fixes [#276] Throw a nicer error when the routing services haven't been added to DI 2016-01-14 15:11:20 -08:00
Pranav K 672d596248 Changes to build using dotnet-cli 2016-01-13 13:02:32 -08:00
John Luo 982de18371 Updating tests to add options to services 2016-01-07 19:43:35 -08:00
Pranav K 739dc7d621 Change the data type of VirtualPathData.VirtualPath
Fixes #270
2016-01-05 11:50:55 -08:00
Ryan Nowak 226cfb1e0d Optimize TemplateMatcher
Replaces a bunch of dictionary operations with indexing into an array by
doing some caching. Also eliminating an enumerator allocation by changing
from IReadOnlyDictionary to RouteValueDictionary.
2016-01-05 10:47:51 -08:00
Ryan Nowak 8f850f2a3e Remove dependency on Dictionary exception message
We shouldn't test framework error messages.
2015-12-30 17:52:35 -08:00
grehov a61a68defc Add support IEnumerable parameters for query string 2015-12-30 16:07:04 -08:00
Ryan Nowak 33f9bdadef Pool state used to generate URL 2015-12-28 09:27:41 -08:00
Hao Kung a956fe53c1 OptionsModel => Options 2015-12-21 15:54:13 -08:00
Ryan Nowak 1e6ff07ec8 Fix routing service registration 2015-12-18 10:35:57 -08:00
Ryan Nowak 813171a016 Reduce allocation in URL generation
This change optimizes our a per-operation dictionary that really can just
be cached for the whole app's lifetime.
2015-12-18 09:20:52 -08:00
Ajay Bhargav Baaskaran ef0ea537e2 Removed CatchAll and Fallback from DecisionTree 2015-12-16 10:52:53 -08:00
Pranav K 2ab24aa0f4 Remove custom url encoding
Fixes #214
2015-12-16 09:06:49 -08:00
Ryan Nowak cb39589864 Add extension methods for using routing with Middleware 2015-12-14 13:21:50 -08:00
Ryan Nowak cc501bc025 HttpMethodConstraint -> HttpMethodRouteConstraint
This is consistent with other constraint types in routing, and avoids a
naming conflict with MVC.

This is a change **away** from the names used in System.Web and
System.Web.Http.Routing, but it seems worth doing for consistency and
clarity.
2015-12-14 10:10:17 -08:00
Ryan Nowak 604fc6bb54 Fix #248 Add HttpMethodRouteConstraint
Constraint code ported from WebAPI2. Tests are new.

Also a bunch of misc cleanup for constraints.
- Move IRouteConstraint to abstractions
- Fix namespace of a constraint
- Some general style cleanup
- use RouteValueDictionary in the public API
2015-12-14 08:52:47 -08:00
Ryan Nowak 36180ab6d0 Add IRouteHandler, RouteBase, and IRoutingFeature
Adds IRouterHandler, an abstraction for endpoints in the routing system
that can't chain (example: delegates). The idea is that some kinds of
routes aren't really friendly to chaining. If you don't support chaining,
then accept IRouteHandler and work with that rather than IRouter.

There's one implementation of IRouteHandler, RouteHandler. It implements
both IRouter and IRouteHandler.

Adds RouteBase as a base class for routes based on our template syntax and
defaults/constraints/data-tokens. Updated a lot of signatures to be
get/set virtual and mutable to facilitate or bigger variety of usage
scenarios.

Renamed TemplateRoute to just Route, now inherits from RouteBase.

Adds IRoutingFeature for middleware scenarios where you don't have access
to the route context.

Also adds some basic extension methods for accessing route values.
2015-12-10 17:55:03 -08:00
Pranav K 411a59125c Fixing CoreCLR package versions 2015-12-08 16:23:11 -08:00
Ryan Nowak b01183f023 Simplify link generation code
- Removes ProvidedValues and IsBound

- Removes best-effort link generation

- simplify code where possible

- lots of test simplification
2015-12-07 11:04:19 -08:00
Ryan Nowak c911a10692 Add Routing.Abstractions 2015-12-02 16:43:35 -08:00