示例#1
0
        public static bool TryParse <T>(string enumMemberName, bool ignoreCase, out T value) where T : struct
        {
            ValidationUtils.ArgumentTypeIsEnum(typeof(T), "T");

            return(MiscellaneousUtils.TryAction(() => Parse <T>(enumMemberName, ignoreCase), out value));
        }
示例#2
0
 public static bool TryGetSingleItem <T>(IList <T> list, bool returnDefaultIfEmpty, out T value)
 {
     return(MiscellaneousUtils.TryAction <T>(delegate { return GetSingleItem(list, returnDefaultIfEmpty); }, out value));
 }