YamlDotNet icon indicating copy to clipboard operation
YamlDotNet copied to clipboard

Support source generation for struct types

Open Baka632 opened this issue 11 months ago • 2 comments
trafficstars

Is your feature request related to a problem? Please describe. I wish to serialize/deserialize struct types (including readonly struct) when NativeAOT enabled, but when I use my own StaticContext, it throws NotImplementedException.

I checked the output of YamlDotNet.Analyzers.StaticGenerator and found that no code was generated for my struct.

Describe the solution you'd like Modify source generator to support struct types.

Describe alternatives you've considered Convert my struct to class, but it's a breaking change.

Additional context I am using Vecc.YamlDotNet.Analyzers.StaticGenerator for source generation.

Baka632 avatar Nov 27 '24 16:11 Baka632