Example #1
0
 public static PropertyInfo Property <T>(string name)
 {
     return(Safe.Run(() => typeof(T).GetProperty(name), null));
 }
Example #2
0
 public static int Count(Type type)
 {
     return(Safe.Run(() => Enum.GetValues(type).Length, -1));
 }
Example #3
0
 public static List <PropertyInfo> Properties(Type type, BindingFlags f = GetPublic.All)
 {
     return(Safe.Run(() => type.GetProperties(f).ToList(), new List <PropertyInfo>()));
 }
Example #4
0
 public static T Value <T>(int i)
 {
     return(Safe.Run(() => (T)Value(typeof(T), i), default(T)));
 }
Example #5
0
 public static bool IsCountry(RegionInfo r)
 {
     return(Safe.Run(() => SystemString.StartsWithLetter(r.ThreeLetterISORegionName), false));
 }