TypeImportInfo GetTypeInfo (XmlQualifiedName typeName, bool throwError)
{
var info = imported_types.FirstOrDefault (i => i.XsdTypeName.Equals (typeName));
if (info == null) {
if (throwError)
throw new InvalidOperationException (String.Format ("schema type '{0}' has not been imported yet. Import it first.", typeName));
return null;
}
return info;
}