mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 20:54:58 +00:00
Merge remote-tracking branch 'origin/fixcastissue' into dev
This commit is contained in:
@@ -321,7 +321,7 @@ namespace ICD.Common.Utils
|
|||||||
throw new ArgumentException(string.Format("{0} is not an enum", value == null ? "NULL" : value.GetType().Name), "value");
|
throw new ArgumentException(string.Format("{0} is not an enum", value == null ? "NULL" : value.GetType().Name), "value");
|
||||||
|
|
||||||
int maxEnumValue = (GetValues<T>().Max(v => (int)(object)v) * 2) -1 ;
|
int maxEnumValue = (GetValues<T>().Max(v => (int)(object)v) * 2) -1 ;
|
||||||
return Enumerable.Range(1, maxEnumValue).Cast<T>().Where(v => HasFlags(value, v));
|
return Enumerable.Range(1, maxEnumValue).Select(i => (T)(object)i ).Where(v => HasFlags(value, v));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user