Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Tag Helpers: Add ModelExpression code generation #1291

Closed

Conversation

NTaylorMullen
Copy link

  • Sealed the ModelExpression.
  • We use the stringified version of the ModelExpression type name to detect ModelExpression properties on TagHelpers. This is so the MvcRazorHost can work in tooling and in runtime.
  • Created a GeneratedTagHelperAttributeContext to represent the specific stringified versions of the ModelExpression assets.
  • Created an MvcTagHelperAttributeValueCodeRenderer to modify rendering of ModelExpression properties.

Added tests to validate attribute value rendering


#pragma warning disable 1998
public override async Task ExecuteAsync()
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being empty is expected behavior for now. TagHelpers don't support DesignTime intellisense pieces so we don't generate anything for them during DesignTime.

That will be done in this issue: #1252.

NTaylorMullen added 2 commits October 8, 2014 11:11
- Sealed the ModelExpression.
- We use the stringified version of the ModelExpression type name to detect ModelExpression properties on TagHelpers. This is so the MvcRazorHost can work in tooling and in runtime.
- Created a GeneratedTagHelperAttributeContext to represent the specific stringified versions of the ModelExpression assets.
- Created an MvcTagHelperAttributeValueCodeRenderer to modify rendering of ModelExpression properties.

#1241
- Exposed internals from Mvc.Razor.Host to Mvc.Razor.Test so it can use the MvcRazorHost override that takes the IFileSystem.
- Added end-to-end code generation tests for TagHelpers with ModelExpression properties.

#1241
@NTaylorMullen NTaylorMullen force-pushed the TagHelpers_ModelExpressionCodeGen branch from b69b7bf to 4c9bce4 Compare October 8, 2014 21:03
@NTaylorMullen
Copy link
Author

Reopening to be on TagHelpersFeature

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant