Commit Graph

73 Commits

Author SHA1 Message Date
Pranav K 7ff56dadf4 CodeGen RouteTemplate as a RazorCompiledItemAttribute 2018-03-19 12:37:04 -07:00
Ryan Brandenburg 7a7cc5ab1e Set 2.0 baselines 2018-03-19 10:46:23 -07:00
Ryan Nowak 5b28c06d64
Add prelimianry support for extensions to Razor (#2012)
* Add prelimianry support for extensions to Razor

This PR adds MSBuild insfrastructure to the SDK that can understand
concepts we need to expose to the project, code generator and runtime
like:
- Language version
- Configuration
- Extensions (plugins)

As an example of how this works, I've done the wireup for MVC. This will
now generate assembly attributes in your application that can act as a
source-of-truth for what should be included in runtime compilation, and
it's all based on the project-file. This means that it can be delivered
and configured by packages.

The next step here is to implement a loader for RazorProjectEngine based
on these primitives, and then use it in our CLI tools and MVC.

The next step after that is to expose it in VS and VS4Mac through the
project system.
2018-02-02 17:41:14 -08:00
Ryan Nowak 186e5733c0
Add metadata to Razor (#1894)
* Add metadata to Razor

This PR introduces standard metadata to Razor. This change begins to
formalize the contract between generated code produced by Razor and
runtimes that want to load and interact with this code.

This is a step on making MVC a 'plugin' to Razor rather than the only
possible implementation. Since we're doing MSBuild work - this is the
right time to designate the current interaction between Razor and MVC as
'legacy' and move forward.

Additionally, we need the source thumbprinting to make re-compilation of
Razor a thing.

-----

Also I noticed that our source document doesn't expose the hash
algorithm by name. We really should have this, so I added it and
hardened the code that deals with checksums in c# generation.
2018-01-02 13:30:50 -08:00
Ryan Nowak b900a82bc3 Refocus Razor runtime assemblies
Microsoft.AspNetCore.Razor becomes the home for TagHelper-related types
that you use in your code.

Microsoft.AspNetCore.Razor.Runtime becomes the home type types you need
to build a view engine. User code should not need this package anymore.

None of these are breaking changes due to typeforwards.
2017-12-19 13:26:07 -08:00
Nate McMaster 4d737af167 Pin tool and package versions to make builds more repeatable
Part of aspnet/Universe#575
2017-11-01 18:12:08 -07:00
Javier Calvarro Nelson d1cca77852 Update API Check baselines to 2.0.0 2017-09-22 15:33:52 -07:00
Nate McMaster 471722eba1 Use PackageLineup to manage PackageReference versions
This uses a feature of KoreBuild which will select PackageReference
versions based on a lineup file. This helps unify versions between repos
and helps us ensure we are consistent across multiple components.
2017-08-25 15:44:05 -07:00
Nate McMaster 4cadee2762 Use Directory.Build.props/targets (#1641) 2017-08-23 12:24:57 -07:00
Ajay Bhargav Baaskaran ce689b0449 Fixed DebuggerDisplay in DefaultTagHelperContent
- Also refactored it in few other places
2017-08-01 12:13:55 -07:00
N. Taylor Mullen 99ff9d44a3 Update repo to utilize ApiCheck.
- Re-enabled api check for `Microsoft.AspNetCore.Razor` and `Microsoft.AspNetCore.Razor.Runtime`. This resulted in me adding known breaking changes for the packages.
- Added empty baseline files for `Microsoft.AspNetCore.Razor.Language`, `Microsoft.AspNetCore.Mvc.Razor.Extensions` and `Microsoft.CodeAnalysis.Razor`.
- Disabled ApiCheck for `Microsoft.CodeAnalysis.Razor.Workspaces`, `Microsoft.CodeAnalysis.Remote.Razor`, `RazorPageGenerator` and `Microsoft.VisualStudio.LanguageServices.Razor` to prevent ApiCheck warnings about missing baselines.

#1107
2017-07-07 15:59:36 -07:00
Nate McMaster 4d18334573 Target .NET Standard 2.0 2017-06-08 16:37:27 -07:00
Pranav K 758be9ae13 Remove usage of TaskCache 2017-06-08 11:05:39 -07:00
Ryan Nowak dbb682799e Update generated designer files 2017-04-04 09:14:03 -07:00
Jass Bagga fe6517dcdd Add ITagHelperComponent
Addresses https://github.com/aspnet/Mvc/issues/5728
2017-03-24 13:53:17 -07:00
Pranav K 2ea0659e60 Change compilation targets.
* Remove net451 as a compilation target
* Upgrade to netcoreapp2.0
2017-03-24 07:49:34 -07:00
Doug Bunting 6fbbd5d148 Disable API Check in projects with untracked breaking changes 2017-03-22 08:35:10 -07:00
Ryan Brandenburg a7eb30ddca Remove old razor 2017-03-17 14:58:13 -07:00
Nate McMaster 43a41398ac Unify dependency versions to one file 2017-03-15 16:44:00 -07:00
Jass Bagga a418a175a9 Add TagName to TagHelperContext
Addresses #1065
2017-03-09 14:59:11 -08:00
Nate McMaster 279855d947
Downgrade to stable packages 2017-02-14 16:15:35 -08:00
Ryan Nowak e549270b4a Add RazorDiagnostic type
This is a replacement for RazorError, is conceptually equivalent with
Diagnostic from Roslyn.

The next PR will start exposing this through our public API rather than
the legacy type.
2017-01-31 15:53:22 -08:00
Nate McMaster 79663ef90e Upgrade to RC.3 2017-01-20 09:01:49 -08:00
Nate McMaster 91bc4b3940 Remove redundant references 2017-01-05 18:12:53 -08:00
Pranav K 7657ea41a3 Updating to 4.4 CoreFx packages 2016-12-21 22:43:57 -08:00
Nate McMaster 705a490acb Upgrade to VS 2017 2016-12-16 16:04:22 -08:00
Pranav K c746fd81df Updating versions to 1.2.0-* 2016-11-09 14:19:11 -08:00
jacalvar b9e58a4fe6 Created public API baselines 2016-11-08 11:05:35 -08:00
Pranav K 039e1021a4 Updating partner package versions 2016-09-28 11:51:56 -07:00
Pavel Krymets bdbb854bdb Use TaskCache class from Microsoft.Extensions.TaskCache.Sources (#829)
Instead of Task.FromResult(0)
2016-09-07 14:53:06 -07:00
Pranav K 5944dd6f87 Small perf fixes to improve precompilation times 2016-09-01 09:44:30 -07:00
Crystal Qian d19845730f Added a copy constructor for tag helper descriptors. (#827) 2016-08-31 15:38:35 -07:00
Crystal Qian 489c0d9046 Added view component tag helper updates. (#823)
Added view component tag helper updates.

aspnet/mvc#1051
2016-08-24 16:01:59 -07:00
Doug Bunting 05a52f445f One build to rule them all
- well, at least VS and command-line builds will share output
- part of aspnet/Coherence-Signed#277
2016-07-07 12:26:20 -07:00
Pranav K eb2b58188a Updating to dev versions
# Conflicts:
#	test/Microsoft.AspNetCore.Razor.Test/project.json
2016-06-16 10:41:31 -07:00
N. Taylor Mullen ccba161447 Move `FileSystem` dependency from Razor to Razor.Runtime. 2016-06-09 15:58:55 -07:00
mnltejaswini 3b9539960b [Perf] Preallocate TagHelperAttributes for simple bound string valued attributes Fixes #704 2016-06-01 11:24:32 -07:00
Doug Bunting 44f0aa63c6 Do not HTML encode while checking for whitespace
- #760
- using a `NullHtmlEncoder` improves `TagHelperContent.IsEmptyOrWhiteSpace` semantics
 - e.g. a tab is still a tab after encoding
 - also avoids `NotImplementedException`
- implement `Write(char)` for char-by-char `IHtmlContent` corner case
2016-05-31 22:09:19 -07:00
N. Taylor Mullen e14f4b095d Track `TagHelperAttribute` quotes.
- Removed `Minimized` from `TagHelperAttribute` and replaced it with `HtmlAttributeValueStyle`.
- Removed `AddMinimizedTagHelperAttribute` method from `TagHelperExecutionContext` since we always provide a `HtmlAttributeValueStyle` now.
- Stopped manually escaping double quotes because we now know how an attribute was originally written.
- Updated tests to account for new attribute format (from kvp).

#705
2016-05-27 12:28:33 -07:00
John Luo ccd0d52d8e React to updated CoreCLR packages
https://github.com/aspnet/Coherence/issues/97
2016-05-26 18:32:23 -07:00
Ben Adams cacd16fa85 Remove pragma warning disable 1998
Function doesn't need async
2016-05-20 15:03:38 -07:00
Pranav K 852642de84 Revert "React to updated CoreCLR packages."
This reverts commit 46f7a8575e.
2016-05-18 09:37:25 -07:00
N. Taylor Mullen d27ab1ce3d React to `HtmlEncodedString` rename to `HtmlString`.
- Updated test output to reflect new `HtmlString` naming.

aspnet/HtmlAbstractions.25
2016-05-17 12:13:26 -07:00
N. Taylor Mullen 46f7a8575e React to updated CoreCLR packages.
https://github.com/aspnet/Coherence/issues/97
2016-05-17 12:11:54 -07:00
Pranav K 2c4b0e8a7f Fix build warnings 2016-05-02 14:39:19 -07:00
Pranav K eeed1036e3 Stop compiling for dnx451
Fixes #734
2016-04-15 13:12:14 -07:00
Pranav K 78c742c6ee Removing imports from src projects 2016-04-08 06:48:49 -07:00
N. Taylor Mullen c400289de5 Change `DefaultTagHelperContent` to be smart about single content entries.
- Today `TagHelperContent`s always allocate their underlying buffer even though they typically only ever have a single entry. Added a field to enable us to only allocate the backing buffer when we absolutely need to.
- Removed `IsEmpty` from `TagHelperContent` since it was not used in any of our `TagHelper`s for simplification. Changed `IsWhiteSpace` naming to be `IsEmptyOrWhiteSpace` since it can be used to indicate either state.
- Updated tests.

#621
2016-04-05 16:09:06 -07:00
N. Taylor Mullen 4212b7e713 Add `SetOutputContentAsync` to `TagHelperExecutionContext` to prevent allocation of `Task<T>`.
- Previously we'd do `executionContext.Output.Content = await executionContext.Output.GetChildContentAsync()`. The problem with this approach is that it returned a `Task<TagHelperContent>` which could not be optimized when building in release.
- Added test to validate `SetOutputContentAsync` does the appropriate thing.

#721
2016-04-02 22:58:37 -07:00
jacalvar abaf3bba50 Make dependencies injectable in TagHelperDescriptorResolver.
* Added an interface for ITagHelperTypeResolver and made TagHelperTypeResolver implement it.
* Added an interface for ITagHelperTypeDescriptorFactory and made TagHelperDescriptorFactory implement it.
* Added a constructor on TagHelperDescriptorResolver that takes in an ITagHelperTypeResolver and ITagHelperDescriptorFactory.
2016-04-01 11:25:47 -07:00