Commit Graph

340 Commits

Author SHA1 Message Date
Pranav K cb39ab5c43 Updating to release NuGet.config. 2015-12-11 12:24:06 -08:00
Ryan Nowak 32bbd8516c Quick fix: Add routing feature on success 2015-12-11 08:36:46 -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
Pranav K 39451a57b6 * Removing Helios from sample
* Adding System.Runtime to unblock CI
2015-12-08 11:17:29 -08:00
John Luo c672d699f1 Merge branch 'johluo/verbose-rename' into dev 2015-12-07 15:50:47 -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
John Luo 00a74aaa2c Reacting to verbose rename 2015-12-03 15:51:28 -08:00
Ryan Nowak c911a10692 Add Routing.Abstractions 2015-12-02 16:43:35 -08:00
Pranav K 23f44aa082 Enabling tests on CoreCLR 2015-12-01 11:00:09 -08:00
Ryan Nowak 4441fba4ee Clean up folders and test names 2015-11-30 09:36:07 -08:00
Ryan Nowak 123eaf2278 Fix #233 - Routing stops when constraint is rejected
The fix here is to 'continue' instead of 'return'. Added the relevant test
cases, which only had positive cases for constraints.
2015-11-30 09:28:15 -08:00
Ryan Nowak 9fc51ecbee Add launchsettings.json to .gitignore 2015-11-30 09:27:32 -08:00
Ryan Nowak d4b96b27c0 Optimize RouteValueDictionary, expose concrete type
This change optimizes allocations by RouteValueDictionary based on usage.

First, implement a struct Enumerator, and expose the concrete RVD type
from all extensibility points. We wanted to try and decouple this code
from RVD originally and use IDictionary everywhere. After doing that we've
found that it allocates an unacceptable number of enumerators.

Secondly, optimize copies of RVD for the case where you're copying an RVC
to another (common case). When doing this we can copy the count to get the
right capacity, and copy the entries without allocating an enumerator.

Lastly, optimize RVD for the case where it's a wrapper around a poco
object. We 'upgrade' to a writable full dictionary if you try to write to
it, or call one of a number of APIs that are uncommonly used. We could
produce optimized versions of things like `Keys` and `CopyTo` if necessary
in the future.
2015-11-25 09:49:10 -08:00
Pranav K cad81fa608 Updating tests to use moq.netcore 2015-11-23 12:24:35 -08:00
John Luo 825f82d7e0 Reacting to ApplicationServices removal from HttpContext 2015-11-19 09:40:46 -08:00
Doug Bunting 06b8248ff0 Move Travis to supported Linux distribution
- use Ubuntu 14.04 (Trusty)
  - Travis support for Trusty is in Beta and currently requires `sudo`
- run `dnu restore` with DNX Core since aspnet/External#49 is not fixed in Mono versions we can use
- add required dependencies for DNX Core to `.travis.yml`
- addresses part of aspnet/Universe#290
2015-11-17 14:26:37 -08:00
Ajay Bhargav Baaskaran 4d69ad0db2 Moved AttributeRouting from MVC 2015-11-17 12:03:12 -08:00
Doug Bunting f6616db53d Explicitly choose Mono 4.0.5
- avoids future problems related to aspnet/External#48
  - e.g. when Travis updates default Mono version in `csharp` bundle
