- Removed all design time descriptors and put their API surface into their corresponding descriptor. Part of removing the design time API surface was removing the tracking of `<Remarks>`, it wasn't used so there's on need to track it until we need it. - Removed the Type requirement from `TagHelperDescriptor`. With this separation we'll be able to have abstract `TagHelper`s that aren't based on a class implementation. - Removed Prefix from the `TagHelperDescriptor` API surface. It was a legacy requirement based on how the Razor parser was put together. We can work around this now. - Stripped correlation information from the immediate `TagHelperDescriptor` API surface. Instead this information is now tracked in `TagMatchingRule`s. This change means that you will not have multiple `TagHelperDescriptor`s per `TagHelper`; instead it's all tracked in a single descriptor. A side effect of this change was the transformation of `IsIndexer` => 3 new properties. - Renamed many descriptor types and property names. - Added builder APIs to construct TagHelpers since they're inherently immutable in their API surface. - Added `ITagHelperDescriptorBuilder` to represent `TagHelper`s that are built from an `ITagHelper` implementing class. It re-introduces the `TypeName` association of a `TagHelper`. - Added `ITagHelperBoundAttributeDescriptorBuilder` to represent that an attribute was associated with a property. - Added validation methods to the descriptor builders to enable consumers to validate the current state of the builder and add diagnostics as necessary. - Moved descriptors away from RazorError. - Updated the various comparers to understand the descriptors new API. - Added a new `RazorDiagnosticFactory` abstraction to handle `RazorDiagnostic`s and their corresponding errors/ids etc. This new API should allow for easy addition of new `RazorDiagnostic` errors. - Updated the `DefaultTagHelperDescriptorFactory` to construct `TagHelperDescriptor`s using the new builder APIs and in the new descriptor format (1 descriptor per type). - Updated `ViewComponentTagHelperDescriptorFactory` to construct `TagHelperDescriptor`s with the builder API. - With both factory implementations code was duplicated because the ViewComponent work will be moving outside of Razor once we have the proper hooks. - Updated `TagHelper` binding bits to capture a binding result in order to query which rules appy to a given tag name. Addressed feedback - Update tests to react to new `TagHelperDescriptor` API. - Remove case sensitive comparers and some cleanup - Added TagHelperDescriptorJsonConverter, RazorDiagnosticJsonConverter and added serialization tests |
||
|---|---|---|
| build | ||
| shared/Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources | ||
| src | ||
| test | ||
| tooling/Microsoft.VisualStudio.RazorExtension | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .travis.yml | ||
| CONTRIBUTING.md | ||
| LICENSE.txt | ||
| NuGet.config | ||
| NuGetPackageVerifier.json | ||
| README.md | ||
| Razor.sln | ||
| appveyor.yml | ||
| build.cmd | ||
| build.ps1 | ||
| build.sh | ||
| version.props | ||
README.md
Razor
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.