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
Enum parsing is currently case-sensitive, which makes sense because C# is case-sensitive, but I think we might be able to make the parsing less particular about case and make things a little more intuitive. I'd be willing to do a PR if the powers that be are cool with it. I can think of 2 options off the top of my head:
Allow all lower case values to be parsed.
Allow the user to explicitly specify which parameter values get mapped to which enum members, e.g.
While there's nothing stopping someone from defining 2 enum members which only differ by case, it's probably a dumb thing to do so. In either case, it's difficult to 100% guarantee that the parsing will work for all cases b/c of case-sensitivity, but it should improve things for the overwhelming majority of use cases.
Let me know if either of these designs (or a combination of both) are appealing.
The text was updated successfully, but these errors were encountered:
Enum parsing is currently case-sensitive, which makes sense because C# is case-sensitive, but I think we might be able to make the parsing less particular about case and make things a little more intuitive. I'd be willing to do a PR if the powers that be are cool with it. I can think of 2 options off the top of my head:
While there's nothing stopping someone from defining 2 enum members which only differ by case, it's probably a dumb thing to do so. In either case, it's difficult to 100% guarantee that the parsing will work for all cases b/c of case-sensitivity, but it should improve things for the overwhelming majority of use cases.
Let me know if either of these designs (or a combination of both) are appealing.
The text was updated successfully, but these errors were encountered: