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