- #2994
- Affects both HtmlHelper and TagHelper scenarios
- Checkboxes not enclosed in a form will generate inline hidden tags
- Added necessary properties to FormContext
- Added some functional and unit tests
- aspnet/Mvc#3138 part 2/2
- request's Content-Type header must be a subset of what an `IInputFormatter` can consume
- `[Consumes]` is similar
- what an `IOutputFormatter` produces must be a subset of the request's Accept header
- `FormatFilter` and `ObjectResult` are similar
- `ObjectResult` no longer falls back to `Content-Type` header if no `Accept` value is acceptable
- left `WebApiCompatShim` code alone for consistency with down-level `System.Net.Http.Formatting`
- correct tests to match new behaviour
- do not test `Accept` values containing a `charset` parameter; that case is not valid
WIP:
- four test failures; something about comparing media types w/ charset included
- why do some localization tests fail in VS?
nits:
- add `InputFormatterTests`
- add / update comments and doc comments
- correct xUnit attributes in `ActionResultTest`; odd it doesn't show up in command-line runs
- test `[FromServices]` for a defined type without a `BinderModelName`
- test `[FromServices]` for a service not available in DI
- test `[FromServices]` for `IEnumerable<TService>` properties
nit: correct name of `ServicesModelBinderTest` to match the model binder class
Just some small cleanup. Did a search and all of our other custom List-ish
things inherit either Collection<T> or ReadOnlyCollection<T>.
Still no good solution for dictionaries.
- Make ViewExecutor a service
- Add facades for ViewResult/PartialViewResult
- Add eventing for ViewFound/NotFound in PartialViewResult
- Add eventing around view execution
- Cleanup of some various eventing & our tests code
This change fixes call sites on the main request path for a simple site
(model binding, validation, views) that allocate boxed list enumerators.
Some cases aren't addressed by this change because the fix is too invasive
or requires changing an important contract to take IList instead of
IEnumerable. Will follow up on those case by case in order of importance.
- #2969
- add `ModelBindingMessages` for configuration and `IBindingMetadataProvider` overrides
- use `interface` to avoid `new` oddities when adding a setter to an `abstract` property
- add `IModelBindingMessages` to `ModelMetadata` for use in rest of the product code
- plumb the various bits through the system
- add integration tests using a custom `IBindingMetadataProvider`s to override messages
nits:
- remove unused resources
- use `AttemptedValue` and not `model` in `SimpleTypeModelBinder`
This change works around two mono issues that are blocking travis. I'd
like to have tests skip instead, but unfortunately that would mean not
running any validation tests on mono so this seems better.
- RuntimeHelpers.GetHashCode will sometimes crash the runtime
- PropertyHelper sometimes returns throws null-ref