Commit Graph

181 Commits

Author SHA1 Message Date
Pranav K 8d66f104f7 Make types in Microsoft.AspNetCore.Mvc.Internal namespace internal 2018-11-08 14:00:16 -08:00
Doug Bunting c74a945dda
Convert `RouteValueDictionary` values to `string` using `CultureInfo.InvariantCulture` (#8674)
* Convert `RouteValueDictionary` values to `string` using `CultureInfo.InvariantCulture`
- #8578
- user may override this choice in one case:
  - register a custom `IValueProviderFactory` to pass another `CultureInfo` into the `RouteValueProvider`
- values are used as programmatic tokens outside `RouteValueProvider`

nits:
- take VS suggestions in changed classes
- take VS suggestions in files I had open :)
2018-10-30 20:09:17 -07:00
Doug Bunting 5bddd226a3
Use Internal.AspNetCore.Sdk as an MSBuild SDK
- should resolve issues with occasional strange MSBuild caching issues in this repo
- modeled after aspnet/Scaffolding#905
- follows aspnet/BuildTools#729 recommendation to check in global.config file
  - see also Microsoft/msbuild#2914
- use newer KoreBuild
  - `.\build.cmd -update /t:noop`
2018-10-04 15:12:38 -07:00
Pranav K 07cc9e66c6
Add a feature to disable file watching in Razor pages (#8369)
* Add a feature to disable file watching in Razor pages

Fixes https://github.com/aspnet/Mvc/issues/8362
2018-09-06 10:16:31 -07:00
Simon Cropp b156dee4f1 Fix some spelling (#8378) 2018-09-06 07:39:01 -07:00
Pranav K 0726b8b98b
Make publicly exposed Roslyn types internal 2018-07-31 11:08:22 -07:00
Pranav K b62499e02c
Ensure PageContext.ViewData and ViewContext.ViewData are the same instance
Fixes #7675
2018-07-16 11:16:03 -07:00
Pranav K a712ccc98a Fix up error message when compilation references are missing 2018-06-18 09:20:08 -07:00
Pranav K e1eaf6a6e0
Cleanup TestCommon 2018-05-18 10:45:57 -07:00
Sébastien Ros 19d82928ba
Making Razor compilation cache replaceable (#7780) 2018-05-15 11:36:47 -07:00
Ajay Bhargav Baaskaran bfbd286ab6 Remove usages of obsolete APIs 2018-04-13 14:54:35 -07:00
John Luo c35030267c Update usage of TestSink 2018-04-13 10:21:41 -07:00
Pranav K 3db924003e Use VirtualRazorProjectSystem for Razor tests 2018-04-09 15:27:03 -07:00
Pranav K d6176ac7de ApplicationPartFactory: The works 2018-03-21 15:40:15 -07:00
Pranav K 3517ecda2f Ensure DebugType = embedded and DebugType = none work
Fixes #7406
2018-03-05 09:21:13 -08:00
N. Taylor Mullen 43106f688a Re-enable "Move to RazorProjectEngine."
- This was initially reverted due to insufficient packages for local builds.

This reverts commit 5ac6fa77f8.
2018-02-16 16:13:54 -08:00
N. Taylor Mullen 5ac6fa77f8 Revert "Move to RazorProjectEngine."
- Waiting for packages to be available from Razor.

This reverts commit 608330dc86.
2018-02-15 17:01:07 -08:00
N. Taylor Mullen 608330dc86 Move to RazorProjectEngine.
- Updated our consumption of `RazorEngine` and `RazorTemplateEngine` to use `RazorProjectEngine` and its features.
- Updated service registrations to maintain existing services but to also register new ones.
- When moving `RazorViewEngine` to use `RazorProjectFileSystem` I had to add an unused constructor item in order to disambiguate the constructors.
- Updated tests to use `RazorProjectEngine` and `RazorProjectFileSystem`.

#7377
2018-02-15 16:34:26 -08:00
Jass Bagga d27e66a8fc
Initialize ViewContext for TagHelperComponentTagHelper (#7326)
Addresses #7017
2018-02-06 16:07:38 -08:00
Javier Calvarro Nelson 7127bb5dbb Add DeclaredModelType to Razor pages
* This allows razor pages to override their model type with a model that
  extends the declared model type through the page application model.
2018-01-25 16:00:54 -08:00
Ajay Bhargav Baaskaran 2c6ba372c1 Some cleanup around FileProviderRazorProject with tests 2018-01-21 21:38:25 -08:00
Javier Calvarro Nelson 1d6b02c1f5 [Fixes #7239] Add support for loading additional parts.
* Support loading parts through an assembly metadata attribute with a
  key of Microsoft.AspNetCore.Mvc.AdditionalReference and a value that
  describes the additional assembly to add to the list of parts and
  whether or not it should be added by default. The additional reference
  can only contain the file name of the assembly and it must be located
  side by side with the assembly where the additional reference is
  defined.
* Add an AdditionalAssemblyPart application parts to represent parts
  that are not part of the original application per se, like precompiled
  views.
* Update the ViewsFeatureProvider to search for razor views in the
  application part directly instead of trying to load the precompiled
  views assembly part.
2018-01-21 08:02:20 -08:00
Pranav K ab3134e373 Support conflict resolution when multiple precompiled views have the same path
Fixes #7223
2018-01-16 08:04:39 -08:00
Ajay Bhargav Baaskaran b20e35e76a Set RelativePhysicalPath in FileProviderRazorProjectItem 2018-01-11 13:20:17 -08:00
Ryan Nowak 913cefdea2 Fix a bug blocking recompilation 2018-01-09 12:25:11 -08:00
Ryan Nowak d58d0f917f Add support for recompilation 2018-01-08 15:26:20 -08:00
Pranav K 51820e3e25 Use DebugType specified in DependencyContext to determine pdb type
Fixes #7006
2018-01-02 13:41:31 -08:00
Pranav K b6144142fe Update samples and tests to target netcoreapp2.1 2017-11-13 14:58:40 -08:00
Nate McMaster 2e4bc548f5
Pin tool and package versions to make builds more repeatable (#7013) 2017-10-31 19:18:14 -07:00
Pranav K 41efa409a4 Remove TestOptionsManager 2017-10-30 17:49:15 -07:00
Pranav K 037c1ec47d Make @inherit + Razor Pages + _ViewImports work
Fixes #6769
2017-09-14 12:34:00 -07:00
Pranav K 6bf165f22f Update default Razor search paths to include ~/[PagesRoot]/Shared
Fixes #6604
2017-09-11 14:11:39 -07:00
Pranav K 717f1e6f7d Normalize paths in RazorViewEngine prior to invoking page factory
Fixes #6672
2017-09-07 11:36:31 -07:00
Nate McMaster b811e69d00 Use PackageLineup to manage PackageReference versions
- Move the Mvc.Performance project from test/ to benchmarks/.
 - Remove the Version attribute on PackageReference.
 - Add a reference to two PackageLineup's.
 - Add snippet to README explaining the additional requirement to run build.cmd /t:restore.
 - Add a target to check that packages have been pinned.
2017-08-30 12:14:11 -07:00
Pranav K 7b2a4ff465 Allow "page" route parameter to be used in Mvc controllers
Fixes #6660
2017-08-24 15:44:37 -07:00
Nate McMaster 3a710c3d64 Upgrade to xunit 2.3.0-beta4 2017-08-17 10:45:03 -07:00
Nate McMaster b43b244830 Use Directory.Build.props/targets 2017-08-16 12:30:13 -07:00
Pranav K eb5c23ea8e Parse LanguageVersion correctly
Fixes https://github.com/aspnet/Razor/issues/1591
2017-08-08 17:25:28 -07:00
Ajay Bhargav Baaskaran 05f5d59e44 Fix build break 2017-07-06 19:43:42 -07:00
Pranav K 8963b83dd3 Remove ParseOptions and CompilationOptions from RazorViewEngineOptions (#6487)
* Remove ParseOptions and CompilationOptions from RazorViewEngineOptions

Fixes #6009
2017-07-05 14:18:49 -07:00
Ryan Nowak 8d9c16132a Fix #6479 - remove IFileProvider constructor
The RazorProject implementation used by MVC at runtime has a constructor
that takes an IFileProvider (used by tests). This causes ambiguities
when a user registers an IFileProvider in DI.

Cleaning up tests to use a mock instead of the file provider directly
2017-07-04 13:48:56 -07:00
Pranav K d1813a7cd7 Normalize paths returned by view location expanders
Fixes #6448
2017-06-27 08:48:07 -07:00
Jass Bagga f4a86f5511 Add DiagnosticSource to RazorView (#6386)
Addresses #6222
2017-06-26 15:35:31 -07:00
Pranav K 8662422e18 Merge pull request #6376 from aspnet/rel/2.0.0-preview2
Perform case insensitive lookups for precompiled views
2017-06-07 15:19:42 -07:00
Pranav K 1124eb5016 Perform case insensitive lookups for precompiled views 2017-06-07 15:19:21 -07:00
Pranav K 8f883e8e13 Use RazorViewAttribute \ RazorPageAttribute for view discovery 2017-06-07 13:49:24 -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 Nowak c3f7613725 Make RazorReferenceManage public
Fix for #4938. This change makes the reference manager public and
documented so that it can be replaced.
2017-05-26 10:58:45 -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