static private Type GetTypeImpl(string typeString, bool throwOnError) {
Type type = null;
Exception originalException = null;
try {
type = Type.GetType(typeString, throwOnError);
}
catch (Exception e) {
originalException = e;
}
if (type == null) {
type = GetLegacyType(typeString);
if (type == null && originalException != null) {
throw originalException;
}
}
return type;
}