Commit Graph

2994 Commits

Author SHA1 Message Date
Ryan Nowak ef29749e72 Remove usage of `async void` in unit tests
Yes I know xUnit supports it, but it's non-standard and it shouldn't show
up anywhere in our codebase.
2016-05-20 15:07:48 -07:00
jacalvar 230a13d0e1 [Fixes #4633] Datetime? and DateTimeOffset? values on InputTagHelper are not rendered correctly. 2016-05-20 11:29:29 -07:00
jacalvar ee2a591d2c [Fixes #4655] Make comparisons in DefaultAssemblyPartDiscoveryProvider case insensitive 2016-05-20 11:22:55 -07:00
jacalvar a490cf13a6 [Fixes #4555] Assemblies with a transitive dependency to MVC are not included as part of the list of discovered assemblies 2016-05-20 11:18:34 -07:00
jacalvar b1054a28c7 [Fixes #4353] Cleanup application part discovery 2016-05-20 10:56:03 -07:00
Kiran Challa 93be3dee6e Fix FormTagHelper to set flag indicating generation of AntiforgeryToken
[Fixes #4595] Better error message with extraneous @Html.AntiforgeryToken
2016-05-20 04:29:01 -07:00
Kiran Challa 20a2e748ec Added ValueProviderFactories to ResourceFilterExecutingContext
This enables removing value provider factories from model binding(which is needed in some scenarios like large file uploads)
2016-05-20 04:15:07 -07:00
mnltejaswini df4eb283b2 [Perf] UrlHelper shares a single RouteValueDictionary across several calls to Action and RouteUrl methods 2016-05-19 16:15:46 -07:00
mnltejaswini d7ccea17ce [Perf] Refactoring ControllerActionInvoker to avoid coercing action method's return type to Task<object> for simple cases. Fixes #4539 2016-05-19 14:21:29 -07:00
Kiran Challa f7b2ee80fd [Fixes #4550] Add an Option to set the Razor view location formats 2016-05-19 14:04:33 -07:00
Pranav K 1de268d6a7 Remove DNX references from Microsoft.AspNetCore.Mvc.FunctionalTests
Fixes #4677
2016-05-19 12:09:19 -07:00
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