Commit Graph

111 Commits

Author SHA1 Message Date
James Newton-King 48dd7a9688
Fix log order (#540) 2018-06-08 08:57:24 +12:00
James Newton-King 21f8ce5e95
Initial DispatcherMiddleware tests (#529) 2018-06-07 21:47:06 +12:00
Ryan Nowak 49f839a286 Add benchmarks for matcher implementations 2018-06-06 21:50:07 -07:00
Ryan Nowak dc4be30d88 Rename Treenumerator -> TreeEnumerator 2018-06-01 21:33:30 -07:00
James Newton-King 81dde1a9f1 PR feedback 2018-06-01 21:33:30 -07:00
Ryan Nowak 0ea16ddd57 Code dump of dispatcher prototype code
Here's a code dump of the parts of the Dispatcher prototype codebase
that are needed to get us off the ground.

This first cut attempts to use part of routing where possible, and not
all of those changes will be long-lasting.

I'll leave comments through thoughout the PR for education.
2018-06-01 21:33:30 -07:00
kishan.anem acea87a617 IUrlHelper and support for RouteOptions.LowercaseUrls
changes are made as suggestions.
@rynowak
#518
#Issue:  aspnet/Mvc#7720
2018-05-31 20:07:01 -07:00
kishan.anem cb77c17cf4 TestCase added and IUrlHelper and support for RouteOptions.LowercaseUrls
checked appliesd to the query string.
@rynowak
#518
#Issue:  aspnet/Mvc#7720
2018-05-31 20:07:01 -07:00
kishan.anem f227cbeca3 Added sperate option "IUrlHelper and support for RouteOptions.LowercaseUrls "
@rynowak
#518
#Issue:  https://github.com/aspnet/Mvc/issues/7720
2018-05-31 20:07:01 -07:00
kishan.anem 695fb00308 IUrlHelper and support for RouteOptions.LowercaseUrls
IUrlHelper and support for RouteOptions.LowercaseUrls

#issue : https://github.com/aspnet/Mvc/issues/7720
2018-05-31 20:07:01 -07:00
Ryan Brandenburg c8d842c160 Merge remote-tracking branch 'origin/release/2.1' into rybrande/MergeRelease21IntoDev 2018-04-16 15:05:29 -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
Ryan Brandenburg dc07aba935 Set 2.0 baselines 2018-03-19 09:27:10 -07:00
Jass Bagga 57697baedb
Tolerate leading "~/" or "/" (#509) 2018-01-11 13:00:01 -08:00
Jass Bagga 93d20ec78c
Revert Dispatcher changes (#508)
Addresses aspnet/Home#2741
2018-01-10 12:53:17 -08:00
Jass Bagga 54e96bd404
Tolerate leading "~/" or "/" (#499)
Addresses #441
2017-11-21 14:20:17 -08:00
Jass Bagga 1b0258ab8f
Move AddEntryToTree to shared source (#496)
Addresses #495
2017-11-20 14:18:50 -08:00
Jass Bagga e2bcefc3d0
Move TreeEnumerator to shared source (#494) 2017-11-15 11:17:59 -08:00
Jass Bagga 7f8ba171f4
Move UrlMatchingTree to shared source (#492)
Addresses #489
2017-11-13 11:40:26 -08:00
Jass Bagga fd83b300b8
Port TreeMatcher (#488)
Addresses #472
2017-11-07 10:51:50 -08:00
Nate McMaster f4fb178f55 Pin tool and package versions to make builds more repeatable
Part of aspnet/Universe#575
2017-11-01 16:32:09 -07:00
Ryan Nowak bb413c6ac3 Rename a bunch of old stuff 2017-10-26 12:35:58 -07:00
Ryan Nowak d612072d1a Fix a broken MVC test 2017-10-25 23:29:35 -07: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
Jass Bagga eebc7db2ca Use RoutePatternMatcher logic in TemplateMatcher (#484) 2017-10-25 14:16:04 -07:00
Ryan Nowak bd517f891f Support conversions from RouteTemplate -> RoutePattern 2017-10-20 16:58:14 -07:00
Jass Bagga fdc5f21428 Port PathTokenizer (#478) 2017-10-20 13:24:00 -07:00
Ryan Nowak 08a64048da Redesign public API for templates
-Renamed RouteTemplate -> RoutePattern
-Made immutable
-Added Builder
-Lots of fixes to parser to support new design

There are a few small issues logged for follow-up but this is mostly in
the place I want it design-wise.
2017-10-19 09:41:45 -07:00
George Chakhidze a3c1b6d033 Avoid allocation of a new char array on every request in RouteCollection class
This is a very small micro-optimization: When LowercaseUrls and/or AppendTrailingSlash
options are enabled, on every call to RouteCollection.NormalizeVirtualPath a new
char[] { '?', '#' } is being allocated.
2017-10-17 17:45:15 -07:00
Jass Bagga 3a5cd6dd25 Port TemplateParser to Dispatcher project (#473)
Addresses #466
2017-10-17 11:52:26 -07:00
Jass Bagga bdbe922b22 Add logging (#467)
Addresses #439
2017-10-12 14:23:01 -07:00
Ryan Nowak 56ae2e0177 Respond to feedback about handler factory
- Handler factories are now associated with the dispatcher entry
- Handler factory is now an interface
2017-10-06 10:11:05 -07:00
Ryan Nowak 63d2cc4637 Changes due to davidfowl feedback
Changed dispatchers to IMatcher, added a context.

Removed a bunch of outdated cruft and updated the sample to use
attribute-routing like entries.
2017-10-05 18:31:23 -07:00
Jass Bagga 2f8951e244 Productize HttpMethodEndpointSelector (#463)
Addresses #452
2017-10-05 15:14:17 -07:00
Jass Bagga f49cbd1b25 Selectors initialization and DispatcherBase logging (#451) 2017-09-29 17:50:45 -07:00
Ryan Nowak abb41302e9 Add a dispatcher by default (#462)
This change adds the TreeDispatcher by default to the pipeline. You can
register DispatcherDataSource instances to configure it.
2017-09-29 16:06:38 -07:00
Ryan Nowak bd750ad76d Making endpoints and addresses easier
This makes endpoints and addresses easier to work with by dropping the
'metadata first' approach for the the things that are really at the core
of the dispatcher.
2017-09-28 22:07:32 -07:00
Ryan Nowak 5fed462123 Add tree dispatcher 2017-09-27 14:34:09 -07:00
Ryan Nowak 7685e17e80 Add Addresses and link generation 2017-09-24 23:16:34 -07:00
Javier Calvarro Nelson 475712d613 Update API Check baselines 2017-09-22 14:16:39 -07:00
Ryan Nowak 41f26dc69d Add endpoint disambiguation
- Better sample of metadata
- Sample shows how conventional routing would work
- Added endpoint disambiguation
2017-09-22 10:54:20 -07:00
Ryan Nowak 134096d9cb Relayer implementation
This refactor introduces two major changes

1. Now creating the 'handler' delegate happens inside the endpoint
middleware. This allows you to short circuit even harder, AND to create
endpoint funcs that capture and use 'next' to rejoin the middleware
pipeline.

2. Relayered the implementation to have routing plug into the dispatcher.
It wasn't immediately apparent to me that this was the right thing to do,
but I think we will need to do things this way to deliver the kind of
back-compat experience we need to do.

The idea that I have is that 'attribute routing' will be the 'default'
entry in the dispatcher. Adding additional conventional routes or other
IRouter-based extensibility will be possible through adapters - but the
default experience will be to add items to the 'attribute route'.

So. We will need to port the attribute routing infrastructure to the
dispatcher library.

We may also need to make RVD into a subclass of something in the
dispatcher assembly.
2017-09-17 18:29:22 -07:00
Nate McMaster e67d85d30c Use PackageLineup to manage PackageReference versions 2017-08-29 11:31:54 -07:00
Nate McMaster 44f9a7083b Use Directory.Build.props/targets 2017-08-29 11:30:03 -07:00
Pranav K a23f1601fd Remove usage of TaskCache 2017-06-08 09:06:41 -07:00
Ryan Nowak d39305aa91 Improve formatting 2017-05-24 08:36:24 -07:00
Ryan Nowak 1165a1de33 Updates to generated resource files 2017-05-24 08:32:15 -07:00
Joonas Westlin 9a6cb89b8d Adjusted example error message to reflect the situation that causes the error. 2017-05-24 08:23:20 -07:00
Joonas Westlin a18f59ab88 Changed expected exception message to the one defined in Resources.resx.
Removed the Debug.Assert as that caused the test runner to crash as in
this case the preceding part is not a literal.
Fixes the test runner crash.
2017-05-24 08:23:20 -07:00