Commit Graph

10 Commits

Author SHA1 Message Date
Ryan Nowak 0832365ec2 Adds ActionContext to OperationBindingContext
This change makes it possible to access the ActionContext/ActionDescriptor
from inside of modelbinding.
2015-11-25 15:17:09 -08:00
Ryan Nowak 8a502dbe5d Rewrite of validation 2015-09-25 16:56:42 -07:00
Ryan Nowak 382c9ab86a Test Cleanup: Fix Assert.NotNulls with ModelBindingResult 2015-09-07 17:15:31 -07:00
Ryan Nowak 076ce6a8a1 Make ModelBindingResult a struct. 2015-09-03 12:52:50 -07:00
Ryan Nowak 6d365e9a32 Make ValueProviderResult a string-ish struct 2015-08-21 11:02:40 -07:00
Doug Bunting 83a559c28c Add `ModelValidationNode`s consistently
- #2633
- do not leave `ModelBindingResult.ValidationNode` as `null` when we hit the `null` `RawValue` special case
 - move two bits of code together to make the special case more obvious
- add `ModelValidationNode` (that suppresses validation) when `HttpRequestMessageModelBinder` is successful
 - also suppress validation of `HttpRequestMEssage` properties
- suppress validation in `CancellationTokenModelBinder`, `FormCollectionModelBinder`, `FormCollectionModelBinder`
- do not create a `ModelValidationNode` when validation fails in `TypeConverterModelBinder`

nits:
- improve some doc comments
- add a quick `HttpRequestMessageModelBinderTest`
2015-08-11 08:30:29 -07:00
Doug Bunting 26795bd4b5 Correct test expectations
- use valid `multipart/form-data` content type; include a `boundary`
- correct expectations of `FormCollection` model binder's operation
 - restore tests actually skipped for either of the above reasons
- add more tests with `ModelBindingResult.Model==null` and both `IsModelSet` values

#### Remove test references to Won't Fix bug #2473
- restore #2473 tests; update test expectations
- expect `null` composite results whenever binding fails

#### Restore test skipped due to "#2646"
- that issue does not exist; was likely #2466 or similar fixed bug

#### Rename model binding tests that still mention ReturnsFalse or ReturnsTrue

#### Minor src changes
- remove unused variable and unnecessary nesting in `DefaultControllerActionArgumentBinder`
- remove dangling mention of `[DefaultValue]` in `ComplexModelDtoModelBinder`

#### nits:
- remove empty delegates from some `GetOperationBindingContext` calls; `null` fine
- do some `using` cleanup
- combine two test methods in `KeyValuePairModelBinderTest`
- name a few more arguments
2015-06-01 12:15:39 -07:00
Chris R bd03142dab React to Http namespace changes. 2015-05-07 15:19:10 -07:00
N. Taylor Mullen 64e726d2b2 Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
Ryan Nowak 9fded74b15 Merging ModelBinding into Mvc.Core 2015-04-27 02:10:37 -07:00