- part 1/2 of #2294 - handle readonly non-`null` collections in relevant binders - `CollectionModelBinder.CopyToModel()` and `MutableObjectModelBinder.AddToProperty()` methods - handle read-only controller properties in `DefaultControllerActionArgumentBinder` - do not copy into arrays e.g. add `CopyToModel()` override in `ArrayModelBinder` - remove ability to set a private controller property - confirm `SetMethod.IsPublic` in `DefaultControllerActionArgumentBinder` - avoid NREs in `GetModel()` overrides Test handling of readonly collections - previous tests barely touched this scenario - also add more tests setting controller properties nits: - add missing `[NotNull]` attributes - add missing doc comments - consolidate a few `[Fact]`s into `[Theory]`s - simplify some wrapping; shorten a few lines - remove dead code in `DefaultControllerActionArgumentBinder` and `ControllerActionArgumentBinderTests` |
||
|---|---|---|
| .. | ||
| ArrayModelBinderTest.cs | ||
| BinderTypeBasedModelBinderModelBinderTest.cs | ||
| BindingSourceModelBinderTest.cs | ||
| BindingSourceValueProviderTest.cs | ||
| ByteArrayModelBinderTests.cs | ||
| CancellationTokenModelBinderTests.cs | ||
| CollectionModelBinderTest.cs | ||
| ComplexModelDtoTest.cs | ||
| CompositeModelBinderTest.cs | ||
| DictionaryModelBinderTest.cs | ||
| FormCollectionModelBinderTest.cs | ||
| FormFileModelBinderTest.cs | ||
| HeaderModelBinderTests.cs | ||
| KeyValuePairModelBinderTest.cs | ||
| ModelBindingContextTest.cs | ||
| ModelBindingResultTest.cs | ||
| MutableObjectModelBinderTest.cs | ||
| TypeConverterModelBinderTest.cs | ||