Changelog¶
All notable changes to this project will be documented here.
The format is based on Keep a Changelog.
[Unreleased]¶
Added¶
LayeredCraft.OptimizedEnums.SystemTextJsonpackage — source-generated, zero-reflectionJsonConvertersupport[OptimizedEnumJsonConverter]attribute withByNameandByValuestrategies- Emits a concrete non-generic
JsonConverter<T>for each decorated class — no runtime reflection, full AOT/NativeAOT compatibility - Stamps
[JsonConverter(typeof(...))]on a generated partial class stub — no manualJsonSerializerOptionsregistration required - Declares
LayeredCraft.OptimizedEnumsas a NuGet dependency — only one package reference needed OE2001diagnostic for classes not inheritingOptimizedEnum<TEnum, TValue>OE2002diagnostic for classes missingpartialOptimizedEnum<TEnum>single-parameter base class forint-valued enums- Inheritance-based generation trigger —
[OptimizedEnum]attribute no longer required Microsoft.CSharp.dllbundled inanalyzers/dotnet/cs/for Scriban dynamic dispatchGetDependencyTargetPathsMSBuild target for IDE analyzer resolution
Changed¶
- Generator now triggers on
OptimizedEnum<TEnum, TValue>inheritance rather than[OptimizedEnum]attribute OE0001base-type check moved before partial check — unrelated classes no longer receive false diagnostics
Removed¶
OptimizedEnumAttribute— no longer neededOE0002(must be sealed) —sealedis now optionalOE0003(must inherit) — superseded by inheritance-based triggering