Commit Graph

2923 Commits

Author SHA1 Message Date
Pranav K ccff37126f Removing extra imports from projects 2016-07-06 08:59:58 -07:00
Pranav K 222165e145 Updating to RTM builds of xunit and Moq (#4946) 2016-07-05 20:58:16 -07:00
Medeni Baykal 4fe758240f Added `ViewResultTest`s. (#4939)
* Added `ViewResultTest`s.
* Fixed the namespace and folder of `PartialViewResultTest `; and some minor fixes.
2016-07-05 15:25:20 -07:00
Eilon Lipton a5f9055306 Merge pull request #4966 from ivaylokenov/patch-1
Added community project in the README.md
2016-07-05 15:08:40 -07:00
Ryan Nowak 3ed0d01eae Fix #4929 - Move IActionInvokerFactory from .Internal
Also added a wealth of doc comments to an area that's not currently super
well documented.
2016-07-05 13:18:34 -07:00
Ivaylo Kenov 0fec1424d5 Added community project in the README.md
Added MyTested.AspNetCore.Mvc as mentioned in #4905
2016-07-05 22:38:06 +03:00
Doug Bunting 15f25d569a Improve `IUrlHelper` and related doc comments
- #4245, #4507
2016-07-05 09:34:33 -07:00
Doug Bunting 42cea41737 Fail more gracefully when option collections cleared
- #4690
- move `ModelBindingMessageProvider` init from `DefaultBindingMetadataProvider` to `DefaultModelMetadata`
 - in addition to avoiding error cases, this removes some boilerplate
- add specific errors to `BodyModelBinderProvider`, `CompilerCache`, `CompositeViewEngine`, `ModelBinderFactory`,
  and `ObjectResultExecutor`
 - `DefaultRazorViewEngineFileProviderAccessor.FileProvider` now a `NullFileProvider` in empty case
2016-06-30 14:52:50 -07:00
Medeni Baykal a852352223 Fix for https://github.com/aspnet/Mvc/issues/4903. (#4907)
Fix for https://github.com/aspnet/Mvc/issues/4903.
- `HtmlHelperTextAreaTest` added
- fix up `HtmlHelperTextBoxTest`
2016-06-29 10:11:54 -07:00
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