Add support for Attribute properties/values
See original GitHub issueNot sure why we can only deal with a string version of the attribute value… makes it hard to reliably parse the properties of an attribute.
For example:
[Route("foo", Name = "foo")]
public ActionResult Do() {
}
[Route("foo", Order = 1, Name = "foo")]
public ActionResult Do() {
}
[Route("foo")]
public ActionResult Do() {
}
We can do string manipulation but it seems better if Typewriter just exposed a PropertyCollection.
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
HTML attribute reference - HTML: HyperText Markup Language
Attribute Name Elements Description
accept‑charset List of supported charsets.
align Deprecated, , , , , , , , , , , , Specifies the horizontal...
Read more >Attributes - web.dev
Learn about the different global attributes along with attributes specific to particular HTML elements.
Read more >Add attribute values to products - Support - Optimizely
Assign attribute values to products. Go to Admin Console > Catalog > Products. Select Edit for the desired Product. Select the Attributes finger ......
Read more >Attribute Properties in Marketing Cloud
On the Values tab, follow these steps to define the possible values for this attribute: Click the Add button to generate a new...
Read more >What are custom security attributes in Azure AD? (Preview)
Custom security attributes in Azure Active Directory (Azure AD) are business-specific attributes (key-value pairs) that you can define and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 for this feature. I have a problem which is kind of related. I’m using the attribute ResponseType on top of my webapi methods. I got the type as string this way e.g. “typeof(System.Collections.Generic.IEnumerable<FullClassName>)” if it s a collection. now i need a way to convert this string to Type. System.Type.GetType simply not working of course.
Hi @kamranayub, Typewriter behaves this way because of limitations in Visual Studio 2013 where the CodeDom provider only returns a string instead of a useful object. I’ve started work on a new Visual Studio 2015-only version of Typewriter where this kind of limitations can be removed.