Commit Graph

23 Commits

Author SHA1 Message Date
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
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
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
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
Ryan Brandenburg 42b988ad88 ./ paths relative on page. 2017-04-25 11:57:58 -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
Ajay Bhargav Baaskaran 2ffaa88830 Using NullLogger types from Logging.Abstractions 2017-03-14 12:24:18 -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 Brandenburg 43a0a5a9f1 Replace ConfigureOptions with IConfigureOptions 2016-09-08 15:19:07 -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
Doug Bunting 6bf25cecec React to HttpAbstractions namespace changes
- aspnet/HttpAbstractions#549 and aspnet/HttpAbstractions#592
- clean up `using`s
2016-03-30 16:19:42 -07: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