Commit Graph

1824 Commits

Author SHA1 Message Date
Pranav K ab76f743f4 Use dependency context from all application parts when compiling views
Fixes #4498
2016-05-24 10:28:51 -07:00
Ryan Nowak 27565c4e8d Fix broken query string binding test
This test was relying on the parsing behavior of QueryString, that it
would omit the key and value when the value is empty. The expectations
weren't consistent with other tests for 'empty' values.
2016-05-24 10:17:30 -07:00
Pranav K 69e029fc79 Update the namespace for Razor generated code to AspNetCore
Fixes #4476
2016-05-23 16:25:59 -07:00
Pranav K 8ab66ab5ce Fix resource generation to work with dotnet test 2016-05-23 15:55:14 -07:00
John Luo ff534da70f React to adding IsAvailable to ISession 2016-05-23 15:17:30 -07:00
Ryan Nowak d92b3ba2c6 Make ModelBindingContext.Result non-nullable
This change simplifies a bunch of code and fits more in line with the
current design of model binding.

Now, a model binder only has to do anything if it was successful.
'return' is enough to indicate failure.
2016-05-23 14:18:34 -07:00
Ryan Nowak 88c9ae6588 Remove Key from ModelBindingResult 2016-05-23 13:17:19 -07:00
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 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
Ryan Brandenburg 941da9264b Move ModelBindingHelper to Internal (#4664) 2016-05-18 16:52:43 -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
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 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
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
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
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
Pranav K 92408a5c22 Move samples to Entropy
Partial fix to #4449
2016-05-02 10:06:17 -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
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
Ajay Bhargav Baaskaran e74aa54d95 React to aspnet/Razor#738 2016-04-27 16:54:16 -07:00
Doug Bunting d8d2e54506 Remove extra options to manipulate `JsonSerializerSettings`
- #4339: remove non-recommended JSON formatter constructors
 - affects `JsonInputFormatter`, `JsonOutputFormatter`, `JsonPatchInputFormatter`
 - `JsonOutputFormatter` cleanup also impacts `JsonHelper`
 - rename and make `SerializerSettingsProvider` class public; use it as appropriate
- #4409: make `SerializerSetings` properties get-only and `protected`
 - affects `JsonInputFormatter`, `JsonOutputFormatter`

Recommended patterns:
- change `JsonSerializerSettings` values in `MvcJsonOptions` for almost all customizations
- find `JsonOutputFormatter` in `MvcOptions.OutputFormatters` when limiting per-result formatters
- start with `JsonSerializerSettingsProvider.CreateSerializerSettings()` when customizing a per-result formatter
2016-04-27 14:48:16 -07:00
Ryan Brandenburg 39f4b1fd91 Merge remote-tracking branch 'origin/release' into rybrande/dev 2016-04-26 10:18:48 -07:00
mnltejaswini 0788edbd4b [Perf] Cache the metadata for known type "object"
Fixes #4377
2016-04-25 13:03:52 -07:00
ryanbrandenburg e915f36748 Update samples and test sites to new formats 2016-04-25 12:09:40 -07:00