RazorView was part of the previous commit but was separated to make it
easier to see the diff in RazorPage that was formerly named RazorView
Adding IRazorPage and changes per code review comments
* Introducing RazorPage and RazorPageOfT that represent the Razor
execution aspect of view execution. Moving view execution hierarchy behavior
(Layout, partial views etc) into a separate RazorView type.
* Renaming IVirtualPathViewFactory to IRazorPageFactory,
IRazorViewActivator to IRazorPageActivator
* Renaming VirtualPathViewFactor to FileBasedPageFactory to
correctly reflect what it does.
Fixes#814
This change exludes internal and nested types from being treated as
controllers. This is consistent with MVC5's behavior.
DefaultActionSelectionConventions was primarily tested through running
action selection. I wanted to also test the methods with substantial logic
in this class, so I moved a spate of a classes from private classes inside of the
integration tests to public classes so they could be shared. I also added
tests to fill gaps in DefaultActionSelectionConventions, which is the vast
vast majority of this change.
* Removing Init method and using [Activate] to activate IUrlHelper.
* Moving IViewComponentHelper to default injected properties
* Adding functional tests to verify these properties are injected \
activated
Fixes#789
Move compilation and VirtualPathViewFactory to be singletons
And cache access to files.
The cache time is controlled by MVC options.
The cache is implemented in the ExpiringFileInfoCache.cs
This change allows a user to override a route prefix set using
[Route("...")] on the controller by providing a route template
on the action that starts with "~/" or "/". For example,
[HttpGet("~/...")] or [HttpGet("/...")]
If the user specifies a template in [Route] that starts with "~/"
or "/", we will just strip the prefix from the template and use
the remaining part of the template.
The reason to do this is that there's a reasonable extensibility
scenario where a user can implement a global prefix for routes as
a convention (using IReflectedApplicationModelConvention), and use
~/ to escape that prefix (just like we support with action-level routes).
The await/async patterns adds a state machine that takes time to jit, in this
case the await is not necessary and the code remains simple without adding
continuations.
- XML comments for changed `TemplateInfo` properties
- correct `DefaultDisplayTemplateTests` and `DefaultEditorTemplateTests` namespaces
- add a couple of low-level `TemplateInfo` tests
- add more `DefaultTemplatesUtilities.GetHtmlHelper()` overloads, all
returning a strongly-typed helper
- also correct that method to ensure template helpers each get a unique
`IHtmlHelper` instance
By adding model specific code generation we are able to map the generic "base type" code to the cshtml file. This also involved utilizing the CreateClassDeclaration method in the Microsoft.AspNet.Razor library. Lastly Added a MvcCSharpChunkVisitor to add one more abstraction layer between the Microsoft.AspNet.Razor code and the Mvc code; this makes it so Mvc follows the same class structure as the base Razor parser.
#568
Additionally change it to use TypeExtensions.GetReadableProperties to get
property list. This causes it to ignore indexers which should not be
considered.
Fixes#595