question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for Attribute properties/values

See original GitHub issue

Not 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:open
  • Created 8 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
minawalphoncecommented, Nov 8, 2016

+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.

1reaction
frhagncommented, Dec 2, 2015

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found