Commit Graph

67 Commits

Author SHA1 Message Date
Pranav K 628dfc39c1 Remove model type from RazorPageAttribute 2017-06-05 16:07:14 -07:00
Pranav K 20c04d099e Update to use Razor parser to parse page directive 2017-06-05 14:02:24 -07:00
Ryan Nowak b796bc0f39 Add Page filters 2017-06-05 08:05:49 -07:00
Pranav K 597a0c9a11 Add support for friendly routes in pages
FIxes #6325
2017-05-26 14:29:00 -07:00
Ryan Nowak 688e518991 Add result filters to pages 2017-05-26 12:33:46 -07:00
Ryan Nowak b7db6dbc8e Remove pass-through activator for pages
This change removes a 'pass through' IRazorPageActivator that we were
using to avoid the default one initializing the Page twice.

The fix is to add an adapter so that the IRazorPage that the RazorView has
isn't the *real* page, it's the adapter. The adapter doesn't have anything
interesting to activate :).
2017-05-26 12:29:10 -07:00
Ryan Brandenburg 03404cd3df Return to NetStandard 2017-05-25 10:34:16 -07:00
Pranav K 452578e4a8 Revisit the architecture of CompilerCache
Fixes #5912
2017-05-25 08:54:15 -07:00
Ryan Nowak 2992f8e38a Separate PageContext and ViewContext
This change decouples PageContext and ViewContext completely.
2017-05-24 16:01:52 -07:00
Pranav K 39f1f5c933 Move Pages filter creation to application model provider
Fixes #6198
2017-05-23 11:03:19 -07:00
Nate McMaster d70bfdd1ea Upgrade test framework versions and fix test issues 2017-05-15 14:11:27 -07:00
Ryan Nowak b2d95ffb21 Remove usage of NotFoundProjectItem
We're making this type internal in Razor, using a mock here is fine.

