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
It would be nice to enable the NRT in the library. It will offer a better experience for the consumers and fix some subtle issues.
But. I don't think we'll be able to do that with the current structure (at least I couldn't). I'd suggest constraining the TValue generic parameter to struct.
Conceptually, that makes sense. But, it would require some substantial refactoring and will be a major breaking change. I'm not sure if anyone is using reference types as enum values, but there are such users probably.
The text was updated successfully, but these errors were encountered:
Ok, I see a lot of consumers are using string as the enum value. It's even provided as a sample in docs here. So, constraining to struct won't be a good idea. I'll give it another try enabling the NRT in the current form.
fiseni
changed the title
Define the TValue as struct and enable NRT
Add support for NRT
Apr 5, 2024
Hi,
It would be nice to enable the NRT in the library. It will offer a better experience for the consumers and fix some subtle issues.
But. I don't think we'll be able to do that with the current structure (at least I couldn't). I'd suggest constraining the
TValue
generic parameter tostruct
.Conceptually, that makes sense. But, it would require some substantial refactoring and will be a major breaking change. I'm not sure if anyone is using reference types as enum values, but there are such users probably.
The text was updated successfully, but these errors were encountered: