Esempio n. 1
0
        public static AccountType ParseFromHumanName(this string name)
        {
            var accountType = NameToTypes.GetOrDefault(name);

            if (accountType == null)
            {
                throw new FormatException("Unknown account type human name");
            }
            return(accountType.Value);
        }
Esempio n. 2
0
 public static bool ExistsAccountType(this string humanName)
 {
     return(NameToTypes.GetOrDefault(humanName) != null);
 }