Commit Graph

9 Commits

Author SHA1 Message Date
Ryan Nowak d8cc2b85d5 Adds ActionContext to Validation contexts
This change makes it possible to access the ActionContext/ActionDescriptor
from inside of validators and client validators.
2015-11-25 16:38:26 -08:00
Ryan Nowak a318c4599a API Review - Split up .Actions
Abstractions - Core MVC extensibility

Controllers - MVC implementations of .Abstractions and supporting
contracts

Infrastructure - General purpose support APIs. Metadata APIs that don't
fit clearly with a feature or with .Abstraction
2015-09-21 21:54:02 -07:00
Ryan Nowak 076ce6a8a1 Make ModelBindingResult a struct. 2015-09-03 12:52:50 -07:00
Ryan Nowak 229724c4ea Reorganize MVC namespaces 2015-09-01 22:28:33 -07:00
Harsh Gupta 386562c269 Enabling test for 2447, CancellationToken does not gets validated. 2015-06-01 12:41:34 -07:00
Doug Bunting e31eab0391 `ByteArrayModelBinder` should return `null` only when type is not matched
- #2456
- visible behaviours now match MVC 5
- prevent `CollectionModelBinder` from converting no value to `byte[0]`
- prevent `TypeConverterModelBinder` from converting empty value to `byte[] { '\0' }`

nit:
- remove additional delegates `ModelBindingTestHelper.GetOperationBindingContext()` calls
 - a few left despite #2625 cleanup
2015-06-01 12:20:17 -07:00
Harsh Gupta 88ac4b94e4 Fixing #2466, #2446.
The assumption is ModelState should have entries if
1. An error is explicitly added by a model binder.
2. There is validation error reported while validating the model.
3. There is value bound by the model binder.

With this change there should be no extra entry other than for the cases mentioned above.

Also enabling the integration test cases.
2015-05-15 12:27:41 -07:00
N. Taylor Mullen 64e726d2b2 Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
Harsh Gupta b5b37265e1 Simple ModelBinders and Simple ModelBinder Poco - 1
Covers simple scenario for each model binder.
Covers scenarios mixing a POCO model binder -> Simple Model binder.

This contains tests for
HeaderModel
ServicesModelBinder
CancellationTokenModelBinder
ByteArrayModelBinder
FormFileModelBinder

Part 2 Will contain similar tests for
FormCollectionModelBinder
BinderTypeBasedModelBinder
TypeConverterModelBinder
TypeMatchModelBinder
Any leftovers for BodyModelBinder
2015-04-28 14:13:36 -07:00