aspnetcore/test/Microsoft.AspNetCore.Razor....
N. Taylor Mullen 8f9ff1abd9 Clean up TagHelperDescriptor APIs.
- 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
2017-03-17 12:18:05 -07:00
..
CodeGeneration Fix broken padding in design time 2017-03-06 15:54:47 -08:00
IntegrationTests Clean up TagHelperDescriptor APIs. 2017-03-17 12:18:05 -07:00
Intermediate Make CSharpRenderingContext and friends public 2017-02-28 19:04:51 -08:00
Legacy Clean up TagHelperDescriptor APIs. 2017-03-17 12:18:05 -07:00
Properties
TestFiles Port the legacy RazorEditorParser 2017-03-16 12:47:29 -07:00
DefaultDirectiveIRPassTest.cs Clean up TagHelperDescriptor APIs. 2017-03-17 12:18:05 -07:00
DefaultDirectiveSyntaxTreePassTest.cs Replace RazorError with RazorDiagnostics in public API 2017-02-17 15:44:37 -08:00
DefaultDocumentClassifierPassTest.cs Introduces RuntimeTarget and abstraction for APIs 2017-02-13 15:34:51 -08:00
DefaultInstrumentationPassTest.cs Replace CSharpIRToken with RazorIRToken 2017-02-17 16:27:31 -08:00
DefaultItemCollectionTest.cs
DefaultRazorCSharpLoweringPhaseTest.cs Collate diagnositcs from Imports 2017-03-08 18:29:17 -08:00
DefaultRazorCodeDocumentTest.cs
DefaultRazorDiagnosticTest.cs Re-enable netcoreapp1.1 tests 2017-02-16 14:09:12 -08:00
DefaultRazorDirectiveClassifierPhaseTest.cs Refactor IR phases 2017-02-14 14:51:36 -08:00
DefaultRazorDocumentClassifierPhaseTest.cs Refactor IR phases 2017-02-14 14:51:36 -08:00
DefaultRazorEngineBuilderTest.cs
DefaultRazorEngineTest.cs
DefaultRazorIRLoweringPhaseIntegrationTest.cs Clean up TagHelperDescriptor APIs. 2017-03-17 12:18:05 -07:00
DefaultRazorIROptimizationPhaseTest.cs Refactor IR phases 2017-02-14 14:51:36 -08:00
DefaultRazorParsingPhaseTest.cs
DefaultRazorSourceDocumentTest.cs Add RazorSourceDocument.Create(string template) 2017-03-13 09:44:06 -07:00
DefaultRazorSyntaxTreePhaseTest.cs
DirectiveDescriptorBuilderTest.cs Remove literal directive tokens. 2017-02-03 12:02:16 -08:00
DirectiveRemovalIROptimizationPassTest.cs Refactor IR phases 2017-02-14 14:51:36 -08:00
DocumentClassifierPassBaseTest.cs Part 2 of RuntimeTarget 2017-02-15 18:08:19 -08:00
FileSystemRazorProjectItemTest.cs Add RazorSourceDocument.Create(string template) 2017-03-13 09:44:06 -07:00
FileSystemRazorProjectTest.cs Move FileSystemRazorProject into Razor.Evolution 2017-02-28 14:15:52 -08:00
HtmlNodeOptimizationPassTest.cs
LargeTextRazorSourceDocumentTest.cs Add RazorSourceDocument.Create(string template) 2017-03-13 09:44:06 -07:00
LegacyRazorDiagnosticTest.cs
Microsoft.AspNetCore.Razor.Evolution.Test.csproj React to aspnet/Testing#259 2017-03-16 09:31:55 -07:00
RazorCodeDocumentExtensionsTest.cs
RazorCodeDocumentTest.cs
RazorDiagnosticDescriptorTest.cs
RazorDiagnosticTest.cs
RazorEngineBuilderExtensions.cs
RazorEngineBuilderExtensionsTest.cs Part 2 of RuntimeTarget 2017-02-15 18:08:19 -08:00
RazorEngineTest.cs Introduce RazorCompilation 2017-02-22 10:22:18 -08:00
RazorProjectItemTest.cs Add RazorSourceDocument.Create(string template) 2017-03-13 09:44:06 -07:00
RazorProjectTest.cs Add support for base path in FindHiearchicalItems 2017-03-13 11:15:11 -07:00
RazorSourceDocumentTest.cs Add RazorSourceDocument.Create(string template) 2017-03-13 09:44:06 -07:00
RazorSyntaxTreeTest.cs
RazorTemplateEngineTest.cs Include default imports when ImportsFileName is null 2017-03-14 19:33:18 -07:00
SourceLocationTest.cs
SourceSpanTest.cs
SyntaxTreeVerifier.cs
TagHelperBinderSyntaxTreePassTest.cs Clean up TagHelperDescriptor APIs. 2017-03-17 12:18:05 -07:00
TagHelperRequiredAttributeDescriptorTest.cs Clean up TagHelperDescriptor APIs. 2017-03-17 12:18:05 -07:00
TestFile.cs
TestProject.cs Move FileSystemRazorProject into Razor.Evolution 2017-02-28 14:15:52 -08:00
TestRazorCodeDocument.cs
TestRazorProject.cs Port the legacy RazorEditorParser 2017-03-16 12:47:29 -07:00
TestRazorProjectItem.cs Introduce RazorCompilation 2017-02-22 10:22:18 -08:00
TestRazorSourceDocument.cs
TestTagHelperDescriptorResolver.cs Replace RazorError with RazorDiagnostics in public API 2017-02-17 15:44:37 -08:00
TestTagHelperFeature.cs