예제 #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));
 }