Commit Graph

30 Commits

Author SHA1 Message Date
Ben Adams 2414db256f Zero cost(ish) diagnositcs when disabled
Inlinable fast-path check if Diagnositcs is enabled
2018-11-18 15:47:55 -08:00
Pranav K f734efe2e7 Move pubinternal types in Mvc.Razor and Mvc.RazorPages to internal 2018-11-09 15:00:38 -08:00
Pranav K 8d66f104f7 Make types in Microsoft.AspNetCore.Mvc.Internal namespace internal 2018-11-08 14:00:16 -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
Pranav K dfa085afaf Add support for areas to Razor Pages
Fixes #6926
2017-12-19 15:03:05 -08:00
Pranav K 717f1e6f7d Normalize paths in RazorViewEngine prior to invoking page factory
Fixes #6672
2017-09-07 11:36:31 -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
Ajay Bhargav Baaskaran 05f5d59e44 Fix build break 2017-07-06 19:43:42 -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 c27b07ef3f Use C# 7 features 2017-06-11 22:11:51 -07:00
Pranav K 1c4b0fcdf3 Code clean up 2017-06-09 22:38:46 -07:00
Pranav K c5f771d96d Use factory pattern for caching in ControllerActionInvoker 2017-05-22 13:05:55 -07:00
Pranav K f568d3c2bc Support finding "sibling" pages when using RedirecToPage
Fixes #6083
2017-04-21 18:12:52 -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
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
John Luo d21af1f26d React to MemoryCache trigger removal 2017-03-27 12:45:54 -07:00
Pranav K badb6ce8e5 Remove net451 as a cross-compile target 2017-03-22 06:32:50 -07:00
Pranav K f7fd5114b3 Introduce MvcRazorTemplateEngine 2017-03-13 16:33:13 -07:00
Pranav K cfa9631ce8 Resolve path traversals in RazorViewEngine
This change moves the onus of path resolution from individual IFileProvider instances to RazorViewEngine.

Fixes #5574
Fixes https://github.com/aspnet/MvcPrecompilation/issues/33
2016-12-08 11:20:06 -08:00
Jass Bagga 304000095a Added logging for precompiled views in RazorViewEngine
Addresses #5462
2016-11-07 10:46:54 -08:00
Doug Bunting 4cca6b09f0 Reduce allocations during HTML generation
- #3918
- precompute size of `StringBuilder` in `ExpressionHelper`
- reduce `string` allocations in `ViewDataEvaluator`
 - also get rid of `Enumeration` state machines
- reduce the size of a few objects; use more expression-valued properties
 - e.g. don't store `_modelType` in `ModelExplorer`
- add `EmptyArray<TElement>`; make empty arrays consistently `static`
- avoid `string.Split()` in HTML and tag helpers

nits:
- make `ExpressionHelperTest` tests more stringent
- correct `Message` for an `ArgumentNullException`
- remove excess `using`s in classes I touched (but often ended up leaving otherwise unchanged)
- improve doc comments
- remove `ToString()` call on a `string`
- avoid encoding `string.Empty`
- fix test file name
- remove useless variables
- correct spelling
- improve whitespace
2016-10-03 12:17:47 -07:00
Ryan Nowak 2e2784aa3d [Design] Split up MvcRouteHandler
This change splits up the conventional routing path from the attribute
routing path *inside* routing, instead of inside `MvcRouteHandler`. Each
attribute route group now gets its own instance of
`MvcAttributeRouteHandler` which just knows about the actions it can
reach.

This removes the concept of a route-group-token and removes the lookup
table entirely for attribute routing. This also means that the
`DefaultHandler` on `IRouteBuilder` will not be used for attribute routes,
which we are OK with for 1.0.0.

The action selector's functionality is now split into two methods. We
think this is OK for 1.0.0 because any customization of `IActionSelector`
up to now had to implement virtually the same policy as ours in order to
work with attribute routing. It should now be possible to customize the
selector in a meaningful way without interfering with attribute routing.
2016-06-07 08:12:47 -07:00
Kiran Challa f7b2ee80fd [Fixes #4550] Add an Option to set the Razor view location formats 2016-05-19 14:04:33 -07:00
Ryan Nowak af58c2e6b6 Streamlining action selection and route values
Removes a few concepts we don't need
Improves documentation
More things are IDictionary instead of other random types
2016-04-22 17:36:23 -07:00
Ryan Nowak a276169693 Reorganize logging, move more types to internal 2016-01-24 17:24:34 -08:00
N. Taylor Mullen 3be7fbdf9f Rename AspNet 5 file contents.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:18:33 -08:00
N. Taylor Mullen 6a6c8ca544 Rename AspNet 5 folders and files.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:17:07 -08:00