Commit Graph

59 Commits

Author SHA1 Message Date
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
Doug Bunting 63507c8da9 Bump test projects up to .NET 4.5.2
- aspnet/Testing#248
- xUnit no longer supports .NET 4.5.1
- update AppVeyor config so this framework version is available
- build tests for desktop .NET only on Windows
2017-02-21 07:15:36 -08:00
Nate McMaster 0097e40e46 Downgrade to stable packages 2017-02-15 14:23:48 -08:00
Ryan Nowak 314aa366e1 Add TempData property support for Pages 2017-02-07 15:27:02 -08:00
Pranav K 2ff80ffb49 Porting DefaultPageHandlerMethodSelector and ExecutorFactory 2017-02-07 12:44:27 -08:00
Pranav K 9f3dfd9819 Make RazorPages work E2E 2017-02-06 19:05:31 -08:00
Pranav K 8d5abd433f Add support for PageStarts 2017-02-03 15:57:00 -08:00
Ryan Nowak 84d2e027f5 Use new Razor in MVC 2017-01-30 10:55:49 -08:00
Pranav K 3e214e2399 Introducing IPageModelActivatorProvider
Fixes #5480
2017-01-26 11:31:14 -08:00