Commit Graph

43822 Commits

Author SHA1 Message Date
Chris R 909a14e504 Enable CoreClr tests on Travis. 2015-11-30 12:33:51 -08:00
Chris R 51cc52e855 Tooling sample updates. 2015-11-30 11:57:49 -08:00
Chris R 4cf32eb678 #411 Handle validation failures from ValidateToken. 2015-11-30 11:56:57 -08:00
Ryan Nowak 6875ee55d3 Remove Magic Link Generation
This change resolves #3512 and #3636 by removing 'magic' link generation
and adding an extension method to add routes to areas correctly using the new
pattern. This is pretty much exactly the same as how MapWebApiRoute works.

For site authors, we recommend adding area-specific routes in a way that
includes a default AND constraint for the area. Put your most specific
(for link generation) routes FIRST.

Ex:

  routes.MapRoute(
      "Admin/{controller}/{action}/{id?}",
      defaults: new { area = "Admin" },
      constraints: new { area = "Admin" });

The bulk of the changes here are to tests that unwittingly relied on the
old behavior.
2015-11-30 11:24:23 -08:00
ryanbrandenburg 91e837d465 * Debug log exceptions in JsonInput deserializing 2015-11-30 11:19:22 -08:00
ryanbrandenburg d22d6793ba * Include DisplayName in errorMessage 2015-11-30 11:18:14 -08:00
Pranav K c5346f7bf9 Use string.IsNullOrEmpty instead of string.IsNullOrWhitespace
Fixes #3593
2015-11-30 10:00:44 -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
David Fowler 8b310c4583 Merge pull request #436 from benaadams/imemorypool
Remove unused IMemoryPool
2015-11-29 08:12:06 -08:00
Ben Adams 9102c1bb92 Remove unused IMemoryPool 2015-11-29 10:13:14 +00:00
John Luo 5ed05d34ac Adding directory existence check for nuget-install 2015-11-29 00:05:52 -08:00
Ben Adams 2937fc3c98 OnConnection->OnConnectionAsync
Resolves  #433
2015-11-29 03:57:47 +00:00
Sunny Ahuwanya 67a0f2d420 Reverted ISystemClock to use DateTimeOffset 2015-11-28 21:27:51 -05:00
Sunny Ahuwanya 7f025a6bd4 Speed up DateHeaderValueManager
Replaced PumpTimer() method with StartTimer(), introduced StopTimer()
method which pauses timer when idle instead of disposing it,
ISystemClock returns DateTime instead of DateTimeOffset.
2015-11-28 20:15:17 -05:00
SteveSandersonMS ad04dd1750 Work around CoreCLR issue 2015-11-26 11:47:12 +00:00
SteveSandersonMS 6f840b60ca Improvements to form UI 2015-11-26 10:57:08 +00:00
N. Taylor Mullen 490fcf1ab4 Remove the use of `Linq` and unneeded enumerators from Mvc `TagHelper`s.
- Prior to this change we were using `Linq` throughout our `TagHelper`s which resulted excess allocations.
- Also went through our data structures and changed some from `Enumerable<T>` to `IList<T>` where we were just not exposing the more accessible types (list).
- Changed several locations of `foreach` to `for` to remove the enumerator allocation.

#3599
2015-11-25 21:31:24 -08:00
John Luo 7a30e13004 Removing redundant src placeholder 2015-11-25 17:13:29 -08:00
Ryan Nowak a14fdd8637 Remove FormatFilter dependency on IActionContextAccessor
This change simplifies IFormatFilter's API and removes the dependency on
IActionContext accessor.

