Commit Graph

16 Commits

Author SHA1 Message Date
ryanbrandenburg 2aca8810d3 * Give message correct path. 2016-02-02 11:08:41 -08:00
Doug Bunting 08dd77d8c7 Add relative view path support
- #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`
2015-11-18 15:59:11 -08:00
Doug Bunting ff19702db5 Remove `WaitService`
- use `MvcTestFixture` instead of `TestHelper`
  - part of #3139
- continue to test e2e interaction of `FlushAsync()` with sections, partials, et cetera
- remove `FlushPointTest.FlushBeforeCallingLayout()`
  - `RazorPageTest.FlushAsync_ThrowsIfTheLayoutHasBeenSet()` unit test covers the scenario
2015-10-28 15:47:16 -07:00
Pranav K a33e83f363 Adding IView.Path and ViewContext.ExecutingPagePath
Fixes #1940
2015-02-13 06:12:15 -08:00
Pranav K 7667eba34e Layouts for partials
Fixes #1621
2015-01-20 11:44:48 -08:00
Kirthi Krishnamraju 9ea5350271 Added more coverage in functional tests for FlushAsync 2015-01-05 10:36:37 -08:00
sornaks 1570e198ef Bug #1354 - ViewComponent View() fails on CoreCLR with IEnumerable<> passed in.
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.
2014-12-16 12:19:38 -08:00
Kirthi Krishnamraju d8455c3e64 Make Flush work without requiring curly braces
Fixes #1547
2014-12-05 14:53:09 -08:00
Pranav K 7b20909a60 Revert changs to Flush point tests made as part of 4ad3e9
This should resolve timing issues that are currently being seen.
2014-12-03 12:56:14 -08:00
Doug Bunting 5e067cdb9e Delete trailing whitespace
- #EngineeringDay
- Total replaced: 660  Matching files: 270 in *.cs
- Total replaced: 250  Matching files: 32 in all other files
- Total replaced: 22  Matching files: 8 in a few stragglers

Did not change files under following directories
- test\Microsoft.AspNet.Mvc.Razor.Host.Test\TestFiles\Output
- test\Microsoft.AspNet.Mvc.FunctionalTests\compiler\resources
- test\WebSites\TagHelpersWebSite
(Razor generates trailing whitespace in a case or two)
2014-11-20 16:18:09 -08:00
Pranav K 052ad3e95f RenderSection \ RenderSectionAsync does not work in sections
Fixes #1509
2014-11-14 12:17:25 -08:00
Pranav K 4ec6da1ed3 Adding RenderSectionAsync to RazorPage
Fixes #845
2014-10-13 17:44:49 -07:00
Pranav K a931e21456 Adding support for flush points in Razor pages
Fixes #1042
2014-08-29 09:30:23 -07:00
Pranav K a490abc6e8 Adding support for inheriting chunks from _ViewStarts as part of host
parsing.

Fixes #881
2014-08-22 11:04:42 -07:00
Pranav K 92e26cf8e0 RazorView should not create new ViewContext when rendering pages.
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
2014-07-25 06:37:53 -07:00
Pranav K 9e535f6897 Separating view execution and Razor behavior
* 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
2014-07-18 14:58:12 -07:00