Enums.NET v3.0.0 Release NotesRelease Date: 2019-11-02 // 10 days ago
🆕 New Features
- ➕ Added C# 8 nullable reference annotations throughout.
- ⬇️ Reduced default memory usage by over 83% by minimizing generic code over the enum type, due to value type generic argument code explosion.
- 👌 Improved performance throughout.
- ➕ Added
ReadOnlySpan<char>parsing support when targeting .NET Core 3.0+.
💥 Breaking Changes
GetFlagMembersnow all return an
- 🚚 Since
IReadOnlyList<T>was added in .NET Framework 4.5, support for prior .NET Framework versions has been removed.
- 🏗 .NET Standard builds now depend on the
System.Runtime.CompilerServices.Unsafepackage for efficient conversions between the enum and its underlying type instead of relying on Fody to implement that.
UnsafeFlagEnumsare now deprecated and will be removed in v4.0. The equivalent methods have been added to the
FlagEnumsclasses with the unsafe versions having the suffix of
Unsafeto avoid a naming conflict with the type-safe versions. This was done to better match
System.Enumand provide better discoverability being more centralized. I've created the C# roslyn analyzer
Enums.NET.Analyzerwhich provides a code fix to migrate your usages of the non-generic and unsafe methods to the new methods.
- 👍 Nullable enum types are not supported in the new non-generic methods but are still supported when using
- 🚚 Deprecated many convenience method overloads as there were getting to be too many and will be removed in v4.0.
UnsafeEnumComparerwere removed, use
TEnumtype argument is no longer constrained to
struct, Enumto support this.
- 🚚 A few
TryToObjectoverloads were removed due to there being too many convenience method overloads.
Previous changes from v2.3.2
🆕 New Features
- ➕ Added SourceLink support.
- ✨ Enhanced Unity compatibility with AOT compilation.
- 👉 Uses C# 7.3's built-in support for the