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); }
public static bool ExistsAccountType(this string humanName) { return(NameToTypes.GetOrDefault(humanName) != null); }