- wrong fix especially now that test encoders work as expected
- touch up `HtmlHelperTest` and `RazorViewTest` since test encoders are now consistent
- remove references to old `Microsoft.Extensions.WebEncoders.Testing` package
This reverts commit a9d5876cd9.
- but leave `FormTagHelperTest` and `ValidationMessageTagHelperTest` cleanup alone
nit: use `string.Empty` in `HtmlHelperLinkGenerationTest`
- Replaced Type.GetCustomAttribute<T> with Type.IsDefined where the
attribute instance is only used to check if it's defined, to increase
performance.
Resolves#3416
- #3227
- much of change is to tests, creating and passing `ModelMetadata`
- updated `InputFormatterContext` to make `ModelMetadata` available to `JsonInputFormatter`
- walk `ModelMetadata` tree to get information about property with an issue
- add missing `null` checks in `ModelStateDictionaryExtensions`
- #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
- 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.
- 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.