Example #1
0
 public static IList <T> GetValues <T>()
 {
     return(EnumUtils.GetValues(typeof(T)).Cast <T>().ToList <T>());
 }
Example #2
0
 public static EnumValues <TUnderlyingType> GetNamesAndValues <TEnum, TUnderlyingType>() where TEnum : struct where TUnderlyingType : struct
 {
     return(EnumUtils.GetNamesAndValues <TUnderlyingType>(typeof(TEnum)));
 }
Example #3
0
 public static EnumValues <ulong> GetNamesAndValues <T>() where T : struct
 {
     return(EnumUtils.GetNamesAndValues <ulong>(typeof(T)));
 }
Example #4
0
 public static bool TryParse <T>(string enumMemberName, bool ignoreCase, out T value) where T : struct
 {
     ValidationUtils.ArgumentTypeIsEnum(typeof(T), "T");
     return(MiscellaneousUtils.TryAction <T>(() => EnumUtils.Parse <T>(enumMemberName, ignoreCase), out value));
 }
Example #5
0
 public static IList <string> GetNames <T>()
 {
     return(EnumUtils.GetNames(typeof(T)));
 }
Example #6
0
 public static T Parse <T>(string enumMemberName) where T : struct
 {
     return(EnumUtils.Parse <T>(enumMemberName, false));
 }