DiagonacticEnumsExtensions 1.1.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package DiagonacticEnumsExtensions --version 1.1.2.1                
NuGet\Install-Package DiagonacticEnumsExtensions -Version 1.1.2.1                
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="DiagonacticEnumsExtensions" Version="1.1.2.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DiagonacticEnumsExtensions --version 1.1.2.1                
#r "nuget: DiagonacticEnumsExtensions, 1.1.2.1"                
#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.
// Install DiagonacticEnumsExtensions as a Cake Addin
#addin nuget:?package=DiagonacticEnumsExtensions&version=1.1.2.1

// Install DiagonacticEnumsExtensions as a Cake Tool
#tool nuget:?package=DiagonacticEnumsExtensions&version=1.1.2.1                

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.

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 is compatible.  net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.5

    • No dependencies.
  • .NETFramework 4.5.1

    • No dependencies.
  • .NETFramework 4.5.2

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on DiagonacticEnumsExtensions:

Package Downloads
DiagonacticStringExtensions

This package has been replaced by Diagonactic.CoreTypeExtensions - Use that instead

DiagonacticCoreTypeExtensions

See Project Page for Details

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.3 2,179 7/16/2016
1.2.2 1,225 7/8/2016
1.2.1 1,213 7/8/2016
1.2.0 1,214 7/7/2016
1.1.2.2 1,194 7/4/2016
1.1.2.1 1,292 12/15/2015
1.1.2 1,275 12/9/2015
1.1.1 1,213 12/8/2015
1.1.0 1,243 12/4/2015
1.0.0 1,227 12/3/2015
0.0.9.95 1,324 11/20/2015
0.0.9.90 1,268 11/19/2015
0.0.9.70 1,272 11/8/2015
0.0.9.60 1,252 11/8/2015
0.0.9.52 1,228 11/6/2015
0.0.9.51 1,330 11/1/2015
0.0.9.50 1,289 11/1/2015
0.0.9.21 1,260 10/31/2015
0.0.9.20 1,257 10/31/2015
0.0.9.10 1,251 10/30/2015
0.0.9 1,237 10/28/2015

New in version 1.1.2 - Strong assembly signing.

New in version 1.1.1 - More correct handling of tests against "0" for IsFlagSet/AreAllFlagsSet/AreAnyFlagsSet

New in version 1.1.0 - Exposed the internal IEqualityComparer implementations used to get an IEqualityComparer for any enum type that performs operations without boxing/unboxing.

New in version 1.0.0 - Optimised several methods doubling the speed of some and reducing memory footprint.

New in version 0.0.9.90 - Added EqualsAny - Similar to AreAnyFlagsSet but for non-flag enums.

New in version 0.0.9.70 - Added Predicate overloads to Add/Remove/Modify conditional flags methods.

New in version 0.0.9.60 - Added conditional Add/Remove flags with bool and Func<bool>, allowing add when true and do nothing when false.
Added ModifyFlag with Func<bool> and bool parameter that adds on true and removes on false.

New in version 0.0.9.52 - Removed Readme.md and Icon.ico from package.