Commit Graph

9 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 98b3f055e1 Change ModelBinding to use a single pass 2015-08-31 11:58:53 -07:00
Ryan Nowak dadee80aa8 Add FieldName to model binding context
Adds a new property, FieldName, to ModelBindingContext. The FieldName is
the name of whatever code-element is being bound, regardless of what
model-prefix is in use.

This is needed for cases like the Header model binder. We always want to
use the property/parameter name and we don't care about model prefixes.
2015-08-31 08:10:03 -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
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