Commit Graph

2833 Commits

Author SHA1 Message Date
Pranav K 43c75c922e Allow functional tests with content to run from VS
Fixes #4543
2016-05-19 09:04:15 -07:00
Pranav K 61883b5101 Fix more schema warnings in Mvc 2016-05-18 18:25:45 -07:00
mnltejaswini 74357b3ed8 [Perf] Fast Generate Url for specific cases to avoid string allocations 2016-05-18 18:08:25 -07:00
Kristian Hellang 0f8542e4b2 Throw a more descriptive exception for missing CORS policies 2016-05-18 17:54:17 -07:00
Ryan Brandenburg 941da9264b Move ModelBindingHelper to Internal (#4664) 2016-05-18 16:52:43 -07:00
Pranav K 78be3ad135 Revert "Update Minor versions (#4657)"
This reverts commit e731a327cf.
2016-05-18 09:11:20 -07:00
Ryan Brandenburg e731a327cf Update Minor versions (#4657) 2016-05-17 12:40:20 -07:00
N. Taylor Mullen 55922d68d4 React to `HtmlEncodedString` rename to `HtmlString`.
- Removed the Mvc instance of `HtmlString` since it now exists in `HtmlAbstractions`.

#4558
aspnet/HtmlAbstractions#25
2016-05-17 11:02:10 -07:00
Kristian Hellang 230776f4b0 Added Permanent property to configure RequireHttpsAttribute
Fixes #4561
2016-05-16 16:18:53 -07:00
mnltejaswini 61a176e478 [Perf] Cache the default values for action arguments to avoid Activator.CreateInstance per argument.
Fixes #4470
2016-05-16 11:43:34 -07:00
mnltejaswini 5fb36ae406 [Perf] Replace Activator.CreateInstance with cached delegate in RazorPageFactoryProvider
Fixes #4470
2016-05-16 11:26:33 -07:00
mnltejaswini 0e4b838864 [Perf] Replace Activator.CreateInstance with cached delegate in Model Binders
Fixes Part1 of #4470
2016-05-16 11:26:33 -07:00
N. Taylor Mullen fa29396141 Revert "Add Visual Studio specific RC1 binaries."
This reverts commit 687fd72efd, a140440196, 698980943a and 3ebb14ee4b.

#4405
2016-05-16 11:12:24 -07:00
BrennanConroy aeb5eb440c React to AuthorizationContext rename 2016-05-16 09:36:24 -07:00
Ryan Nowak 1e02fd2e6b Merge invoker back into one class
This will help future generations maintain this class. Notice that the
protected methods that are going away all just call into another
extensibility point (other than the executor). If we need to we could make
that extensible in the future and then we have the same support with fewer
hooks and less complexity.
2016-05-13 17:43:59 -07:00
Ryan Nowak 51e133ab9f Add asserts to DiagnosticSource 2016-05-13 15:05:35 -07:00
Ryan Nowak 6dbc808fde Clean up .sln files
Remove reference to deleted DNX project
Prevent sources packages from building
2016-05-13 15:03:52 -07:00
Ryan Nowak 652e330875 Fix #4631 and avoid Task<T> creation in invoker
This change corrects and ordering bug between the creation of the
'context' and the diagnostic source event that occurs before a synchronous
filter's 'after' stage.

Also made some simple changes to avoid allocating Task<T> in many common
cases. Now we'll only create the Task<T> when we really need it (async
filters).
2016-05-13 08:53:56 -07:00
Ryan Nowak 128d74e2a0 Refactor Argument Binder
This change just rearranges some code in the argument binder with a mind
towards performance and clarity. We're removing a few Task<T>'s here as
well in certain cases, but not yet all of them. We additionally save a
dictionary in the case where you have bound properties.

Hopefully these changes break the code into more discrete and sensible
units without multiple levels of indirection without abstraction.
- Main 'driver' code
- BindModel
- ActivateProperty
2016-05-13 08:12:14 -07:00
Ryan Nowak 4d63ffa879 Make ValueProvider creation lazy
We want this change to avoid MVC eagerly reading the form. This is good
for general perf and also for scenarios where you want read the body
yourself (large file uploads).

We DO have scenarios where you want to configure the value providers
per-request or also to change the limits on the value providers (form) so
it's worth keeping these around on the context.
2016-05-13 08:11:21 -07:00
Kiran Challa e483478415 Merge branch 'release' into dev 2016-05-12 09:35:33 -07:00
Ryan Nowak fb5d92bdc0 Change our cached task to a field
This makes it more inlinable and saves a volatile lookup on netstandard.
2016-05-11 18:09:21 -07:00
Ryan Nowak 04ffc4d2eb Clean up DiagnosticSource code in invoker 2016-05-11 17:41:03 -07:00
Kiran Challa d6a9068008 [Fixes #4616] Filter caching is too aggressive 2016-05-11 16:58:45 -07:00
Ryan Nowak 7bd297c395 Remove unused field 2016-05-11 16:48:55 -07:00
Kiran Challa 3c2bdfd368 Merge branch 'release' into dev 2016-05-03 12:29:33 -07:00
Doug Bunting e3db547011 Add `[Remote(routeName : "name")]` tests
- relates to #4445
- also relates to #4309 / fb07fee though restored and renamed files are slightly different
 - latest Unobtrusive version; copy just one file under `wwwroot`
- add JavaScript file and CDN links to enable manual testing of `[Remote]` tests in `BasicWebSite`
 - include renamed files for recreating the minimized JavaScript file manually
2016-05-03 12:25:00 -07:00
Kristian Hellang f4679fe74f Changed RequireHttpsAttribute to default to 302 instead of 301 2016-05-03 12:11:18 -07:00
David Obando 742a9e3f3b Reduce the number of allocations during model validation
When the service receives a model (say, via a POST message) MVC validates it to ensure the model is in a correct state. Validation currently incurs in many allocations that can be avoided. This tackles two of them:
  1. We're now caching the generic `GetEnumerator<T>` method infos generated on the fly during collection validation, and
  2. We're now only initializing `ModelErrorCollection` on demand.

The first one incurs in the additional allocation of 1 long-lived dictionary object, which will grow only to the amount of `Collection<T>` types used by the model being validated. This is expected to be a small to medium number.

The second change assumes that class `ModelStateEntry` isn't thread safe, as model validation isn't multithreaded.

This resolves #4434 and #4435.
2016-05-02 19:28:20 -07:00
Ryan Brandenburg c6a6aae15f Merge branch 'release' into dev 2016-05-02 16:52:29 -07:00
Ryan Brandenburg 3aa42617a4 Add transitive reference 2016-05-02 16:49:57 -07:00
Pranav K 3d494fd732 Merge branch 'release' into dev 2016-05-02 14:58:54 -07:00
Pranav K 36146a6139 Fix build warnings 2016-05-02 14:52:02 -07:00
Kiran Challa d30290c310 Merge branch 'release' into dev 2016-05-02 13:36:35 -07:00
Kiran Challa ad065892fd [Fixes #4575] Logging ArgumentOutOfRangeException 2016-05-02 13:16:08 -07:00
Doug Bunting f05f6d5bd2 Quick fix: Simplify `OrderUsingHtmlHelpers.cshtml` layout
- intent was to make HTML helper output close to the tag helper output but source got over-complicated
- the output files for `Order.cshtml` and `OrderUsingHtmlHelpers.cshtml` now differ only in attribute order
 - i.e. HTML helpers output attribute alphabetically while tag helpers output them in order added
2016-05-02 12:55:11 -07:00
jacalvar ad1375abdb Merge branch 'release' into dev 2016-05-02 12:54:05 -07:00
jacalvar 7b2fdcbfec Remove Microsoft.AspNetCore.Mvc.Dnx from NugetPackageVerifier.json 2016-05-02 12:53:47 -07:00
jacalvar c85c22282b Merge branch 'release' into dev 2016-05-02 12:26:37 -07:00
jacalvar 059ec0f353 [Fixes #4525] Get rid of DNX services 2016-05-02 12:16:08 -07:00
Pranav K 92408a5c22 Move samples to Entropy
Partial fix to #4449
2016-05-02 10:06:17 -07:00
Doug Bunting aa1afc0a8e Quick fix: Yes, MvcSandbox is a web project
- add a `web.config` file so VS recognizes this
2016-05-01 19:08:10 -07:00
Doug Bunting f8ca631be2 Remove use of protocol-relative URIs
- #4563
2016-04-30 22:48:12 -07:00
jacalvar 4d02a03658 Merge branch 'release' into dev 2016-04-30 16:21:38 -07:00
jacalvar 4d198f3d8f React to changes in razor tooling 2016-04-30 15:37:37 -07:00
Pranav K 0ff2f875d9 Avoid holding on to DependencyContext instance
Fixes #4527
2016-04-29 14:44:55 -07:00
mnltejaswini cba4d1dd0c [Perf] Reduce SelectListItem and other allocations when generating HTML for select lists
Fixes #3953
2016-04-29 11:58:02 -07:00
Stan 30ace9f35a [Fixes #4520] Fix typo in controller filename (#4532) 2016-04-28 12:06:11 -07:00
BrennanConroy fbd7110da0 Merge branch 'release' into dev 2016-04-27 18:38:50 -07:00
BrennanConroy df7be69e85 Remove references to UseDefaultHostConfiguration 2016-04-27 18:38:34 -07:00