mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-14 01:55:45 +00:00
13 lines
342 B
C#
13 lines
342 B
C#
namespace FFMpegCore.Extensions.Downloader.Enums;
|
|
|
|
public static class EnumExtensions
|
|
{
|
|
public static TEnum[] GetFlags<TEnum>(this TEnum input) where TEnum : Enum
|
|
{
|
|
return Enum.GetValues(input.GetType())
|
|
.Cast<Enum>()
|
|
.Where(input.HasFlag)
|
|
.Cast<TEnum>()
|
|
.ToArray();
|
|
}
|
|
}
|