Commit Graph

14 Commits

Author SHA1 Message Date
N. Taylor Mullen 7c604d2b11 Add TagHelperOutput.Attributes and TagHelperContext.AllAttributes replacement.
- Added a TagHelperAttributes object that's used to hold 1=>many attributes. Is used for TagHelperOutput.Attributes.
- Added a ReadOnlyTagHelperAttributes object that holds 1=>many IReadOnlyTagHelperAttributes. Is used for TagHelperContext.AllAttributes.
- Added a TagHelperAttribute object which is used to represent attributes.
- Added a IReadOnlyTagHelperAttribute which is used to represent attributes which cannot be modified.

#279
2015-04-27 12:06:00 -07:00
N. Taylor Mullen 5bcda94b2c Create error when TagHelper binds to HTML attribute starting w/ data-.
- Added TagHelperDescriptorFactory tests to validate TagHelperAttributeDescriptor creation.

#342
2015-04-15 11:24:08 -07:00
N. Taylor Mullen 84afe105ec Add serviceable attribute to projects.
aspnet/DNX#1600
2015-04-07 14:48:25 -07:00
N. Taylor Mullen d22246f636 Add TagHelper attribute targeting.
- Transitioned HtmlElementNameAttribute into a more generic TargetElementAttribute. Targeting an HTML element can be done by attribute, tag or both.
- Updated TagHelperDescriptor to track required attributes.
- Updated TagHelperProvider to ask for provided attributes when resolving TagHelperDescriptors, this is used to apply RequiredAttributes.
- Updated TagHelperParseTreeRewriter to properly track HTML elements that coincide with a TagHelper scope based on the presence of RequiredAttributes.

#311
2015-03-17 21:45:41 -07:00
N. Taylor Mullen 4d97a544f1 Add TagHelperPrefix directive.
- Updated TagHelperDescriptor to have a Prefix property. This enables new tooling scenarios such as refactoring prefixes or even giving them their own classification.
- Added invalid prefix cases.
- Added TagHelperPrefix chunks, codegenerator, parsing logic to flow the directive through the Razor pipeline.

#309
2015-03-02 17:07:03 -08:00
N. Taylor Mullen 94230a5a14 Add TagHelper parse level opt-out character '!'.
- Added the ability to opt-out of TagHelper parsing by adding a '!' to the beginning of a tag name.
- Modified parsing logic to allow bangs in tags.
- Bangs in tags are removed from output always and are handled as meta code.

#187
2015-02-03 14:25:30 -08:00
N. Taylor Mullen a78ed663d0 Add ability for wildcards in @addtaghelper and @removetaghelper.
- @addtaghelper and @removetaghelper can now utilize the '*' wild card to represent 0 or more characters.
- Restricted the @addtaghelper to need the TypeName. @addtaghelper "MyAssemblyName" => @addtaghelper "*, MyAssemblyName".

#285
2015-02-03 12:15:56 -08:00
Ajay Bhargav Baaskaran 891dfa5e3e renamed TagNameAttribute to HtmlElementNameAttribute 2014-12-29 10:50:27 -08:00
N. Taylor Mullen ed9c432889 Modify TagHelperDescriptorResolver and dependencies to not throw.
- 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
2014-11-24 10:30:01 -08:00
Pranav K 473f642dde Modifying tests to run in both in aspnet50 and aspnetcore50
* Additionally trimming references from project.json
2014-10-19 21:18:43 -07:00
NTaylorMullen e5a21520e5 Add HtmlAttributeNameAttribute for TagHelpers.
- Added the ability to override the HTML attribute name for TagHelper properties.
- Tested functionality of overriding the attribute name target and inheriting the attribute name.

#121
2014-10-14 20:16:16 -07:00
NTaylorMullen 72c449bf86 Add TagName attribute for tag helpers.
- Made it so the TagHelperDescriptorFactory could pull tag name targets from TagNameAttributes on types.
- Tested the behavior between TagNameAttribute and TagHelperDescriptorFactory (the only consumer of the attribute).
- Made sure to test duplicate and inherited class scenarios.

#120
2014-10-09 12:58:12 -07:00
NTaylorMullen 66aea52542 Add TagHelperScopeManager for runtime.
- Also added an interface ITagHelperScopeManager so we can activate the type via DI.

#155
2014-10-09 12:58:03 -07:00
NTaylorMullen f9c70a0644 Add TagHelperDescriptorResolver.
- This involved also adding a TagHelperTypeResolver and TagHelperDescriptorFactory.
- The TagHelperTypeResolver is responsible for determining the format of lookup text's used throughout the tag helper system.  By default it handles the following formats:
"assemblyName"
"specificType, assemblyName"
- It also restricts what types are considered TagHelpers.  In this implementation we only accept public, non-nested, non-abstract, non-generic TagHelpers.
- The TagHelperDescriptorFactory is responsible for converting a Type to a TagHelperDescriptor.
- Added tests to validate TagHelperDescriptorResolver, TagHelperTypeResolver and TagHelperDescriptorFactory.

#99
#158
2014-10-09 12:57:49 -07:00