Commit Graph

169 Commits

Author SHA1 Message Date
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
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
Pranav K 8915d428c4 Reacting to DI changes 2015-08-11 14:10:55 -07:00
Troy Dai eb266a1a7c Update CoreCLR versions 2015-08-04 10:15:32 -07:00
Pranav K fe9bf8bcbf Remove the use of Regex in the TemplateRouteParser
Fixes #164
2015-08-03 11:13:57 -07:00
Victor Hurdugaci f135b7d8dd Add repository information to project files 2015-07-01 20:22:39 -07:00
Ajay Bhargav Baaskaran 0882a393a4 Removed unwanted logging for non-matching routes 2015-06-23 10:53:58 -07:00
Ajay Bhargav Baaskaran b135a9d53b [Fixes #188] Added support for AppendTrailingSlash in RouteOptions 2015-06-19 11:46:25 -07:00
Ajay Bhargav Baaskaran 7172608722 Using LogVerbose instead of LogInformation 2015-06-16 14:33:05 -07:00
Troy Dai d3b0aba9b8 React to common package name change 2015-05-07 09:40:03 -07:00
Hisham Abdullah Bin Ateya 8636477b85 Using [NotNull] and 'nameof' operator 2015-05-06 17:43:19 +03:00
Kiran Challa f2e6c294b0 Address feedback for PR: https://github.com/aspnet/Routing/pull/182 2015-05-05 12:39:32 -07:00
N. Taylor Mullen 352732fc62 Update LICENSE.txt and license header on files. 2015-05-01 13:59:22 -07:00
Kiran Challa 1f6d3fe4cc Fix RouteValueDictionary to handle read-only dictionaries. 2015-05-01 11:55:01 -07:00
Pranav K f6e48d0080 Reacting to Logging.Interfaces => Logging.Abstractions rename 2015-04-30 10:02:47 -07:00
unknown d76b332a53 Updata _dataToken to _dataTokens in VirtualPathData 2015-04-14 16:14:36 -07:00
Kiran Challa 1c66e0a317 Cleanup logging
- Removed existing logger scopes as we want to minimize the number of scopes being created.
- Cleaned up tests related to removal of scopes.
- Added new log statements.
- Removed old logger structure base implementation and related tests. Added new tests also.
2015-04-08 14:20:36 -07:00
N. Taylor Mullen 7a2c338d25 Merge branch 'release' into dev 2015-04-07 14:49:17 -07:00
N. Taylor Mullen bca280d974 Add serviceable attribute to projects.
aspnet/DNX#1600
2015-04-07 14:49:11 -07:00
Doug Bunting a58ad8cde9 Merge remote-tracking branch 'origin/release' into dev 2015-04-03 12:10:47 -07:00
Doug Bunting 458a0f6809 Update .xproj files for Microsoft.Web.AspNet.* -> Microsoft.DNX.* rename 2015-04-02 13:49:28 -07:00
N. Taylor Mullen e825776663 Add travis-ci support.
- Runs ./build.sh verify
- Added quotes on warningsAsErrors to work around mono bug.
2015-03-31 17:50:43 -07:00
ianhong ff209f04bb Should GetVirtualPath returns PathString 2015-03-22 19:39:20 -07:00
Kiran Challa fe5b6d67c5 Fix routing sample 2015-03-20 14:55:05 -07:00
ianhong 3693002b02 Introducing VirtualPathData for IRouter.GetVirtualPath 2015-03-19 21:59:20 -07:00
Hao Kung 0db1f1a42f React to hosting 2015-03-19 21:02:35 -07:00
sornaks 37dc8581de Removing 'Options' from the 'ConfigureRouteOptions' extension method name. 2015-03-16 14:54:36 -07:00
Praburaj fb08460770 Using [NotNull] from common repo package 2015-03-13 17:54:16 -07:00
Praburaj 61e4f55075 Moving the IServiceCollection extension into Microsoft.Framework.DependencyInjection namespace
Fixes: https://github.com/aspnet/Routing/issues/160
2015-03-13 14:55:49 -07:00
N. Taylor Mullen 81c43301d3 Update .kproj => .xproj. 2015-03-11 14:04:11 -07:00
N. Taylor Mullen 2973795a6e Remove BOM from project.json, *.cmd, *.sh and *.shade files. 2015-03-09 12:58:37 -07:00
N. Taylor Mullen da775351e2 Update aspnet50/aspnetcore50 => dnx451/dnxcore50. 2015-03-08 12:55:34 -07:00
David Fowler f46b373acb Depend on interfaces 2015-03-05 03:27:15 -08:00
Brennan 1e6b34a043 Documentation 2015-03-04 20:41:40 -08:00
Brennan 859a0d62b8 Logging API changes 2015-03-04 19:59:23 -08:00
Hao Kung 979b75dda4 React to DI changes 2015-03-04 18:06:42 -08:00
Mugdha Kulkarni 81a17300b2 Issue 140: Support lower case routes 2015-02-20 14:54:25 -08:00
Mugdha Kulkarni f9a9b80681 Fixing the error message. The error message for malformed template was too complex listing all
the errors that can happen in one message. I have separated the message in 2 different messages.
 1. When there is a parameter or a literal following the optional parameter.
 2. when optional parameter is preceded by a literal other than period which is not allowed.
2015-02-16 17:40:04 -08:00
Ryan Nowak 9ee946073a Add support for best-effort link-generation
This change adds a feature needed for aspnet/Mvc#302

There's a new option in routing that allows link-generation to proceed
when the route values cannot be validated. The key scenario for this is
during development of an MVC site. Routing will refuse to generate a link
to actions which don't exists, this is a breaking change from the MVC5
behavior. Setting UseBestEffortLinkGeneration will allow routing to return
a value even when we can't match the action.

This option will remain off by default - setting this to on will impact
link-generation in a bunch of scenarios involving areas where we've
improved the logic for MVC6. If you're considering leaving this on outside
of development scenarios, then make sure to be as explicit with route values
as possible (don't rely on ambient values).

Functional tests to follow up in the MVC repo.
2015-02-11 14:38:30 -08:00
Mugdha Kulkarni 4e5fc2e2dd Fixing Routing Issue: 136
The RegEx inline constraint doesn't take care of Escape characters.
2015-02-10 11:16:30 -08:00
sornaks 67dcdbf8a1 Issue #1669: Adding extension method ConfigureRouteOptions. 2015-02-03 16:18:19 -08:00
Doug Bunting c59366e8a7 Quick cleanup
- `DefaultInlineConstraintResolver` has no need of a `IServiceProvider`

nits:
- add doc comments for changed `DefaultInlineConstraintResolver` ctor
- let VS add a dev server port to sample's .kproj
- add debugSettings.json and .vs/ to .gitignore
2015-01-30 10:02:58 -08:00
Pranav K 29a5cb8aa9 Change the namespace for the MapRoute extension 2015-01-23 16:08:38 -08:00
Mugdha Kulkarni 3626900bc9 Basic URL Extension functionality working.
1. Template parser now allows a parameter to be an optional parameter in a complex segment if
   it is the last and only optional parameter and it is followed by a period.
2. Template matcher modified to take into consideration the optional parameter in the complex
   segment. Also the period shouldn't be present if the optional parameter is not present
2015-01-16 16:25:53 -08:00