mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-14 04:58:33 +00:00
fix: Fixed EnumUtils.GetValuesExceptNone to work for non-flag enums
This commit is contained in:
parent
d00d2febf3
commit
c08a6283b8
2 changed files with 3 additions and 2 deletions
|
|
@ -22,7 +22,8 @@ namespace ICD.Common.Utils.Tests
|
|||
A = 1,
|
||||
B = 2,
|
||||
C = 4,
|
||||
D = 32
|
||||
D = 32,
|
||||
BandC = B | C
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ namespace ICD.Common.Utils
|
|||
if (type == null)
|
||||
throw new ArgumentNullException("type");
|
||||
|
||||
return GetFlagsExceptNone(type);
|
||||
return GetValues(type).Where(v => (int)v != 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue