- add `ToString()` overrides for these classes
Nits:
- improve assertion failures about code mapping mismatches
- add `GENERATE_BASELINES` reminder to test project.json
- precursor for #129
- remove unused `GeneratorResults` ctor to avoid duplicating `ParserResults` code
nit: make a few `ParserResults` properties immutable
- also change `ParserErrors` type to `IEnumerable<RazorError>`
- Added a 0414 warning disable/restore around the __tagHelperStringValueBuffer since it's the only TagHelper utility field that "may" never be used.
- Regenerated baselines for TagHelper test files.
#260
- Added detection of unclosed tags (tags without begin/end).
- Added recovery of potentially unclosed tags.
- Added detection of invalid structure tags (tags that do not end with '>').
- Modified detection of bad attribute values to be parse errors instead of runtime errors.
- Modified RazorParser to sort errors. This made writing tests more intuitive and ultimately ensures that the editor shows errors in the correct order.
- Added tests to validate invalid tag structure.
- Added tests to validate invalid attributes.
- Added tests to validate unclosed tags.
#104
- We now create LineMappings for instances where a TagHelper's attribute value is not of a string type.
- This will enable the Razor editor to create projections from .cshtml => .cs for TagHelper attributes.
- Modified the TagHelperCodeGenerator and TagHelperBlockBuiler to accurately track the attribute values start locations so it could flow into code generation.
- Modified existing tests to account for the new line mappings.
#207
- The ID is created at view compilation time and is unique per TagHelperExecutionContext and thus per HTML element in the source for which Tag Helpers will run
- #241
- Ultimately this enables tooling to inspect what TagHelperDescriptors were found on a document and construct HTML schema based off of them.
- Added XML doc on the classes I touched that didn't have docs.
- Added [NotNull] to the result construct parameters.
- Added tests to validate that TagHelperDescriptors flow when found after parsing a Razor document.
#215
- Also added tests to validate that non string TagHelper attributes inherit the SpanKind.COde behavior.
- Removed a block wrapping around single markup spans.
- Modified existing tests that expected the resolvers to throw to no longer throw.
- Added new test to validate that unexpected errors that are thrown are also handled.
#210
- Changed the TagHelperDescriptorResolver, TagHelperTypeResolver and AddOrRemoveTagHelperSpanVisitor to not throw when they're unable to understand the users directive lookup text.
- This involved utilizing the new ParserErrorSink to capture errors found during TagHelperDescriptor resolution.
#210
- #EngineeringDay
- skip generated files such as Resources.Designer.cs and files under
test\Microsoft.AspNet.Razor.Test\TestFiles\CodeGenerator\CS\Output
- #EngineeringDay
- Total replaced: 506 Matching files: 118
Did not change any files under test/Microsoft.AspNet.Razor.Test/TestFiles
- avoiding need to redo hashes
- Updated all of the tests to use the new ITagHelperDescriptorResolver signature so instead of passing strings they now construct TagHelperDescriptorResolutionContexts.
- Removed several tests from the AddOrRemoveTagHelperSpanVisitorTests. This was due to the change in responsibility of managing the found TagHelperDescriptors; the TagHelperDescriptorResolver now does this.
- Added several new tests to verify the TagHelperDescriptorResolver manages resolved TagHelperDescriptors based on the given TagHelperDirectiveDescriptors.
#214
- Modified the AddOrRemoveTagHelperSpanVisitor to no longer manage TagHelperDescriptors found in the system. Instead it now manages TagHelperDirectiveDescriptors which are then used to resolve TagHelperDescriptors.
- Changed the signature of ITagHelperDescriptorResolver to take in a TagHelperResolutionContext which will allow us to pass more information without breaking tooling.
- TagHelperDescriptorResolver now resolves all TagHelperDescriptors at once and manages descriptors found in the system based on values on the provided TagHelperDirectiveDescriptors.
#214
- Modified our default TagHelperDescriptorResolver to provide a protected virtual method that it uses under the covers to resolve descriptors for an entire assembly. This will enable tooling to cache descriptors on a per-assembly basis.
#214
- Right now the only information that is used from the PropertyInfo is the PropertyName and the PropertyType, therefore changed the PropertyInfo property on TagHelperAttributeDescriptor to be AttributeTypeName since we already had an accessor for AttributePropertyName.
- Modified test comparers to validate type names.
#214
- TagHelperDescriptor's need a way to showcase where they came from so tooling can reverse look them up.
- Update tests to specify TagHelperDescriptor assembly names.
#214
- We now generate a subset of the TagHelper runtime code during DesignTime. This enables users to see errors in the editor
- Added tests to validate design time code generation.
- Refactored runtime code generation tests (we now use a lot of their infrastructure for the design time pieces).
#208
- Added utility methods to construct valid SyntaxTreeNodes that represent the @removetaghelper directive.
- Added parse level unit tests to validate the @removetaghelper generates an accurate SyntaxTreeNode.
- Added parse level unit tests to validate the @removetaghelper throws with bad formats.
- Added TagHelperRegistration unit tests to validate the AddOrRemoveTagHelperCodeGenerators are understood and affect the descriptors found.
- Added Designtime mapping tests to validate correct source mappings are made to ensure proper coloring and lack-of C# intellisense.
- Added end-to-end tests to validate @removetaghelper can essentially disable TagHelpers on a page.
#112
- Added parsing recognition of the @removetaghelper directive.
- Added TagHelperDescriptor handling: @removetaghelper will cause the system to ignore TagHelpers that are added via @addtaghelper.
- Added Chunk generation, this involved building a CodeGenerator (soon to be named ChunkGenerator) that pulled out the stringified @removetaghelper lookup text which it then uses to construct a RemoveTagHelperChunk.
- Modified CodeVisitors to now understand RemoveTagHelperChunk's.
- Added code generation, this involved creating a dummy string in order to give the @removetaghelper "..." coloring.
#112
- Changed the Attributes dictionary to utilize a StringComparer.OrdinalIgnoreCase comparer.
- Changed TagHelperExecutionContext to ignore attribute casing.
- Updated the AllAttributes and HtmlAttributes dictionaries to ignore attribute casing.
- Added tests to validate their new behavior.
#186
- Whenever we encounter an @addtaghelper directive we add it to the CodeTree at the top level (not nested in any chunk blocks).
- Added a test to validate that @addtaghelper inside of a ChunkBlock doesn't add to the ChunkBlock's children.
#195.