.Net library to provide exclusivity testing for Bit-Flag enum definitions. Written in C# & .Net 4.6.2, using Visual Studio. Licensed under BSD-3.
Tests provide a near "real-world" example using the included CLISwitches
enum, in addition to other arbitrary enums to test vaious use cases.
Exceptions are thrown, trapped, reported to the Error Console, then silently
ignored, to prevent impeding program execution (indeed, when testing for a
valid bit-flag enum, an ArgumentOutOfRange
exception will be thrown if invalid).
ExclusiveFlagsAttribute.IsValidExclusive(Enum instance)
Static method provided to check for conflicting enum bit-flags. Extension method wrapper forIsValidExclusive
provided byExclusiveFlagsExtensions
.
Stable