CodeChops.MagicEnums
1.4.2
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package CodeChops.MagicEnums --version 1.4.2
NuGet\Install-Package CodeChops.MagicEnums -Version 1.4.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodeChops.MagicEnums" Version="1.4.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeChops.MagicEnums" Version="1.4.2" />
<PackageReference Include="CodeChops.MagicEnums" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CodeChops.MagicEnums --version 1.4.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CodeChops.MagicEnums, 1.4.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CodeChops.MagicEnums@1.4.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CodeChops.MagicEnums&version=1.4.2
#tool nuget:?package=CodeChops.MagicEnums&version=1.4.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Flexible and extendable enums for C#:
It is possible to use other member values than integral types. For example:
- Strings that automatically represent their member name:
- This prohibits incorrect usage of integral values when they are not needed;
- It removes the need to keep track of (incremental) integral values;
- Custom defined types, for example see StrictDirection: https://github.com/Code-Chops/Geometry/;
- Strings that automatically represent their member name:
Inheritance and/or partial records can be used to extend your enums:
- Enums can now be extended in multiple projects;
- Custom methods can be added to enums, if necessary;
Enum-members can be auto-discovered. This removes the need to keep track of used/unused enum-members:
- Explicitly:
- Is enabled by adding the DiscoverableEnumMembers-attribute;
- Use {Enum}.{Member}.CreateMember(...) to create a source generated enum-member on the fly;
- A member value (and comment) can be provided;
- Implicitly:
- Is enabled by adding the DiscoverableEnumMembers-attribute with implicitDiscoverability = true;
- Use {Enum}.{Member} to create a source generated enum-member on the fly;
- Explicitly:
Enum members can be added at runtime, if necessary;
Has the same functionality as the default .NET enum:
- Members can be found by using their name or value;
- Multiple members with the same value can even be looked up: This is not supported in default C# enums;
Optimized, and therefore fast member registration / lookup;
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- CodeChops.GenericMath (>= 1.3.6)
- CodeChops.Identities (>= 0.0.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|
Loading failed
Updated GenericMath package.