Commit Graph

894 Commits

Author SHA1 Message Date
Doug Bunting 4d4686147f Let VS do its thing
- newline after BOM and slight reordering of Mvc.sln
- add `Service/Include` properties to some test .xproj files
 - also add BOM in a few cases
2015-03-28 14:41:40 -07:00
Kiran Challa e571f401c3 Enable a skipped test to run on coreclr 2015-03-26 23:57:35 -07:00
Kiran Challa e9d7bb2230 React to ElmLogger extension changes 2015-03-26 23:46:15 -07:00
anurse 5477458781 fix tests 2015-03-26 22:30:46 -07:00
Victor Hurdugaci 38eff2ddbc Change casing of the "compiler" folder 2015-03-26 16:39:35 -07:00
N. Taylor Mullen b0b0836395 Merge branch 'release' into dev 2015-03-26 15:02:53 -07:00
Ryan Nowak df1bd1f36c ModelMetadataIdentity cleanup
Adding Equals and GetHashCode implementations - the lack of these results
in a lot of boxing.

Removing dead code, not possible to create a model metadata for a
parameter anymore.
2015-03-26 13:14:51 -07:00
N. Taylor Mullen 9402f1485c Normalize paths for MvcRazorHost DecorateCodeBuilder's ChunkInheritanceUtility call.
- This solves tooling trying to resolve ChunkInheritanceUtility bits for chunks: Aka can't inherit `@using`, `@inject` etc. from _GlobalImport.cshtml
- Added test to validate paths are normalized for DecorateCodeBuilder.

#2271
2015-03-26 12:27:56 -07:00
Doug Bunting 1dafff4fb9 Reenable Core functional tests
- this reverts commit 2d304e5
2015-03-24 13:43:57 -07:00
Doug Bunting fc1017fba8 Quick fixes: Clean up test code
- remove useless `configuration` variables and `Configuration` instances
- remove "Review" code comment
 - unintentionally included in commit 4b5dd19
- reduce repeated code in `TestHelper` for functional tests
 - `CreateServer()` methods had duplicate code, an ambiguous match, and an odd order
- rename `GetTestConfiguration()` to `UseCultureReplacer()` in functional tests
2015-03-24 13:42:27 -07:00
Doug Bunting 9ac6ebd2b2 Refactor `IHtmlGenerator.GenerateSelect()` and address #2240
- add `IHtmlGenerator.GetCurrentValues()` method
 - bring together bits of `GenerateSelect()` and `UpdateSelectListItemsWithDefaultValue()`
 - get rid of ugly `out` parameter
 - also allows `<option/>` tag helpers to run before `<select/>` helper generation
