Skip to content

Conversation

@ThadHouse
Copy link

The existing method in general works, but throws an IL1026 warning while trimming. Theres no universal way in a generic to generate a per enum deserialization scheme.

However, since the keys are always strings, it is possible to deserialize into a Dictionary<string, string>. That dictionary can then be easily mapped into the typed enums.

NS2.0 is missing the fast enum parse function, so the code is conditionally compiled to NS2.0 and the other targets

The existing method in general works, but throws an IL1026 warning while trimming. Theres no universal way in a generic to generate a per enum deserialization scheme.

However, since the keys are always strings, it is possible to deserialize into a Dictionary<string, string>. That dictionary can then be easily mapped into the typed enums.

NS2.0 is missing the fast enum parse function, so the code is conditionally compiled to NS2.0 and the other targets
@AppVeyorBot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants