Commit Graph

2902 Commits

Author SHA1 Message Date
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
N. Taylor Mullen cfd58f1747 React to aspnet/Razor#705
- Updated `ScriptTagHelper` and `LinkTagHelper` to maintain their quotes on generated script tags.
- Removed `TagHelperOutputExtensions`. It's no longer needed.
- We no longer string replace quotes directly. We rely on encoding and the initial representation of an attribute to ensure quotes don't break generated attributes.
- Updated tests.
2016-05-27 12:00:01 -07:00
John Luo 5eed7b9b88 React to updated CoreCLR packages
https://github.com/aspnet/Coherence/issues/97
2016-05-26 18:31:05 -07:00
Pranav K bb226aef6b Update Mvc.Core and dependencies to netstandard1.6 2016-05-26 16:52:04 -07:00
Michiel Post b6794ab1b7 Fixed null reference on ModelStateDictionary.ChildNodes when calling Clear 2016-05-26 16:12:49 -07:00
Pranav K abf9319e6c Modify test to look for assembly names rather than absolute paths
This workaround an issue \ bug with the results returned by DependencyContext where
the path uses a mix of forward and back slashes which causes comparison with Assembly.Location that only
uses forward slashes to fail.
2016-05-26 14:49:37 -07:00
Shahriar Gholami 42dd4499e0 Fixed a bug in TagBuilder when attribute value is null
#4710
2016-05-26 11:04:32 -07:00
Pranav K 5d72a7f747 Modify ICompilationLibrariesProvider to return a sequence of reference path
Fixes #4738
2016-05-25 16:20:23 -07:00
Pranav K 9acd0f578c Remove IDisposable contract from IMvcRazorHost
Fixes #4709
2016-05-25 14:43:12 -07:00
Ajay Bhargav Baaskaran 3d0f436a06 [Fixes #4294] TypeActivate MvcRouteHandler 2016-05-25 12:57:16 -07:00
mnltejaswini b96851ec20 [Perf] Avoid ViewBuffers for writing bound TagHelper attribute values. Fixes aspnet/Razor#717 2016-05-25 12:14:26 -07:00
Hao Kung f54a964815 AuthZFilter should call into Service more 2016-05-24 14:42:54 -07:00
Pranav K 15f113ddb1 Remove IControllerTypeProvider 2016-05-24 14:36:02 -07:00