Also renamed some types with a generic name. The actual 'default'
RazorProject class lives in Razor and is internal.
2017-05-12 15:55:36 -07:00
Pranav K 1c5e417606 Change TFM to netcoreapp2.0 (#6234)
* Change TFM to netcoreapp2.0
2017-05-04 18:11:26 -07:00
Ryan Nowak b1b3a816cc Rename View() to Page()
This requires us to introduce another base class between RazorPageBase and
Page - you need this because you aren't allow to have Page.Page().
2017-04-27 09:27:14 -07:00
Pranav K 649ee4d28d Add support for page handler to URL generating APIs. 2017-04-24 22:56:58 -07:00
Pranav K ccdaa5a729 Make /Pages the default root for pages.
Fixes #6184
2017-04-24 15:46:32 -07:00
Ryan Nowak 04fd762943 Rename form-action -> handler 2017-04-24 14:15:35 -07:00
Ryan Nowak 297196baa0 Design updates to handler methods and binding
Implements #6091, #6072, #6090, #5927
2017-04-21 17:29:25 -07:00
Ryan Brandenburg 908b4c8d62 FormAction from QueryString 2017-04-21 15:04:37 -07:00
Ajay Bhargav Baaskaran 8eac7c2d6c [Fixes #6117] Added RedirectToPage overloads to Controller 2017-04-21 12:19:35 -07:00
Ryan Brandenburg 5a184df808 Remove Binder from Page and PageModel 2017-04-20 17:54:50 -07:00
Ryan Brandenburg c9bfd2296d Parity between Controller and Page/PageModel 2017-04-19 15:02:06 -07:00
Ryan Nowak a8eb5bee70 Implement view search for pages
The View Engine now needs to know about pages :(. This isn't ideal but the
view engine needs to know what set of search paths to use. This was
already hardcoded for controllers vs controllers + areas. It felt right to
further hardcode instead of introduce a wierd abstraction that we only
use.

Additionally pages use a view location expander to implement an ascending
directory search.
2017-04-18 16:11:24 -07:00
Ryan Brandenburg c56b64fc41 Add factory methods 2017-04-17 16:11:34 -07:00
Pranav K 8ed55107e7 Add support for page precompilation 2017-04-17 10:43:50 -07:00
Pranav K 3474bdf776 RedirectToPage from a form-action handler includes the formaction
Fixes #6104
2017-04-12 09:27:08 -07:00
Ryan Brandenburg 59a3aade9b Fix [TempData] for PageModel's 2017-04-11 16:45:44 -07:00
N. Taylor Mullen 36e272fdc2 React to Microsoft.AspNetCore.Razor.Evolution => Microsoft.AspNetCore.Razor.Language.
aspnet/Razor#1169
2017-04-10 10:20:19 -07:00
Pranav K 1e7972bd8f Add convenience methods for redirecting from a Razor Page back to itself
Fuxes #5953
2017-04-07 10:03:42 -07:00
Ryan Nowak 4032de064e Removing _PageStart.cshtml
Pages now also use _ViewStart.cshtml

Also contains some naming/text cleanup that was missed in the previous
commit.
2017-04-06 08:14:37 -07:00
Ryan Brandenburg 9e8d4db7d8 Move TempDataPropertyProvider into filter 2017-04-05 12:04:02 -07:00
Pranav K 925ad75cdf Add convenience methods for redirecting to another Razor Page
Fixes #5956
2017-04-04 14:36:22 -07:00
Hisham Bin Ateya fe3d45fad1 Adding AllowAnonymousToPage & AllowAnonymousToFolder
Fixes #5884
2017-03-31 20:17:31 -07:00
Pranav K b22326323a Add properties to Page and PageModel
Fixes #6008
2017-03-28 13:26:38 -07:00
Pranav K e7101f248a Support model binding to Razor Pages properties on page and PageModel classes
Fixes #5952
2017-03-24 07:45:19 -07:00
Pranav K badb6ce8e5 Remove net451 as a cross-compile target 2017-03-22 06:32:50 -07:00
Jass Bagga 1197657e5b TempData property attribute
Addresses #5600
2017-03-16 16:34:35 -07:00
Nate McMaster 6f7717a381 Unify dependency versions to one file 2017-03-15 16:54:32 -07:00
Pranav K bee1a55cff Use RazorPagesOptions.RootDirectory when looking for page hierarchies.
Fixes #5915
2017-03-14 18:56:50 -07:00
Ajay Bhargav Baaskaran 2ffaa88830 Using NullLogger types from Logging.Abstractions 2017-03-14 12:24:18 -07:00
hishamco e44d875df4 Adding AuthorizePage & AuthorizeFolder without requiring a policy
Refactoring
2017-03-13 16:39:52 -07:00
Pranav K f7fd5114b3 Introduce MvcRazorTemplateEngine 2017-03-13 16:33:13 -07:00
Pranav K 4faef7afaf Cache more things in HandlerMethodDescriptor
Add tests for DefaultPageHandlerMethodSelector
2017-03-13 13:15:26 -07:00
Ryan Brandenburg 1c74e31715 Add tests for PageActionInvokerProvider (#5882) 2017-03-09 16:19:20 -08:00
Ryan Brandenburg 7f3f6957be Set path in DefaultPageFactory (#5911) 2017-03-09 16:15:43 -08:00
Pranav K 145d27f9b3 Add a PagesOption type that allows configuring the root for Page file discovery
Fixes #5785
2017-03-03 17:20:07 -08:00
Ryan Brandenburg 85e28ae478 Trim quotes from template (#5838) 2017-03-03 09:52:36 -08:00
Pranav K 7cadb58e12 Add convenience extension methods for IPageApplicationModelConvention 2017-03-02 17:38:04 -08:00
N. Taylor Mullen acfad83aa6 Migrate to MSBuild
- thanx to @NTaylorMullen for initial conversion
  - e.g. AssemblyInfo.cs files were already minimized or removed :)
- allow `>=` RC3 CLI's to build and run MVC
- work around several dotnet migration issues; see #5482
- disable full .NET Framework runs of functional tests; see #5873
- remove `Microsoft.DotNet.InternalAbstractions` and `System.Xml.XmlDocument` dependencies
- remove project.json (!!), *.xproj, .notest, and web.config files

Redo earlier changes:
- apply test migration to .NET 4.5.2 in *.csproj world
  - see 63507c8 for previous, project.json work
- apply dependency version downgrade from 0097e40 in *.csproj world

Make other test-related changes:
- make Microsoft.AspNetCore.Mvc.TestDiagnosticListener a regular class library
- add support for `/p:GenerateBaselines=true` for functional and Razor.Host tests
- separate `GetCSharpTypeName_ReturnsCorrectTypeNames_ForOutParameter()` test
  - work around inability to deserialize a odd `ref` type
  - xUnit and vstest now serialize / deserialze test data more often
- skip poor test mentioned in #5768
- work around Microsoft/vstest#392
  - rename tests to avoid duplicates
- work around Microsoft/vstest#419
  - set up created `AppDomain`s with current `ApplicationBase`
2017-02-28 21:20:39 -08:00
Pranav K de30c5822a * Cache ExecutorFactory as part of CompiledActionDescriptor
* Add tests for ExecutorFactory
2017-02-24 11:56:13 -08:00