- #3307
- relative paths are now supported in `View()` calls from components and view components,
`Html.PartialAsync()` and similar calls, and `RazorPage.Layout` settings.
- support absolute paths, relative paths, and view location lookups consistently / everywhere
- support view paths in `TemplateRenderer` e.g. passing an absolute path to `Html.EditorFor()`
- take a big swing at the `IRazorViewEngine` and `IViewEngine` interfaces
- split lookups (view names) from navigation (view paths)
- remove `Partial` separation; use parameters to set `IsPartial` properties
- correct `ViewContext` copy constructor and add unit test
- extend unit tests to cover relative paths
- fix existing tests to handle newly-required extension in an absolute path
- add functional test that chains relative paths
nits:
- remove some YOLO line wrapping
- `""` -> `string.Empty`
Fix - When the model is passed in to a View, ViewDataDictionary sets it. During this process, we recurse through all the properties and create FastPropertyGetters for each of them. In this case, since it is an enumerable, the properties which we recurse through are not the elements of the collection but the properties of the Enumerable instead. i.e - Enumerable.Current. Creating getters for these properties are not necessary. The fix moves the property iteration step to a place where the properties are actually requested.
- Splitting TypeInformation class into two and separating their caches appropriately.
For pages that can pop back (e.g. Partial pages \ View Components), the
invoking component already creates a new ViewContext. ViewStart, Pages
and Layouts need to share the same Layout. This is required for sharing
ViewData values (such as title).
Fixes#861
* 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