Commit Graph

1731 Commits

Author SHA1 Message Date
N. Taylor Mullen 12e4307f3a Add tests to account for aspnet/Razor#220.
- Added unit and functional test.
2015-05-15 12:13:15 -07:00
N. Taylor Mullen 247625dcab React to aspnet/Razor#220.
- Added the ability for the WriteTagHelperAsync in RazorPage.cs to understand minimized attributes.
2015-05-15 12:13:10 -07:00
Kiran Challa 6ef8be92ff [Fixes #2541] Use custom stream writer for Xml output formatters 2015-05-15 12:12:11 -07:00
Harsh Gupta 22f1881cc6 Restoring modelvalidation node. 2015-05-14 18:38:26 -07:00
Kirthi Krishnamraju 8b5223518f Fix 2224: [Jsonpatch]Added tests for custom converters on properties 2015-05-14 17:18:42 -07:00
Ajay Bhargav Baaskaran 39642761b1 Added overload to ViewComponent.Json to accept JsonSerializerSettings 2015-05-14 15:45:41 -07:00
Ryan Nowak 7767251dad Adding some deserialization to a test for SerializableError 2015-05-14 15:38:50 -07:00
Ryan Nowak cc4ee1068d Fix #2414 Part 2 - Add [DefaultValue(...)] support to the invoker for
action parameters
2015-05-14 13:58:02 -07:00
Ryan Nowak 2fc983b23a Fix for #2414 - Remove [DefaultValue] support from ModelBinding
This part of the change removes default value support from ModelBinding.

Updated some unit tests to verify that it does nothing in that case.
Deleted a functional test as it was pure duplication of another
(supported) case where the property has a pre-initialized value.
2015-05-13 20:03:23 -07:00
Hao Kung 1ea1cc4338 AuthorizeFilter should always set default identity 2015-05-13 16:39:35 -07:00
N. Taylor Mullen 8ec28463fc Update .travis.yml to use working version of mono.
- Non 3.12.0 versions cause unexpected end of file stream exception.
2015-05-13 16:34:20 -07:00
Ryan Nowak 90805fa827 Pass InputFormatters in OBC
This removes the need to use IScopedInstance<ActionBindingContext> to get
access to the formatters.
2015-05-13 16:02:34 -07:00
Eilon Lipton 4b1a708ba1 Merge pull request #2398 from henkmollema/fix-1743
Added new ValidationSummary overloads to sample
2015-05-13 15:15:36 -07:00
Kiran Challa 4bed2e6f2b [Fixes #2545] RedirectToRouteResult doesn't use RouteName property when calculating destination URL 2015-05-13 12:35:25 -07:00
Kirthi Krishnamraju da740cd6a8 fix #2535: Timezone test failure in Microsoft.AspNet.Mvc.Core.Tests 2015-05-13 10:06:26 -07:00
Hao Kung b2318bc471 React to security API changes 2015-05-12 15:12:06 -07:00
Kirthi Krishnamraju caa8ea44fb Fix #448: Support app-wide defaults for HTML helpers 2015-05-12 14:10:59 -07:00
Eilon Lipton ac230a78c1 Update Home master -> Home dev 2015-05-12 11:26:36 -07:00
Henk Mollema 8b1f8b9748 Added new ValidationSummary overloads to sample
Overview now shows every possible overload.

#1743
2015-05-12 20:20:34 +02:00
Ryan Nowak 4939181075 Fix #2528 - Revert formatter behavior for [Required]
This change removes the support in the DCS formatter to issue an error
message when [Required] is used on a value type.
2015-05-12 11:17:31 -07:00
Pranav K 13a3c0b931 Moving System.Security.Cryptography.Hashing.Algorithms to dnxcore50 node
to unbreak failing MusicStore dnu deploy.
2015-05-12 11:15:26 -07:00
Ryan Nowak 39fe063aee Fix #2330 - Reimagine *FormatterContext
This change simplifies InputFormatterContext/OutputFormatterContext by
swapping ActionContext for HttpContext.

This change is important especially for InputFormatterContext as it
decouples ModelState from ActionContext - allowing us to fix a
related bug where the _wrong_ ModelState can be passed in for a
TryUpdateModel operation.
2015-05-12 11:05:56 -07:00
Doug Bunting fcf7b15c64 Remove `FromBodyOnProperty_RequiredOnValueTypeSubProperty_AddsModelStateError`
- this integration test depends on the old `[Required]` special case
- #2388 explicitly removes that bahaviour so the test goes with it
2015-05-11 17:18:52 -07:00
James Newton-King de630754bf SerializerSettings refactor
Add SerializerSettings to MvcOptions and pass those options to the JsonInputFormatter and JsonOutputFormatter.
Remove custom contract resolver.

PR feedback
Pass JsonSerializerSettings to JsonPatchInputFormatter

PR feedback
Make DI JsonOutputFormatter formatter use MvcOptions SerializerSettings

Fix JsonPatchInputFormatter using null ContractResolver

Fix tests
2015-05-11 16:43:17 -07:00
Doug Bunting 3fbead0ce8 Get builds working better within VS (temporary fix?); disable pre-compilation
- remove `RazorPreCompilation.cs` files from all but the PrecompilationWebSite
- related to #2498 but not addressing that issue since pre-compilation is what that site is about
2015-05-11 16:14:04 -07:00
James Newton-King ab4cd5c4c4 Add JsonHelper for serializing JSON in views
- remove NotNull from JsonHelper Serialize
2015-05-11 16:01:08 -07:00
Kiran Challa 40794fcc33 Custom stream writer which avoids writing the BOM and does not flush or close the stream. 2015-05-11 13:27:05 -07:00
Ajay Bhargav Baaskaran d6012d4297 [Fixes #2506] Added overload to Controller.Json to accept JsonSerializerSettings 2015-05-11 12:36:45 -07:00
Pranav K 131096ff61 Adding relevant unit tests for MvcRazorCodeParser property name trimming 2015-05-11 12:20:49 -07:00
David Paquette ab4d2eec31 ImageTagHelper
An ImageTagHelper that supports cache busting by appending a file
version hash to the image src attribute
[Resolves #2249]

Code cleanup
2015-05-11 13:41:10 -05:00
Pranav K a591e53dc9 Removing unused TypeHelper method 2015-05-11 06:15:35 -07:00
Matthew Bonner 648f00c03d MINOR: Removed additional space from indentation of ReferenceAssemblies HashSet. 2015-05-09 22:00:46 +01:00
Pranav K 320507604a Removing superfluous types and methods from Common. 2015-05-09 08:04:28 -07:00
Doug Bunting 61b76fd99f Use `ClosedGenericMatcher.ExtractGenericInterface()` from Common repo
- added in aspnet/Common@aae8e6e

nits:
- reorder dependencies alphabetically
- avoid `GetGenericArguments()` extension method with `ExtractGenericInterface()` return value
 - use `GenericTypeArguments`
- usual trailing whitespace auto-removals
2015-05-08 20:23:06 -07:00
Harsh Gupta 583277cceb Adding tests for ActionParameters and TryUpdateModel 2015-05-08 19:11:03 -07:00
Ryan Nowak 8a476b56d8 Part 2 of fix for #2248 - Support 'override' of attribute routes on action
methods

This change applies the 'override' semantic to attribute routes on virtual
methods.

A method override can either inherit attribute routes from a base
definition, or can replace them. It's not possible to inherit routes and
also add to them.
2015-05-08 17:05:50 -07:00
Ryan Nowak 46db71cfce Part 1 of fix for #2248 - Ambiguity when inheriting attribute routes
The change here is to make an attribute route defined on a base class
inherited only if no other routes were defined 'closer' to the controller
class.

To put another way, attribute routes can either be inherited or
overridden, you can't inherit + add your own.
2015-05-08 17:05:45 -07:00
Ryan Nowak 2b4702728d Fix #1910 - Review and improve docs for 'Order' properties 2015-05-08 14:31:32 -07:00
Ryan Nowak 0f6b2331ce Fix #2378 - Fully expand models in ApiExplorer
This change dramatically simplifies the parameter discovery logic in
DefaultApiDescriptionProvider. Instead of surfacing POCO objects as
parameters, we now fully expand every model.

The rationale is that we want to show every key/value that can be set by
the user and not force consumers of ApiDescription to do that themselves.

Tests are cleaned up to match the new behavior.
2015-05-08 11:53:38 -07:00
Chris R bd03142dab React to Http namespace changes. 2015-05-07 15:19:10 -07:00
Troy Dai ea717729c1 React to common package name change 2015-05-07 09:39:08 -07:00
Hao Kung 5804856fe2 React to security changes 2015-05-06 22:24:08 -07:00
Chris R 7f737246b1 React to QueryString API changes. 2015-05-06 15:20:40 -07:00
David Fowler 87776ae330 Sort dependencies 2015-05-06 10:25:14 -07:00
David Fowler 5cec601abe Fix MVC packages being broken on CoreCLR
- Mvc is currently broken on CoreCLR because it is
inheriting dependencies from Microsoft.AspNet.Mvc.Common but the resulting
dependency to Microsoft.AspNet.Mvc.Common is then erased at pack time.
This change moves the dependencies down and makes the shared package
only depend on System.Runtime.

#2507
2015-05-05 23:26:45 -07:00
Ajay Bhargav Baaskaran 0a7b2ac821 [Fixes #2491] RemoveRange handles attributes parameter safely 2015-05-05 14:14:23 -07:00
Kiran Challa c0ca6214c2 React to Caching api changes 2015-05-05 10:08:50 -07:00
Doug Bunting cde4f05d03 Remove ModelBinding project from Mvc.sln
- part of 9fded74 (ModelBinding merge) was undone in b5b3726 (Simple ModelBinders and Simple ModelBinder Poco - 1)
2015-05-04 14:58:58 -07:00
Kiran Challa 7e623258c0 Use strongly typed MediaTypeHeaderValue for content type in action results. 2015-05-04 14:06:58 -07:00
Ryan Nowak 38bd617778 CR feedback from 9fded74b15 2015-05-04 12:07:24 -07:00