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
Modified ModelState to only ever be created on the ActionContext and then plumbed/exposed it on ViewData and Controller. This will enable: ActionFilterContext's will have access to ModelState via its ActionContext member, allow HTMLHelpers to access ModelState via ViewData, and unify the locations of "source" model state. In the old world we used to copy/replace/instantiate new model state all over unnecessarily.
- demonstrate `ModelMetadata` is available in a view
Also
- simplify `View()` overloads in `Controller`, pending #110 decisions
- make `Model` in `RazorView<T>` readonly
The changes include:
1. Action executor changes required for supporting sync and async operations Taksk and Task
2. Adding test project for MVC core - This contains ActionExecutor Tests.
3. Also adding a resources file for MVC core project
1. Areas defined by the Area attribute
2. Areas are a routeconstraint on the actiondescriptor
3. Areas find pages through route values
Other changes:
1. Remove Path from ActionDescriptor - It doesn't make sense with this change
2. Add sample Area
- use Microsoft.AspNet.Mvc.Rendering namespace throughout assembly
Also
- move `IdAttributeDotReplacement` from `TagBuilder` to `HtmlHelper`
- remove commented-out code in `HtmlHelper`
- use `var` and `[NotNull]` more
- `String` -> `string`
- correct Resources references; add missing resources
This is as simple as modifying the base class to return task and await the ExecuteAsync method. Also added a piece to the sample project to verify functionality.
This follows a similar pattern to html helpers - a minimal basis interface
that performs the main functionality, and a set of extension methods that
make up the rich API.
- Now that services are being flowed through the entire stack
we can nuke the csc service and always use the roslyn based compilation for views
- The RoslynCompilationService is still very much a prototype but it's a good
step to see what other services might may or may not need to flow.
- Removed the PhysicalFileSystem construction from Mvc itself. This will come from
the hosting layer and is newed up temporarily in the PathBasedViewFactory itself.
* Modify ReflectedActionInvoker to model bind parameters
* Introduce IBodyReader for reading request bodies
* Introduce types for per-action-context specific binders, value providers
and body readers
- Flow the host service provider to MvcServices
- Use assembly neutral interfaces to access host services
- Added RoslynCompilationService to Microsoft.AspNet.Mvc.Razor
- Modified self host sample as helios needs to be updated to flow more services
Renamed actiondescriptor to routecontext, because action selection didn't happen yet.
Need to add actiondescriptors back and modify RazorViewEngine to use the right thing.
Scan only relevant (non skipped) assemblies
FinalizeSetup point, to make "stuff" immutable
Support controllers under any namespace
support customizing controller discovery
support customizing skipped assemblies
support customizing multiple controllers with the same name under different namespaces and assemblies
support controller ambiguity detection
* Paths rooted by a leading slash (e.g. /foo) are correctly resolved by the
PhysicalFileSystem. This change is an experiment to determine if we can
get away with not having virtual paths in WebFx.
* Additionally removing types (MetadataVirtualPathViewFactory,
VirtualPathAttribute) that are currently unused.