Could the reflection algorithm fallback to properties if there are no fields?
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 184
- PR merge metrics
- No merged PRs in 30d
Description
It's generally easier to track properties w/ codelens etc. over fields. You get a nice view of the references in Visual Studio.
Would it be possible to lookup the class's static properties in the case where there are no public static fields?
It might consdered a breaking change at this point, but maybe its unlikely that someone doesn't have fields at this point.
Contributor guide
Research direction
Start by locating the reflection algorithm that looks up public static fields on the SmartEnum class. Trace the case where no fields are found, then inspect how static properties could be discovered and add tests covering property fallback and the existing field-based behavior; done means both cases resolve correctly without unintentionally changing field behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100