Commit Graph

50 Commits

Author SHA1 Message Date
Pranav K 380a93d370 Redesign RazorViewEngine caching
Fixes #3337
2015-11-10 10:18:25 -08:00
Doug Bunting ff91e796c1 Revert "Fixing tests"
- wrong fix especially now that test encoders work as expected
- touch up `HtmlHelperTest` and `RazorViewTest` since test encoders are now consistent
- remove references to old `Microsoft.Extensions.WebEncoders.Testing` package

This reverts commit a9d5876cd9.
- but leave `FormTagHelperTest` and `ValidationMessageTagHelperTest` cleanup alone

nit: use `string.Empty` in `HtmlHelperLinkGenerationTest`
2015-11-02 09:45:56 -08:00
Chris R 52f4a83139 React to WebEncoders changes. 2015-10-30 17:59:19 -07:00
Pranav K f57e180971 Renaming Microsoft.Framework.* -> Microsoft.Extensions.* 2015-10-03 15:44:53 -07:00
Pranav K 18c80d156c Replace NotNullAttribute with thrown exceptions 2015-09-26 23:48:43 -07:00
Pranav K a68d9e4cb1 Replace NotNullAttribute with thrown exceptions 2015-09-17 11:56:44 -07:00
Ryan Nowak 538cd9c191 Move less-commonly used types out of .Rendering 2015-09-16 23:52:29 -07:00
Pranav K 887ab64d75 Throw an exception if layouts have circular references.
Fixes #3100
2015-09-14 12:57:06 -07:00
Ryan Nowak 94388a8804 React to BufferedHtmlContent changes 2015-09-13 13:51:53 -07:00
Ryan Nowak 229724c4ea Reorganize MVC namespaces 2015-09-01 22:28:33 -07:00
Chris R dd737ce946 Use new HttpContext.Features API. 2015-08-31 09:19:14 -07:00
Kirthi Krishnamraju caa8ea44fb Fix #448: Support app-wide defaults for HTML helpers 2015-05-12 14:10:59 -07:00
Chris R bd03142dab React to Http namespace changes. 2015-05-07 15:19:10 -07:00
N. Taylor Mullen 64e726d2b2 Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
Ajay Bhargav Baaskaran 5da8ba7769 [Fixes #2085] Using custom HtmlEncoder in unit tests 2015-04-23 13:16:27 -07:00
Ajay Bhargav Baaskaran f878ca5b15 [Fixes #1919] Added path info to RazorPage exceptions 2015-04-17 10:30:37 -07:00
Chris Ross 6223aac9be Handle Http.Core rename. 2015-04-16 15:48:27 -07:00
Pranav K 60381c415e Unrendered sections does not throw when redefined and rendered in nested
layout.

Fixes #2252
2015-03-30 09:33:09 -07:00
Ajay Bhargav Baaskaran c62974d39b [Fixes #2179] Validation fix for supporting nested sections in layouts 2015-03-21 17:18:35 -07:00
Ajay Bhargav Baaskaran db728cd386 Introducing TempData
- Issue #455
 - Updated MVC sample
 - Added relevant tests
2015-03-10 12:04:05 -07:00
Ajay Bhargav Baaskaran 81c3b75980 Replaced WebUtility.HtmlEnode with IHtmlEncoder.HtmlEncode 2015-03-03 13:57:36 -08: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
Yishai Galatzer 9ac37fbc7a Rename TextPlainFormatter and remove other minor warnings
#1631
2015-01-16 12:09:53 -08:00
Chris Ross 9aff289dfe Handle PipelineCore rename. 2015-01-15 15:25:17 -08:00
Pranav K 933f7eeb22 Layout specification and discovery should follow the same behavior as
partials

Fixes #1047
2014-12-03 11:54:46 -08:00
ianhong 0720177243 Updating per comments 2014-11-13 11:28:12 -08:00
Doug Bunting c89bca5924 Adjust tests to handle new `ViewDataDictionary` invariants
- ensure `ViewDataDictionary` constructors are not passed a `null` or
  `Mock.Of<IModelMetadataProvider>()` instance
 - `ViewDataDictionary` constructors always use the `IModelMetadataProvider`
- `viewData.ModelMetadata` now never `null`
- `ViewDataDictionary<int>.Model` no longer throws if read before it's written
- `ViewDataDictionary.ModelMetadata` now copied to new instances in fewer cases
 - e.g. don't use unusual `object` datatype with customized `ModelMetadata`
2014-10-29 19:18:59 -07:00
Pranav K b8d30f29c6 Add IsPartial property to IRazorPage
Fixes #1002
2014-10-17 10:52:39 -07:00
Pranav K 75c6327b2e Layout property needs to be propogated between nested view starts
Fixes #1364
2014-10-15 18:54:02 -07:00
Pranav K 4ec6da1ed3 Adding RenderSectionAsync to RazorPage
Fixes #845
2014-10-13 17:44:49 -07:00
Pranav K 18e11f546d DecorateWriter does not get called for partial views rendered via
Html.PartialAsync

* Introducing StringCollectionTextWriter to buffer the contents of
  PartialAsync
* Ensure DecorateWriter is called for partial views

Fixes #1266
2014-10-12 14:24:29 -07:00
Pranav K 20eadb94ee Remove instrumentation from public API surface
Fixes #1262
2014-10-12 12:57:04 -07:00
Pranav K 12477c9f52 Changes to make EnableInstrumentation conditionally enabled 2014-10-02 17:55:40 -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 2dcbbf70b0 Modifying RazorViewEngine to create IRazorView instances from service
container
2014-08-22 11:41:04 -07:00
Pranav K 90b40832ff Modify RazorView to be instantiated via TypeActivator
Partial fix for #889
2014-08-12 10:37:00 -07:00
Pranav K 5168808906 Introducing RazorTextWriter
RazorTextWriter represents the result of rendering a page as a sequence of
strings rather than a concatenated string. This avoids building up large
strings in memory.
2014-08-05 10:09:04 -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 e28adbfb3d ViewStarts need to be executed as part of View execution
Fixes #834
2014-07-23 16:45:25 -07:00
Pranav K 340bd7550a Adding RazorView to Microsoft.AspNet.Mvc.Razor
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
2014-07-18 21:14:45 -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
Ryan Nowak 69034b78b8 Issue #65 merge RoutingContext and RequestContext
See the relevant PR in aspnet/Routing#60.

This incorporates the breaking changes.
2014-06-06 10:49:55 -07:00
Andrew Peters f13865dedc Updating copyright headers 2014-05-08 23:01:20 -07:00
Ryan Nowak abbaa11212 Incorporate name changes: HttpAbstractions 2014-05-05 17:14:08 -07:00
anpete 8208cd6b2f Update file headers 2014-05-01 17:42:33 -07:00
Ryan Nowak 408d4056b1 Rearrange ViewContext 2014-04-10 11:40:57 -07:00
Pranav K 931d18b851 Adding exceptions for RenderSection, DefineSection and RenderBody 2014-04-07 12:25:44 -07:00
Pranav K 94c028a5df Adding support for RazorView.IsSectionDefined 2014-04-06 17:18:37 -07:00
Pranav K 9291cbc50b Adding support for RenderSection
* Adding unit tests for DefineSection \ RenderSection
* Changes per code review feedback
2014-04-03 15:00:06 -07:00