Go to file
N. Taylor Mullen 212d97e511 Manage VisualStudioRazorParser lifetime.
- Exposed `VisualStudioRazorParser`, `DocumentStructureChangedEventArgs` and `ICanHasContextChangedListener` as ways to consume the new parser for a Razor document.
- Split the `VisualStudioRazorParser` into an abstract base and an implementation to avoid internal constructors.
- Changed the parser and corresponding smart indenter to take in document trackers, template engine factories and parser context change listeners. Of these additions the parser context change listeners will be deprecated once we own the TagHelper discovery mechanisms.
- Changed how the parser manages its internal parsing life cycle. It now creates template engines when the document tracker tells it to. So when project changes happen or new documents are opened the parser will re-instantiate its internal parser to ensure that it is parsing against the correct configurations.
- Removed all accessor services in favor of a singular RazorEditorFactoryService. This service is responsible for retrieving/creating various Razor components.
- Changed the code document provider to now use the parser provider in order to locate code documents associated with buffers. Prior to this that logic was hard coded.
- Removed old template engine reconstruction logic in the document tracker now that the parser owns that piece.
- Updated tracker to notify listeners when it's unsubscribing. This is how listeners can know when to tear bits down.
- Refactored/added pieces to the `DefaultVisualStudioRazorParser` in order to improve its unit/integration testing ability.
- Updated existing tests to react to new signatures.
- Added new visual studio razor parser tests, uncommented existing ones, and re-enforced ones that were previously flakey.
- Added various tests for the new services added, i.e. text buffer factory service tests.

#1630
2017-10-23 14:39:15 -07:00
build Add an opt-out for building the VSIX 2017-10-20 16:33:38 -07:00
shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources
src Manage VisualStudioRazorParser lifetime. 2017-10-23 14:39:15 -07:00
test Manage VisualStudioRazorParser lifetime. 2017-10-23 14:39:15 -07:00
tooling Manage VisualStudioRazorParser lifetime. 2017-10-23 14:39:15 -07:00
.appveyor.yml Update bootstrappers 2017-10-09 12:45:14 -07:00
.editorconfig
.gitattributes
.gitignore
.travis.yml
CONTRIBUTING.md
Directory.Build.props Add RepositoryRoot 2017-10-18 09:37:36 -07:00
Directory.Build.targets Use PackageLineup to manage PackageReference versions 2017-08-25 15:44:05 -07:00
LICENSE.txt
NuGet.config Bump Roslyn to a 2.6.0 build 2017-08-30 15:30:57 -07:00
NuGetPackageVerifier.json
README.md Use PackageLineup to manage PackageReference versions 2017-08-25 15:44:05 -07:00
Razor.Slim.sln Increase Minimum Version of Visual Studio to 15.3.0 2017-09-21 17:57:36 -07:00
Razor.sln Revert "Revert MonoAddin build steps." 2017-10-02 11:56:45 -07:00
build.cmd Update bootstrappers 2017-10-09 12:45:14 -07:00
build.sh Update bootstrappers 2017-10-09 12:45:14 -07:00
run.cmd Update bootstrappers 2017-10-09 12:45:14 -07:00
run.ps1 Update bootstrappers 2017-10-09 12:45:14 -07:00
run.sh Update bootstrappers 2017-10-09 12:45:14 -07:00
version.xml

README.md

Razor

AppVeyor: AppVeyor

Travis: Travis

The Razor syntax provides a fast, terse, clean and lightweight way to combine server code with HTML to create dynamic web content. This repo contains the parser and the C# code generator for the Razor syntax.

This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the Home repo.

Building from source

To run a complete build on command line only, execute build.cmd or build.sh without arguments.

Before opening this project in Visual Studio or VS Code, execute build.cmd /t:Restore (Windows) or ./build.sh /t:Restore (Linux/macOS). This will execute only the part of the build script that downloads and initializes a few required build tools and packages.

See developer documentation for more details.