Enums.NET 是一款高性能的、类型安全的 .NET 枚举实用程序库。
Removed Boolean enum support and dropped support for net45 and bumped it to net461 due to updating dependencies. Also dropped support for netstandard 1.x tfms for similar reasons. Added a net7 target which utilizes the built-in generic number interfaces. Also added an EnumValidatorAttribute base class since generic attributes are now supported.
Removed NonGenericEnums, NonGenericFlagEnums, UnsafeEnums, and UnsafeFlagEnums classes which were deprecated in v3.0 and also removed all other deprecated methods in an effort to slim the library size down. It is recommended if upgrading from 2.x and below to update to 3.x first and follow the warnings to migrate any code that's using deprecated methods and classes. Also, a dependency on the System.Runtime.CompilerServices.Unsafe package was added for the .NET 4.5 target in order to remove a build dependency on Fody.
Enums.NET is a high-performance type-safe .NET enum utility library which provides many operations as convenient extension methods. It is compatible with .NET Framework 4.6.1+ and .NET Standard 2.0+.
System.EnumHasFlag method which isn't type-safe~, is inefficient,~ and is ambiguous as to whether it determines if the value has all or any of the specified flags. It's all by the way.Attributes is not supported and instead requires users to manually retrieve the Attributes via reflection. This pattern is commonly used on enum members with the DescriptionAttribute, EnumMemberAttribute, and DisplayAttribute.Enums.NET solves all of these issues and more.
…Results from running the PerformanceTestConsole BenchmarkDotNet application.
See fuget for exploring the interface.
Inspired by Jon Skeet's Unconstrained Melody.
暂无开放 Issues,或尚未同步最近议题。