- #3482 - see new tests; many failed without fixes in the product code - add support for binding `IFormFileCollection` properties - make `FormFileModelBinder` / `HeaderModelBinder` collection handling consistent w/ `GenericModelBinder`++ - see also dupe bug #4129 which describes some of the prior inconsistencies - add checks around creating collections and leaving non-top-level collections `null` (not empty) - move smarts down to `ModelBindingHelper.GetCompatibleCollection<T>()` (was `ConvertValuesToCollectionType<T>()`) - add `ModelBindingHelper.CanGetCompatibleCollection()` - add fallback for cases like `public IEnumerable<T> Property { get; set; } = new T[0];` - #4193 - allow `Exception`s while activating collections to propagate - part of #4181 - `CollectionModelBinder` no longer creates an instance to check if it can create an instance - not a complete fix since it still creates unnecessary intermediate lists nits: - correct a few existing test names since nothing is not the same as `ModelBindingResult.Failed()` - remove a couple of unnecessary `return` statements - correct stale "optimized" comments - explicit `(string)` |
||
|---|---|---|
| .. | ||
| Metadata | ||
| Validation | ||
| ArrayModelBinderTest.cs | ||
| BinderTypeBasedModelBinderModelBinderTest.cs | ||
| BindingSourceValueProviderTest.cs | ||
| BodyModelBinderTests.cs | ||
| ByteArrayModelBinderTests.cs | ||
| CancellationTokenModelBinderTests.cs | ||
| CollectionModelBinderTest.cs | ||
| CompositeModelBinderTest.cs | ||
| CompositeValueProviderTest.cs | ||
| DefaultModelBindingContextTest.cs | ||
| DictionaryModelBinderTest.cs | ||
| EnumerableValueProviderTest.cs | ||
| FormCollectionModelBinderTest.cs | ||
| FormFileModelBinderTest.cs | ||
| FormValueProviderFactoryTest.cs | ||
| FormValueProviderTest.cs | ||
| HeaderModelBinderTests.cs | ||
| JQueryFormValueProviderFactoryTest.cs | ||
| JQueryFormValueProviderTest.cs | ||
| KeyValuePairModelBinderTest.cs | ||
| ModelBindingHelperTest.cs | ||
| ModelBindingResultTest.cs | ||
| MutableObjectModelBinderTest.cs | ||
| QueryStringValueProviderFactoryTest.cs | ||
| QueryStringValueProviderTest.cs | ||
| RouteValueProviderTests.cs | ||
| ServicesModelBinderTest.cs | ||
| SimpleTypeModelBinderTest.cs | ||
| SimpleValueProvider.cs | ||
| StubModelBinder.cs | ||
| TestValueProvider.cs | ||
| UnsupportedContentTypeFilterTest.cs | ||