Proper Generic Enum and Delegate Methods NuGet Package

Enums and Delegates are a fundimental component of .Net, however, as of version 6.0 of the C# language, there's no way to (directly) constrain a generic parameter to System.Enum or System.Delegate.

There's so many reasons to want to do so, not the least of which is the set of kludgy static methods on Enum and Delegate that would really benefit from generic implementations.

This package addresses that need. Written in C++/CLI since C# cannot declare an enum or delegate restriction, this library provides a set of well performing extension and static methods off of the "Diagonactic.Enums" class that provide a more readable way of performing common operations on enums and delegates, all of which can be consumed by C# code.

Enum methods are stable, Delegate methods are considered "Beta".

As a result, the API for Delegate methods may be modified (Obsolete tags for invalid members will be added if this happens), though every effort will be made to avoid this. Enum methods are API stable, however, methods are added occasionally.

All stable methods are unit tested for all underlying types with complete code coverage.

See release notes and readme.md on the Project site.

Included .dll is compiled IL only in "Any CPU" format.




Got any Proper Generic Enum and Delegate Methods Question?





Info

Version: 1.2.3
Author(s): Matthew S. Dippel
Last Update: Saturday, July 16, 2016
.NET Fiddle: Create the first Fiddle
Project Url: https://github.com/Diagonactic/Enums.Delegates.CppCLI
NuGet Url: https://www.nuget.org/packages/DiagonacticEnumsExtensions


Install
Install-Package DiagonacticEnumsExtensions
dotnet add package DiagonacticEnumsExtensions
paket add DiagonacticEnumsExtensions
DiagonacticEnumsExtensions Download (Unzip the "nupkg" after downloading)

.NETFramework 4.5
  • No dependencies.
net451
  • No dependencies.
net452
  • No dependencies.
2 packages depend on this package.


Tags



STATS

must-have-score

1

avg-downloads-per-day

6

days-since-last-release

2840