Commit Graph

392 Commits

Author SHA1 Message Date
Ryan Nowak 94388a8804 React to BufferedHtmlContent changes 2015-09-13 13:51:53 -07:00
Pranav K 85bb33a62a Fixing formatting in RoslynCompilationService 2015-09-11 12:22:34 -07:00
Pranav K 345021d822 Set RazorError code to null 2015-09-11 12:08:23 -07:00
Pranav K bc10a17107 Reacting to DNX changes 2015-09-10 17:51:59 -07:00
Pranav K 0350f6ed48 Adding NeutralResourcesLanguageAttribute to Mvc assemblies 2015-09-10 16:17:42 -07:00
Pranav K 2e32ffc004 Use PrecompilationTagHelperTypeResolver to locate TagHelpers during
precompilation.

Fixes #2298
2015-09-09 18:25:11 -07:00
Pranav K 67eb16dc67 Fixing RazorViewEngine formatting 2015-09-08 15:52:53 -07:00
Pranav K 1c8f22058c Make RazorViewEngine.GetNormalizedRouteValue public
Fixes #3108
2015-09-08 15:41:44 -07:00
Hao Kung e4fe31a602 Nuke extra curly 2015-09-02 21:21:41 -07:00
Hao Kung a786eaa9e4 Resolve merge issue 2015-09-02 21:10:43 -07:00
Hao Kung 76dceaef76 Fix build breaks 2015-09-02 16:22:02 -07:00
Hao Kung bc2bce8bd6 Curly's are important 2015-09-02 16:14:25 -07:00
Hao Kung 3ebdcc5f6f React to options changes 2015-09-02 14:07:06 -07:00
Kirthi Krishnamraju 7a3f34089f fix build break due to dnx resource change 2015-09-01 23:31:09 -07:00
Ryan Nowak 229724c4ea Reorganize MVC namespaces 2015-09-01 22:28:33 -07:00
Ben Adams 55fc7ded36 Don't invoke async state machine unnecessarily
Return task rather than awaiting when no extra work needs to be done
after await
2015-08-31 17:48:57 -07:00
Pranav K 8a33972c09 RazorViewEngine should cache transformed paths when view cannot be found
Fixes #3034
2015-08-31 10:36:57 -07:00
Chris R dd737ce946 Use new HttpContext.Features API. 2015-08-31 09:19:14 -07:00
Pranav K c0d4981452 * Avoid lazyily evaluating IRazorCompilationService in
VirtualPathRazorPageFactory
* Cleanup comments on the lifetime of Razor services.
2015-08-27 17:08:18 -07:00
Pranav K 6615972162 Adding System.Text.Encoding to project.json to unblock CI 2015-08-26 10:11:27 -07:00
N. Taylor Mullen cc5c0d6cbe Update `HelperResult` to take in an async func.
- The corresponding Razor change results in `HelperResult`s being rendered with async lambdas.
- This change enables `TagHelper`s and other async code to exist inside of `HelperResult` blocks.
- Added test to validate Templates (they generate `HelperResult`s) can utilize `TagHelper`s correctly.
- Rename `RazorPage`s `RenderBodyDelegate` to `RenderBodyDelegateAsync`.

aspnet/Razor#494
2015-08-25 22:37:17 -07:00
Pranav K 3041dee86d Modify RazorPreCompileModule to use an instance of memory cache specific
to the application's target framework and configuration.
2015-08-25 22:26:16 -07:00
Pranav K 44b45f3b1f Move RazorPreCompileModule.cs to Razor.Precompilation 2015-08-25 14:33:13 -07:00
Pranav K 1bad8ce6d1 Ensure that assembly path is specified in Roslyn MetadataReference. 2015-08-25 12:56:23 -07:00
Pranav K 05226a4a55 Refactor ICompilerCache to be instantiated via ICompilerCacheProvider
Fixes #2933
2015-08-20 10:54:32 -07:00
David Fowler 485e6e5ee8 React to dnx refactoring changes
- Use compilation options from the Compilation itself
- Get the parse options from the first syntax tree
- Get the build time IAssemblyLoadContext directly
2015-08-19 03:04:10 -07:00
Ryan Nowak 9d89a8cac3 Homogenize MVC startup code patterns
Use builder APIS for both AddMvc() and AddMvcCore()
Change various API patterns to all use .AddXyz(...) off of one or both of
these builders.
2015-08-16 18:48:24 -07:00
N. Taylor Mullen e73e73acdd Add `srcset` to list of application relative resolvable URLs.
- Now allow the attribute to exist on `img` and `source` tags.
- Updated existing `UrlResolutionTagHelper` functional test to validate `srcset` attribute.

#2964
2015-08-14 15:58:02 -07:00
N. Taylor Mullen 1b51f6bca6 Enable input, image and url resolution `TagHelper`s to be written as void elements.
- Razor rendering now understands `TagMode` which allows void elements to be rendered.
- Added a `TagStructure.WithoutEnd` bit to `InputTagHelper`, `ImageTagHelper` and `UrlResolutionTagHelper`. This will allow users to write the various elements in the void format. Used the HTML5 spec to determine the elements appropriate.
- Added tests to ensure `TagMode.StartTagOnly` is rendered properly.
- Updated a few functional tests to showcase the void element formats.

