You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
The logic in the EnumUtils is heavily relying on Dictionaries for optimizing the performance of converting the description attribute of an enum value to the enum and back
Describe the solution you'd like
We could do better and have a source generator generate static methods that have a fast switch-case that will perform better than looking up in a dictionary (and in some flows having additional logic)
Feature request type
enhancement
Is your feature request related to a problem? Please describe
The logic in the
EnumUtils
is heavily relying on Dictionaries for optimizing the performance of converting the description attribute of an enum value to the enum and backDescribe the solution you'd like
We could do better and have a source generator generate static methods that have a fast switch-case that will perform better than looking up in a dictionary (and in some flows having additional logic)
Describe alternatives you've considered
No response
Additional context
we could use https://github.com/andrewlock/NetEscapades.EnumGenerators (see https://andrewlock.net/netescapades-enumgenerators-a-source-generator-for-enum-performance/) which also support the
Description
attributeor maybe https://www.nuget.org/packages/Microsoft.Extensions.EnumStrings but it's not clear what the state of this is due to dotnet/extensions#4639
The text was updated successfully, but these errors were encountered: