Exemplo n.º 1
0
 public static CultureInfo[] GetCultures(CultureTypes types)
 {
     return(Safe.Run(() => CultureInfo.GetCultures(types),
                     new CultureInfo[0]));
 }
Exemplo n.º 2
0
 public static T Value <T>(int i)
 {
     return(Safe.Run(() => (T)Value(typeof(T), i), default(T)));
 }
Exemplo n.º 3
0
 public static RegionInfo ToRegionInfo(CultureInfo info)
 {
     return(info is null
         ? null
         : Safe.Run(() => new RegionInfo(info.LCID), null));
 }
Exemplo n.º 4
0
 public static int Count(Type type)
 {
     return(Safe.Run(() => Enum.GetValues(type).Length, -1));
 }