aspnet/Razor#450
2015-08-13 16:19:28 -07:00
Pranav K 9a5ebf1497 Use NonDisposableStream instead of using MemoryStream.ToArray() 2015-08-13 11:16:21 -07:00
Alxandr 39ab9badde Make sure references are readable multiple times 2015-08-13 11:16:20 -07:00
Pranav K c631d533c4 * Refactoring RazorFileInfoCollectionGenerator to not be instantiated.
* Adding CompilerGeneratedAttribute to generated code.
* Adding unit tests for RazorFileInfoCollectionGenerator.
2015-08-13 11:15:46 -07:00
Andrew Stanton-Nurse 3c322b4a06 react to DNX renames 2015-08-12 15:12:36 -07:00
Ryan Nowak f7cea9b6d7 React to namespace change in DI. 2015-08-11 14:10:30 -07:00
N. Taylor Mullen a0da6ec19f Add `AddHtmlAttributeValues` for `TagHelper`s.
- Refactored `WriteAttributeTo` to allow re-use of some of the core attribute writing logic. The refactoring was based on removing the `Begin`/`EndContext` for instrumentation bits which isn't valid in a `TagHelper` attribute scenario.
- Added unit tests to validate attributes are properly added to `TagHelperExecutionContext`.
- Added functional test to validate everything is output as expected with dynamic attributes (encoded and non-encoded).

aspnet/Razor#247
2015-08-10 12:06:02 -07:00
Pranav K 91bbfe949c * Cleaning up unused types in Razor precompilation. 2015-08-07 11:09:11 -07:00
Pranav K dfacd2543b * Remove support for updateable precompiled views.
* Allow precompiled views to be served when source file does not exist in
  file system.
* Cache results for views that do not exist on disk.

Fixes #2462 and fixes #2796.
Partially addresses #2551
2015-08-07 11:08:48 -07:00
Troy Dai a7d717d19c Update CoreCLR versions 2015-08-05 09:35:37 -07:00
N. Taylor Mullen 0ef68eefc8 Added default `UrlResolutionTagHelper` to resolve app relative URLs.
- Razor removed the ability to automatically resolve URLs prefixed with `~/`; therefore `ScriptTagHelper`, `LinkTagHelper` and `ImageTagHelper` have changed to take in `IUrlHelper`s and auto-resolve their URL based properties if they start with `~/`.
- Added a catch-all `~/` resolver for non `TagHelper` based HTML elements. Razor used to resolve any attribute value that started with `~/` now the behavior is restricted to attributes that can contain URLs.
- Updated `IUrlHelper` to accept `null` values.
- Added functional tests to validate that URLs resolve correctly.
- Updated `TagHelper` tests to ensure that URLs are resolved via an `IUrlHelper`.

#2807
2015-08-03 16:00:33 -07:00
N. Taylor Mullen c8df81ef91 React to aspnet/Razor#459. 2015-07-31 15:47:29 -07:00
Victor Hurdugaci 84192cb1a9 Fix the casing of a pacakge reference. It is causing cross plat issues 2015-07-30 11:39:28 -07:00
Ajay Bhargav Baaskaran e4049c07eb Razor boolean and null attribute special case handled correctly
- Issue #2769
 - Special case is only applied to null and bool value with no surrounding
   whitespace
2015-07-30 10:37:38 -07:00
Pranav K 7120b2ff92 Removing MvcViewEngineDescriptor and switching to use OptionsSetup to
setup RazorViewEngine.

Fixes #2269
2015-07-29 14:14:07 -07:00
Victor Hurdugaci e96b4d7b94 React to DNX renames 2015-07-29 04:49:49 -07:00
Andrew Stanton-Nurse 0f20eb9112 fix xml docs 2015-07-21 17:45:50 -07:00
Andrew Stanton-Nurse 991dff6b9e react to DNX renames 2015-07-21 17:23:06 -07:00
Tugberk Ugurlu 81f8b3edfb removed packExclude from unnecessary places, replaced it with
publishExclude and removed kproj and xproj excludes
2015-07-20 16:49:59 -07:00
sornaks a02082397a Introducing IHtmlContent in Mvc.Razor.
- Changing HtmlHelper and HelperResult to implement IHtmlContent.
- Introducing BufferedHtmlContent.
- Making RazorPage handle only IHtmlContent and clearing out other types.
- Making StringCollectionTextWriter use BufferedHtmlContent so that it can be returned where necessary.
- Updating places which involve Write/Copy to pass in encoders.
- The encoders are currently not being used during write. But when HtmlString is modified to carry encode metadata, the encoder can be used for writing. This is a perf optimization and hence not a part of this change.
- Making TagHelperContent implement IHtmlContent.
2015-07-10 16:24:32 -07:00
Mugdha Kulkarni 8cb2aae4f5 fixing 2704 -- Rename LanguageViewLocationExpanderOption to LanguageViewLocationExpanderFormat 2015-07-09 15:38:11 -07:00
Ryan Nowak 48bfdceea6 Add basic startup experience for MVC.Core 2015-07-08 17:16:07 -07:00