- add `IHtmlHelper<T>` and `ICanHasViewContext`
- adjust `HtmlHelper` and `HtmlHelper<T>` to match
- throw if `ViewContext` accessed prior to `Contextualize` call
- XML comments (from old world) all around
Note
- no current need for an `HtmlHelper` copy constructor or `Clone()` method
- expect recursion code to get another injected `IHtmlHelper<T>` and then
"contextualize" that instance with a new `ViewContext`
- start with `FormContext` and classes it needs from legacy world
- FYI `ModelClientValidationRule` came from Web Pages; the rest from MVC
Cleanup and make files compile in new world
- remove `FormContext.GetJsonValidationMetadata` method; will file an
issue to revive this using Json.NET
- don't store `FormContext` in the `HttpContext`, no longer have child
actions
- do `null` checks in setters, not getters (minor perf improvement)
- fix namespaces and usings
- wrap long lines; use `[NotNull]`; no copyright notice
- use explicit comparers for dictionaries
- add XML comment for odd `ModelClientValidationRule.ValidationType`
property
- Collection -> List
1. Adding scripts to self host & custom host Music store
2. Updating readme
3. Cleanup some helper classes that are not necessary.
4. Adding error page middleware for diagnostics.
5. Flipping the switch to run helios on "K" by default.
Compared to legacy MVC:
- correct usings and namespace
- remove `GetFullHtmlFieldId` method; depends on `HtmlHelper` method that
can't be static
- String -> string
- remove reference to a legacy bug
- convert internal `VisitedObjects` property to public `AddVisited()` method
Further cleanup
- remove explicit backing fields for remaining properties
- add copy constructor to replace code distributed around legacy MVC
- don't "combine and trim" in `GetFullHtmlFieldName()`
This was causing intellisense failures in VS. It looks like the
commandline is able to accidentally pick up the compatability extensions
from the model binding assembly, but this is not the case in VS.
Changed this code not to rely on compatability extensions.
We'll need to access the accepted values to do proper link generation, so
separating this process out into 2 parts.
Also moving defaults into the TemplateBinder because they are conceptually
part of the route, not part of the request. I'll do the same for
TemplateMatcher soon, but it's a big change and worth separating.
This doesn't add any new extensibility, and will likely change again in
the future when we add extensibility. For now this is a stopgap to reduce
duplication between JsonResult and JsonViewComponentResult.
We'll create a scoped service provider if the middleware that does it
isn't there.
We resolve all of our stuff from the scoped service provider, allowing
users to plug in any scoped things they want.
Ported UrlHelper to be a scoped service.
- move `DynamicObject` derivation up to new `DynamicViewData` class, fixing [WebFx-169](http://projectk-tc:8080/browse/WEBFX-169)
- avoid direct `_data` lookup in previous `TryGetMember()`, fixing [#118](https://github.com/aspnet/WebFx/issues/118)
- rename ViewData -> ViewDataDictionary
Also
- flesh out `IDictionary<string, object>` implementation in `ViewData`
- provide `ViewData` copy constructor that allows TModel to change
- remove `TryGetIndex()` and `TrySetIndex()` implementations; use `ViewData[]` instead
- restore `ViewContext.ViewBag` from legacy MVC
Swapping context to use OnModelCreating & OnConfiguring now that models
are cached
Adding some [Required] annotations to properties that are really
required in the domain model
Renaming Cart => CartItem because that's what it really is :)
Allowing database to hold some null data now that we can materialize it
(although we can't save it yet)