- copy over legacy MVC's `SelectExtensions`, `SelectListItem` and `SelectListGroup`
- plus expected `SelectList` and `MultiSelectList`
- fixup select HTML helpers to meet WebFx standards and work in new world
- usual stuff: `[NotNull]`, `var`, `String` -> `string`, long lines, ...
- remove `IDictionary<string, object> htmlAttributes` overloads
- move longest extension method overloads into correct classes / interfaces
- add `ViewDataEvaluator.Eval()` overload for an `object` container
- rename lower-level helpers to make purposes more obvious
- nit: move Raw() methods up from bottom of HtmlHelper.cs
- use `DropDownList[For]()` in MVC sample
- correct file and class names for some HH extensions
- three class names were correct but didn't match containing file
- three class and file names matched but didn't start with HtmlHelper
- clean up trailing whitespace and long lines in changed Extensions.cs files
- `HtmlHelperPartialAsyncExtensions`, `HtmlHelperRenderPartialAsyncExtensions`
and `HtmlHelperValidationExtensions` lacked some `[NotNull]` attributes
- merge extension files by concept
- Display / DisplayFor / DisplayForModel methods all into `HtmlHelperDisplayExtensions`
- Partial / RenderPartial methods all into `HtmlHelperPartialExtensions`
- use `IHtmlHelper<TModel>` everywhere
- add `CheckBox[For]()`, `Hidden[For]()`, `Password[For]()`, and
`RadioButton[For]()`
- also make `FormatValue()` visible to users, as it is in legacy MVC
- and spread the boxes out a bit in MyView 😺
- Remove runtime interface declarations and use
Microsoft.Net.Runtime.Interfaces package
- Made tests compile for net45 and made default
intellisense view net45 for unit tests since Moq
doesn't work
The fix here is to do some cleanup we've been planning to do for a while,
rather than flowing IUrlHelper and IComponentHelper as part of the
ViewContext, they now are just grabbed from the service provider.
This simplifies the code for invoking a view, and gets us closer to the
desired API surface of ViewContext
- came from Rendering but Core already had `ArgumentCannotBeNullOrEmpty`
- moved wording from "argument must not be" to "value cannot be"
Also make similar resources consistent in this repo
- adjust Razor's `ArgumentCannotBeNullOrEmpty` resource to use same wording
as Core, adding "The"
- update ModelBinding to also have `ArgumentCannotBeNullOrEmpty` and to use
it consistently with Core and Razor
- copy over from legacy MVC
- fixup namespaces, remove copyright notices, ...
- temporarily remove `RouteBeginForm() overloads
- move main components to `HtmlHelper` and declare in `IHtmlHelper<T>`
- change `UrlHelper` to avoid treating an existing dictionary as an object
- add `HtmlHelper.Createform()` factory
- use in MVC sample; move BeginForm / TextBox samples to a new row
Showcased a lot of the core pieces of DisplayFor in the sample. Some pieces are still missing such as DataType handling. The infrastructure is there to handle it in the TemplateRenderer but the model metadata providers do not construct the metadata with the data types.
Showcased a lot of the core pieces of DisplayFor in the sample. Some pieces are still missing such as DataType handling. The infrastructure is there to handle it in the TemplateRenderer but the model metadata providers do not construct the metadata with the data types.