- Added generic add model error and remove extensions for
ModelStateDictionary, to avoid using hard coded strings then specifying
model state dictionary keys.
- Added generic removal all extension for ModelStateDictionary, to
support removing all the model state keys for given expression.
aspnet/Mvc#3164
This solves a perf issue for views which produce content that is smaller
than the buffer size of HttpResponseStreamWriter. In this case, the writer
ends up synchronously writing to the Response as part of Dispose which
affects perf.
This change makes ViewComponentResult respect an existing Content-Type
setting on the HttpResponse. Code is very similar to the code in
ViewExector, and includes the same quirks.
Abstractions - Core MVC extensibility
Controllers - MVC implementations of .Abstractions and supporting
contracts
Infrastructure - General purpose support APIs. Metadata APIs that don't
fit clearly with a feature or with .Abstraction
[FromServices] requires modelbinding to run for each of these four
properties, which allocates a lot, and ultimately just ends up calling
GetRequiredService in the end.
Also, retrieving these services is now lazy, which should be very
beneficial as few of them aren't used often.
We don't want these extensions methods defined in a wierd namespace, it's
straightforward and future-proof to just make these strongly-typed
collections.
- avoid warning when building Microsoft.AspNet.Mvc.FunctionalTests project
- now consistent w/ other web sites in this repo
- all but MvcMinimalSample.Web and that isn't used in functional tests
- #2722
- make communication of errors from formatters to `BodyModelBinder` explicit
- `JsonInputFormatter` now adds errors to `ModelStateDictionary` with correct key
- change `InputFormatter.SelectCharacterEncoding()` to add an error and return `null` when it fails
- one less `Exception` case and removes some duplicate code
nits:
- improve some doc comments (more `<inheritdoc/>`, `<paramref/>` and `<see/>`)
- add another two `BodyValidationIntegrationTests` tests
Improves authoring experience when using TagBuilder by taking advantage of
IHtmlContentBuilder an its extension methods.
TagBuilder.InnerHtml is no longer settable.