2015-11-17 11:11:15 -08:00
Ajay Bhargav Baaskaran cef221f57a Added Template property to RouteTemplate 2015-11-12 15:28:02 -08:00
N. Taylor Mullen f4f6c1127f Remove System beta tag in project.json for coreclr packages. 2015-11-12 12:24:12 -08:00
Cesar Blum Silveira 0b488471cf Merge branch 'release' into dev 2015-11-03 13:11:39 -08:00
Cesar Blum Silveira 2deca49bd7 Strong name everything. 2015-11-03 12:18:03 -08:00
John Luo 83f20ece7d Reacting to RequestDelegate namespace change 2015-10-30 13:58:05 -07:00
Pranav K 902930db9e Merge branch 'release' into dev 2015-10-28 12:51:18 -07:00
Pranav K 941f308f37 Updating to release NuGet.config. 2015-10-28 12:43:08 -07:00
Marc Climent 53fd5b5f54 Allow defaults to be null when constructiing TemplateMatcher 2015-10-23 09:51:47 +02:00
Pranav K 1fd284c87f Switching to generations TFMs 2015-10-22 00:52:03 -07:00
Eilon Lipton c0242240f8 Adding doc comments for frequently used APIs
Some copied from older docs.
Also renamed BuilderExtensions type to a more specific name.
2015-10-19 15:25:59 -07:00
Doug Bunting 035fddd9ee Fix local build break 2015-10-12 13:01:49 -07:00
Doug Bunting 1a963004b7 React to aspnet/Universe#290 fix 2015-10-10 20:03:10 -07:00
Ryan Nowak a5727dc932 Incorporate StringSegment from primitives 2015-10-08 12:44:59 -07:00
Ryan Nowak e5f4aa03d2 Avoid allocating in TemplateMatcher on failure
This change rejiggers the URL matching algorithm into using a two-pass
system to avoid allocating anything when a URL fails to match a route.
2015-10-06 14:14:01 -07:00
Ryan Nowak 371d4e62da Remove string.Split from routing
This change removes the call to string.Split and a few substrings, and
replaces it with a tokenizer API. The tokenizer isn't really optimized
right now for compute - it should probably be an iterator- but it's a
significant improvement on what we're doing.
2015-10-06 10:21:00 -07:00
Pranav K 2f8dba6659 Renaming Microsoft.Framework.* -> Microsoft.Extensions.* 2015-10-03 15:44:48 -07:00
N. Taylor Mullen 57aa0140e4 Update 'build.cmd' alias parameter to use full name. 2015-10-01 11:58:43 -07:00
Ajay Bhargav Baaskaran d5d11eb30e Fix case sensitive comparison in TemplateMatcher 2015-09-29 14:36:42 -07:00
Pranav K 8bc54f91dd Merge branch 'release' into dev 2015-09-28 23:16:00 -07:00
Pranav K fc7f345e22 Updating to release NuGet.config. 2015-09-28 23:15:57 -07:00
Ryan Nowak f95ffb57ae Make dictionary allocations lazy on RouteData
This change makes the allocation of DataTokens and Values on RouteData
lazy, and elides copies when copying an 'empty' RouteData.

In our current architecture this change will eliminiate 2 * (N + 1)
dictionary allocations/copies per request, where N is the number of routes
processed. In a large system with lots of attribute routes, this number
could be very significant.

For a small MVC site (ModelBinding, Validation, Views) with one route, it
still shows a modest reduction of dictionary allocations without adding
much complexity.
2015-09-28 22:54:32 -07:00
Anthony van der Hoorn 59b698c8b2 Expose parsed route so that observers can get extra details about the route (i.e. optional state) 2015-09-23 09:00:28 -07:00
Ajay Bhargav Baaskaran 61831527f8 Enabling NuGetPackageVerifier 2015-09-18 12:44:29 -07:00
Ajay Bhargav Baaskaran b5c87648cb Running xml-docs-test before test target 2015-09-18 12:29:43 -07:00
N. Taylor Mullen 18da1b3093 Update nuget.exe and corresponding feeds to v3. 2015-09-17 18:33:30 -07:00
Pranav K c6941e797f Replacing NotNullAttribute with exceptions 2015-09-11 15:08:04 -07:00
Pranav K 7cd8db6695 Adding NeutralResourcesLanguageAttribute 2015-09-10 18:29:07 -07:00
Ajay Bhargav Baaskaran ee9945f06d Added timeout to regex 2015-09-10 15:21:56 -07:00
LBi Jeroen Slor 87360d861f Added configure options. Added default default addoptions call 2015-09-04 08:48:46 -07:00
N. Taylor Mullen 5ec25174ff Update project.json to have warningsAsErrors accept a bool. 2015-09-02 15:34:53 -07:00
Hao Kung 3cab10cfd7 React to options rename 2015-09-02 13:55:39 -07:00