stevedunn/intellenum
Intellenum is an open source C# project that provides a fast and efficient way to deal with enums through source generation. It uses attributes to specify the enum and then generates backing code for extremely fast, allocation-free lookups using methods like FromName
and FromValue
. Intellenum also supports various underlying types, including custom types, and provides safety features through code analyzers. It can be installed via NuGet and offers methods for configuration, deconstruction, and serialization. Intellenum’s performance is significantly faster than standard enums and other libraries, as shown in the provided benchmarks. It is constantly monitored for performance and can be used as a key in a Dictionary for serialization with System.Text.Json. The generated code includes switch expressions for compile-time constant values and switch statements for FromValue
methods. Intellenum is in beta and has borrowed features from the established Vogen library.
Project Information
- Repository: SteveDunn/Intellenum
- Owner: SteveDunn
- Language: C#
- Created at: 2023-02-26
- Last Updated: 2024-11-07
Engagement Metrics
- Stars: 198
- Forks: 4
- Open Issues: 6
- Watchers: 198
- Subscribers: 5
Contribution Opportunities
- Issues are available for contributions.
- Project boards are active.
- Wiki is available for documentation and guides.
License
Apache License 2.0
Recent Contributors
SteveDunn
158 Contributions
dependabot[bot]
19 Contributions
jupjohn
10 Contributions
NoahStolk
6 Contributions