Commit Graph

2914 Commits

Author SHA1 Message Date
Crystal Qian e51a118a9d Added consistent model property to view result variants (#4901)
* Added consistent model property/tests to ViewResult, PartialViewResult, ViewComponentResult. This resolves #4813.

* Removed unnecessary model asserts

* Removed redundant model checking
2016-06-28 09:38:37 -07:00
Crystal Qian c319ae51a5 Changed min/max parameter order in StringLengthAttributeAdapter (#4899)
Changed min/max parameter order in StringLengthAttributeAdapter. This fixes #4864.
2016-06-27 10:21:50 -07:00
Pranav K 72dbda8804 Update to 1.0.1 version 2016-06-24 09:40:03 -07:00
Crystal Qian dad6374258 Revert "Changed min/max parameter order in StringLengthAttributeAdapter"
This reverts commit d19765802b.
2016-06-22 15:34:53 -07:00
Crystal Qian d19765802b Changed min/max parameter order in StringLengthAttributeAdapter 2016-06-22 15:33:33 -07:00
Doug Bunting f8c7f1ab78 Add more tests using `[ViewComponent(Name = "...")]`
- #4851
2016-06-19 13:52:59 -07:00
Shahriar Gholami 94fa34ca41 TempData convenience property added to ViewComponent (#4873)
* TempData convenience property added to ViewComponent

 #4728

* PR feedback
2016-06-17 10:15:50 -07:00
Pranav K cd7954a164 Updating to dev versions 2016-06-16 10:40:11 -07:00
jacalvar 5e04d95f2a Merge branch 'release' into dev 2016-06-15 15:12:24 -07:00
jacalvar 70af8cf79e Update Json.NET to 9.0.1 2016-06-15 15:11:56 -07:00
Pranav K d5d9559c8d Merge branch 'release' into dev 2016-06-14 16:29:42 -07:00
Pranav K cd33c4e908 Updating to release. 2016-06-14 16:23:18 -07:00
N. Taylor Mullen 8499e3d6bb Remove direct Microsoft.NETCore.Platforms dependency.
- Microsoft.NETCore.App now pulls this package in.

aspnet/Coherence-Signed#344
2016-06-13 15:30:27 -07:00
N. Taylor Mullen 0501531ec4 React to namespace changes in Razor.
aspnet/Razor#779
2016-06-13 11:22:56 -07:00
Doug Bunting 68974b2d1f Add tests covering more JSON serialization cases
- #4844
2016-06-10 15:25:53 -07:00
Doug Bunting b5a6303bb6 Address more PR comments 2016-06-10 14:49:49 -07:00
Doug Bunting 3a6541af10 Address PR comments 2016-06-10 14:26:14 -07:00
Doug Bunting 1f6bbf9967 Add doc comments for `public` attributes
- #4641
2016-06-10 14:26:14 -07:00
Kiran Challa a2feeab545 Changed the form tag helpers execution order to be more explicit.
[Fixes #4824] Fix Travis failure for test Microsoft.AspNetCore.Mvc.FunctionalTests.TagHelpersTest.ReregisteringAntiforgeryTokenInsideFormTagHelper_DoesNotAddDuplicateAntiforgeryTokenFields
2016-06-10 11:27:48 -07:00
Pranav Krishnamoorthy 55e9adf84d Generate portable pdbs in coreclr 2016-06-09 17:12:24 -07:00
Ryan Brandenburg 5339a3e0ce Add ExceptionHandled to ExceptionContext (#4825) 2016-06-09 15:22:11 -07:00
Pranav K 8c8fd6446b Use regular PDBs on full desktop when possible
Add a test to verify exceptions thrown from views is pretty printed by diagnostics middleware

Fixes https://github.com/aspnet/Diagnostics/issues/293
Fixes #4737
2016-06-09 14:59:38 -07:00
Ryan Nowak a8142b8858 Fix #4614 - update IModelBinder docs 2016-06-09 14:21:07 -07:00
Kiran Challa f1982bd987 Suppress default status code response type in api descriptions when explicit response types have been provided
[Fixes #4823] How to override the default (200) status code with ProducesResponseType
2016-06-09 12:07:52 -07:00
Doug Bunting 62803d5979 Serialize JSON using camel case by default
- #4283
- update `JsonSerializerSettingsProvider` to choose the `CamelCaseNamingStrategy`
2016-06-09 11:58:23 -07:00
Ryan Nowak 31ec88526a Fix #4801 Rename ValidationExcludeFilter
'ValidationExcludeFilter' -> 'SuppressChildValidationMetadataProvider'

Also moved to .ModelBinding for improved discoverability. There aren't
many reasons user code would have a using for .Validation.
2016-06-09 10:51:31 -07:00
Ryan Nowak baf0b6a5c7 Fix #4803 - Move some types internal
Moves IControllerArgumentBinder and IControllerPropertyActivator into
.Internal. Also renames ControllerArgumentBinder ->
DefaultControllerArgumentBinder for consistency with other controller
extensibility types.

We don't think these are 100% baked for our long term maintenance of the
product, and want to reserve the ability to make changes in the future.
2016-06-09 09:36:15 -07:00
jacalvar 22232bc1bf Fix incorrect import 2016-06-09 01:14:08 -07:00
jacalvar 0c2189e473 Remove unncessary imports 2016-06-09 00:35:44 -07:00
Doug Bunting aecfe778ee Improve handling of custom `ValidationAttribute`s and their `ValidationResult`s
- #3595 sub-items 2 through 4
- handle an indexer name in `ValidationResult.MemberNames`
 - aligns `ModelNames.CreatePropertyModelName()` with `TemplateInfo.GetFullHtmlFieldName()`
- handle multiple elements in `ValidationResult.MemberNames`
 - later elements previously ignored
- set `ValidationContext.MemberName` to `null` when no property name is available
 - using type name for a member name was just wrong
2016-06-08 12:05:01 -07:00
Doug Bunting 14f68b6168 Merge pull request #4623 from tuespetre/conneg
Alter content negotiation algorithm
2016-06-08 09:58:36 -07:00
Derek Gray 5a3875ea72 Alter content negotiation algorithm so that it can be configured (via
MvcOptions) to always respect an explicit Accept header. Fixes #4612.
2016-06-07 16:12:36 -05:00
Ryan Nowak 2e2784aa3d [Design] Split up MvcRouteHandler
This change splits up the conventional routing path from the attribute
routing path *inside* routing, instead of inside `MvcRouteHandler`. Each
attribute route group now gets its own instance of
`MvcAttributeRouteHandler` which just knows about the actions it can
reach.

This removes the concept of a route-group-token and removes the lookup
table entirely for attribute routing. This also means that the
`DefaultHandler` on `IRouteBuilder` will not be used for attribute routes,
which we are OK with for 1.0.0.

The action selector's functionality is now split into two methods. We
think this is OK for 1.0.0 because any customization of `IActionSelector`
up to now had to implement virtually the same policy as ours in order to
work with attribute routing. It should now be possible to customize the
selector in a meaningful way without interfering with attribute routing.
2016-06-07 08:12:47 -07:00
jacalvar 62748b9471 Update Json.NET to 9.0.1-beta1 2016-06-06 21:49:39 -07:00
Ryan Nowak 78c130d226 Fix for #4666 - reduce modelbinders created
This change to ModelBinderFactory makes the caching much more aggressive,
by caching all non-root binders. There's some trickiness here around
making sure we have the right behavior when all providers return null. See
the tests and comments.

I also kept the change I made for a temporary workaround to use a
dictionary rather than a "stack" for cycle breaking.  This seems like an
overall improvement in clarity.
2016-06-06 09:01:51 -07:00
Hao Kung c15cf49a73 React to AuthZ API change 2016-06-03 13:30:53 -07:00
Derek Gray 53b890aab5 Fix filename for DefaultPropertyFilterProvider 2016-06-02 14:56:34 -05:00
Derek Gray 5f36adbee3 Fix filename for ModelValidatorProviderContext (fixes #4798) 2016-06-02 14:34:33 -05:00
N. Taylor Mullen 51c285574b Add `AdditionalCompilationReferences` option to `RazorViewEngineOptions`.
- `AdditionalCompilationReferences` is a purely additive option to add `MetadataReference` instances to be used for Razor compilation.
- Added a test to validate the compilation references get combined with the `ApplicationPartManager`s metadata references.

#4497
2016-06-01 16:32:46 -07:00
mnltejaswini 659cdc3364 React to aspnet/Razor#765. 2016-06-01 11:05:13 -07:00
jacalvar ed8c744041 [Fixes #4218] Adds a comment justifying the use of service locator in this case 2016-05-31 23:59:31 -07:00
jacalvar 4b5df98bc3 [Fixes #4224] Remove use of service locator on ViewExecutor 2016-05-31 23:39:22 -07:00
jacalvar 6a6d2e0d9f [Fixes #4506] Move and rename ActionDescriptor.Name to ControllerActionDescriptor.ActionName 2016-05-31 23:13:20 -07:00
jacalvar 5f4ca4fa66 [Fixes #4223] Added a facade for ViewComponentResult 2016-05-31 22:47:33 -07:00
jacalvar 8493064fe5 [Fixes #4207] Review IActionResult classes and add facades as necessary.
* Moved FileResults to use executor façades
* Changed redirect result types to use executor façades.
2016-05-31 22:46:18 -07:00
Hao Kung 13a3bbaeb6 Update AuthZ test 2016-05-31 17:16:47 -07:00
Ajay Bhargav Baaskaran 283573d6c9 [Fixes #4291] Simplified MvcRouteHandler code 2016-05-31 15:02:14 -07:00
Hao Kung c7a46e4caf AuthPolicy should use IPolicyProvider 2016-05-31 13:47:58 -07:00
Doug Bunting e63f094a5f Use type metadata for `ModelBinderProviderContext.BindingInfo`
- #4652
- previously ignored for top-level models
- `ModelBinderProviderContext.BindingInfo` is now never `null`
- similarly, use type metadata (as well as parameter info) for `ModelBindingContext.BinderModelName`
 - previously ignored when overridden in `ControllerArgumentBinder`
2016-05-27 23:00:29 -07:00
Cesar Blum Silveira 9963359087 Fix OSX build on Travis. 2016-05-27 14:54:16 -07:00