- match `null` values and `SelectListItem`s with empty values
- match `enum` names correctly
- add doc comments for `IHtmlGenerator.GenerateSelect()` methods
2015-03-24 12:37:19 -07:00
sornaks 0e783ace58 Issue #2141 - Script & Link tag helpers should support generating cache-busting file version hash in URL. 2015-03-24 11:47:29 -07:00
KevinDockx 0462dd6be3 [JsonPatch]Rename SimpleObjectAdapter; Include statuscode in JsonPatchException 2015-03-24 11:24:53 -07:00
Doug Bunting 2d304e5da1 Disable Core functional tests (again)
- avoid System.Private.DataContractSerialization problem
2015-03-24 10:14:15 -07:00
Doug Bunting 28ca45e077 Quick fix: Correct invalid HTML in some of our tag helper-related views
- few end tags for void elements e.g. `</input>`
- fair number of self-closing flow elements e.g. `<label .../>`
- most-visible change is correction of `<textarea>` in tag helper sample
- no product code changes
2015-03-23 22:13:03 -07:00
sornaks 54c1fed254 Issue #1736 - Razor view searches in case-sensitive filesystems. 2015-03-23 18:02:35 -07:00
Ajay Bhargav Baaskaran 823e9f1516 [Fixes #2192] Remove enumerable types from excluded type in validation 2015-03-23 16:06:29 -07:00
Ryan Nowak 784021cf85 Fix ModelMetadata.IsRequired
The DataAnnotationsMetadataProvider was setting the bool? IsRequired, all of the
time instead of only setting it to true when we found a RequiredAttribute.
So we never actually executed the fallback logic here. Found
this while working on removing some reflection code from the validator,
and wanted to split it out because it's simple.
2015-03-23 15:32:43 -07:00
Kirthi Krishnamraju a5da5b3acd Removed reflection code; used JsonContract instead and added new JsonPatchInputFormatter 2015-03-23 14:46:54 -07:00
Kevin Dockx f1e1d8f4df Initial Json Patch check-in 2015-03-23 14:46:49 -07:00
Harsh Gupta 5818c0b5b7 Fixes #583 Generating a unique cookie name for an application. 2015-03-23 14:05:05 -07:00
ianhong c1eea5b3fa React to Should GetVirtualPath return PathString in Routing 2015-03-22 19:44:45 -07:00
N. Taylor Mullen 9ac346529c Add test to validate tooling path normalization.
- Tooling passes in rooted paths when asking for a RazorParser for a file. This was problematic when resolving inherited code trees and ultimately this commit tests that.

#2213
2015-03-22 13:56:30 -07:00
Doug Bunting 570b1e583a Add `Html.GetEnumSelectList()` helpers
- #438 part 2/2

nit: test `[Display]` that does not set `Name` in `DataAnnotationsMetadataProviderTest`
2015-03-22 12:40:44 -07:00
Kiran Challa 90773ab925 Enabled coreclr for functional tests and reverted back previous change to skipped tests.
- skipped a new test. This is a known issue that I have reported to the respective team.
- This also fixes #1987 : Investigate xml serializer test failures in Core CLR
2015-03-21 23:21:53 -07:00
Doug Bunting ec6f1907c5 Add USE_REAL_RESOURCES to easily test if `[Display]` usability has improved
- `[Display]` works only with `public` resources (classes and properties)
- also change `TestResources` to make `Resources` the single source of truth
2015-03-21 17:40:26 -07:00
Doug Bunting 7dd3afe3d1 Add `enum`-related details to `ModelMetadata`
- #438 part 1/2 and #2027 part 1/3

slight oddity in the XML docs
- unfortunately Roslyn seems to ignore `TypeInfo` being a subclass of `Type`

nit: use correct `warningsAsErrors` datatype in test project.json
2015-03-21 17:38:40 -07:00
Ajay Bhargav Baaskaran c62974d39b [Fixes #2179] Validation fix for supporting nested sections in layouts 2015-03-21 17:18:35 -07:00
Harsh Gupta adeb1ba194 Adding support for model binding specifically marked controller properties. 2015-03-20 17:37:09 -07:00
Ryan Nowak 29479895cd Fixing some inaccurate test names and comments
These tests had the wrong names and comments.
2015-03-20 15:36:50 -07:00
Ryan Nowak f5e7a69693 Updates to the extensibility for validator providers
This change removes reflection from validator providers, and instead
relies on cached metadata in in the modelmetadata.

In general this means that our MVPs don't need to cache anything, they
just look at the metadata and create what they need.

In the case of data-annotations, we update the model details provider to
add validation attributes to the modelmetadata. This would allow someone
to replace the DataAnnotationsValidatorProvider, but still use the
metadata in these attributes.

The change to the IModelValidatorProvider api (to use a context) is
intended to minimize allocations. Currently each validator provider needs
to return a list so you end up with N+1 lists (N validators + a final list
to compine them all). This change will let us just create the final list
(and a small context object). This is a very very high traffic API so it
seemed worth doing.

There's also some general massaging of namespaces and file locations.
2015-03-20 15:19:25 -07:00
Ryan Nowak 2b82ee0255 Refactor of ViewComponent extensibility
Adds ViewComponentDescriptor and caching (provider, collection,
collectionprovider).

Removes IViewComponentInvokerProvider, simplifies
IViewComponentInvokerFactory.
2015-03-20 13:39:54 -07:00
Doug Bunting 533474d07c Bind POCO model correctly; fallback to empty prefix despite exact name match
- #1865
- change `MutableObjectModelBinder` to ignore exact match in value providers
 - had an incorrect assumption: don't want exact model name to match since
   this binder supports only complex objects
 - also ignored `BinderModelName`, value provider filtering, et cetera
- reduces over-binding e.g. `[Required]` validation within missing properties

also add more tests of #2129 scenarios
2015-03-20 13:18:42 -07:00
Doug Bunting 94e326f953 `CompositeModelBinder.TryBind()` should return `null` more often
- #2129
- do not propagate results with `!IsModelSet`, allowing empty prefix fallback
- adjust `ComplexModelDtoModelBinder` to at least fake-bind all properties
 - default values not consistently picked up otherwise

nit: correct 2 test names in `KeyValuePairModelBinderTest`
2015-03-20 13:18:13 -07:00
Doug Bunting bcb2fa6ba2 Avoid exceptions in `ActionFilterController`
- fix typo in commit 51e7812
2015-03-20 13:02:42 -07:00
Doug Bunting 64c8a6fa40 Clean up `ModelBindingResult` constructor calls and related comments
- use named parameters more often
 - add more comments about returned `ModelBindingResult`
 - clean up `ModelBindingResult` doc comments
 - cleanup `using`s

Nits:
- cleanup trailing whitespace
- change `retVal` -> `result` in `KeyValuePairModelBinderTest`
2015-03-20 13:02:23 -07:00
Praburaj 88aa820b9f Reacting to File System changes
IFileProvider is becoming readonly.
2015-03-20 11:41:41 -07:00
ianhong 1c6800beab List of assembly names in DefaultAssemblyProvider needs to be kept up to date 2015-03-20 11:38:43 -07:00
Ajay Bhargav Baaskaran e2058905ec TagHelpers attribute targeting - part 2 2015-03-20 11:26:21 -07:00
Ajay Bhargav Baaskaran bfdeda797d TagHelpers attribute targeting - part 1 2015-03-20 11:15:40 -07:00
Kirthi Krishnamraju 2b246e7acc Fix for #1694 issue : Removed prefix for ModelState keys for FromBody parameters 2015-03-20 10:41:06 -07:00
ianhong 27bdec40a6 React to #154 (Routing - adding data token to GetVirtualPath) 2015-03-19 21:51:14 -07:00
Kiran Challa 9a6f8b392d [Fixes #852] XmlDictionaryReader.CreateTextReader overload which supports Encoding is missing 2015-03-19 17:33:20 -07:00
Harsh Gupta ac908d405e Removing ModelMetadataProvider.GetModelMetadataForParameters 2015-03-19 16:42:54 -07:00
Ajay Bhargav Baaskaran d166517dd6 React to aspnet/Razor#169 changes 2015-03-19 15:58:00 -07:00
Ajay Bhargav Baaskaran 9c1e2f54a5 [Fixes #2157] Added additional functional tests for TempData 2015-03-19 15:55:23 -07:00
Kiran Challa ab31be20ed Fix tests to work on CoreClr (this does not fix the Xml tests failures) 2015-03-19 11:52:29 -07:00
Hao Kung 4b5dd199ca React to hosting changes 2015-03-19 11:07:25 -07:00
Harsh Gupta 015edefa96 Cors Support in MVC. 2015-03-18 19:37:00 -07:00
Kiran Challa ee4ffea294 [Fixes #2190] Remove GetSupportedContentTypes method from IOutputFormatter and move to a separate metadata interface 2015-03-18 16:13:14 -07:00