The old API for IFormatFilter required computing state based on the
current request as part of the constructor, which in turn implied the use
of a context accessor. This isn't really needed. I didn't preserve caching of
the 'format' as that seems like an early optimization.
2015-11-25 17:01:16 -08:00
Ryan Nowak d8cc2b85d5 Adds ActionContext to Validation contexts
This change makes it possible to access the ActionContext/ActionDescriptor
from inside of validators and client validators.
2015-11-25 16:38:26 -08:00
Pranav K 017bf1a20f Changes to use moq-netcore 2015-11-25 16:04:04 -08:00
Ryan Nowak 0832365ec2 Adds ActionContext to OperationBindingContext
This change makes it possible to access the ActionContext/ActionDescriptor
from inside of modelbinding.
2015-11-25 15:17:09 -08:00
Kiran Challa a2f5fcbd2d Fix Startup.cs to enable running test on non-Windows OSes 2015-11-25 14:22:35 -08:00
SteveSandersonMS 74bae91c3a Rough but working example of displaying server-side validation errors. Needs cleaner patterns/APIs. 2015-11-25 19:15:38 +00:00
Kiran Challa 31e42ee312 [Fixes #3433] Invalid media type 'text/plain; charset=utf-8' 2015-11-25 10:50:40 -08:00
Ryan Nowak 4bcf236450 MVC companion to aspnet/Routing#238
This is a companion change to make the RouteValueDictionary type more
promient. Using the concrete type here allows to avoid allocations in a
lot of common scenarios.
2015-11-25 10:36:50 -08:00
Doug Bunting 6e299d695f Update `DefaultHtmlGenerator.GenerateAntiforgery()` to match latest `IAntiforgery.GetHtml()`
- #3123 (3 of 5 or so)
- react to rest of aspnet/Antiforgery@6a9b38d
  - remove `HtmlEncoder` from localization requirements
  - literal `hidden` is no longer HTML encoded (was a no-op anyhow)
2015-11-25 09:49:15 -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
Doug Bunting 7bb0a1a4fe Update `IJsonHelper` to use `IHtmlContent`
- part of #3123 (2 of 5 or so)
- do not expose specific `HtmlString` class
2015-11-25 09:49:05 -08:00
Doug Bunting d84587a99d Quiet `initialization` target in `MvcSandbox` folder 2015-11-25 09:48:54 -08:00
Doug Bunting 6a9b38db77 Return an `IHtmlContent` from `IAntiforgery.GetHtml()`
- part of aspnet/Mvc#3123
- no longer forces caller to wrap the return value in an `HtmlString`

nit: don't HTML encode the word "hidden"
2015-11-25 09:44:54 -08:00
SteveSandersonMS 7ac0727813 Towards working forms 2015-11-25 17:44:32 +00:00
Pranav K ba1d064b99 Cleaning up RazorPage 2015-11-25 09:20:55 -08:00
Pranav K 79d517483b Removing PageInstrumentation
Fixes #3497
2015-11-25 08:41:21 -08:00
David Fowler ea7f40c592 Merge pull request #408 from benaadams/CancellationTokenSource
Remove CreateLinkedTokenSource
2015-11-25 01:32:04 -08:00
Pavel Krymets 705769bda6 Fix build 2015-11-24 15:40:45 -08:00
Doug Bunting 78face48d0 Ignore `launchSettings.json` files 2015-11-24 15:31:27 -08:00
Pranav K 64fa41457b Updating build script per RC1 branching 2015-11-24 14:53:00 -08:00
Pranav K f0c2d7ed25 Updating tests to run on dnxcore50 2015-11-24 14:21:06 -08:00
Pranav K a45c08a4c4 Updating tests to use moq.netcore 2015-11-24 14:18:11 -08:00
Pavel Krymets 5ef14e95b7 React to dnx confguration change 2015-11-24 11:54:10 -08:00
Chris R c8990bcc29 Hosting#318 Add middleware analysis tools, sample. 2015-11-24 11:52:20 -08:00
Pavel Krymets aaea8bdf05 Fix test 2015-11-24 11:09:01 -08:00
Pavel Krymets cc384ff272 Add an option to disable windown auth 2015-11-24 10:56:34 -08:00
Kiran Challa 80f1655478 [Fixes #51] Missing null check in CorsPolicyBuilder 2015-11-24 09:17:02 -08:00
SteveSandersonMS dbc17acc62 Update README.md 2015-11-24 14:33:22 +00:00
SteveSandersonMS 4ba80c3210 Fix styling in React example 2015-11-24 14:20:18 +00:00
SteveSandersonMS d4692b0c4b Update README.md 2015-11-24 12:48:52 +00:00