diff options
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs index 8147f527f..0308069f9 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs @@ -10,6 +10,7 @@ namespace HandBrake.ApplicationServices.Functions using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
+ using System.Linq;
using System.Reflection;
/// <summary>
@@ -72,6 +73,17 @@ namespace HandBrake.ApplicationServices.Functions }
/// <summary>
+ /// Return a list of all the enum values.
+ /// </summary>
+ /// <returns>
+ /// An Enum Oject List
+ /// </returns>
+ public static IEnumerable<T> GetEnumList()
+ {
+ return Enum.GetValues(typeof(T)).Cast<T>().ToList();
+ }
+
+ /// <summary>
/// Get a list of string names for each enum value.
/// </summary>
/// <param name="enumType">
|