-
Notifications
You must be signed in to change notification settings - Fork 228
Conversation
@@ -56,6 +56,12 @@ public class TagHelperAttributeValueCodeRenderer | |||
throw new ArgumentNullException(nameof(renderAttributeValue)); | |||
} | |||
|
|||
if (attributeDescriptor.IsEnum && !complexValue) | |||
{ | |||
writer.Write(attributeDescriptor.TypeName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be the FullName
? Same class of issue as #580
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeName
is the equivalent to FullName
Bump |
|
@@ -56,6 +56,12 @@ public class TagHelperAttributeValueCodeRenderer | |||
throw new ArgumentNullException(nameof(renderAttributeValue)); | |||
} | |||
|
|||
if (attributeDescriptor.IsEnum && !complexValue) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is used three times in CSharpTagHelperCodeRenderer
but the new code is relevant only for CSharpTagHelperCodeRenderer.RenderRawAttributeValue()
. Suggest moving this addition there.
⌚ for one location question and MVC reaction PR. |
🆙 📅 MVC Pr: aspnet/Mvc#3435 |
// So quoting or buffering are not helpful. | ||
RenderRawAttributeValue(attributeValueChunk, attributeDescriptor, isPlainTextValue); | ||
RenderCodeAttributeValue(attributeValueChunk, attributeDescriptor, isPlainTextValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
|
- If a `TagHelper` attribute is an `enum` then you no longer need to provide the `enum` name. To override this functionality you can add the `@` symbol. - Added code generation tests. - Added `TagHelperDescriptorFactoryTest`s that double for Precompilation tests. #196
81be8c2
to
22ecf85
Compare
TagHelper
attribute is anenum
then you no longer need to provide theenum
name. To override this functionality you can add the@
symbol.TagHelperDescriptorFactoryTest
s that double for Precompilation tests.Tag Helpers: Add enum attribute support. #196