public ImportedModuleDefinition ImportModule (Module module, RootNamespace targetNamespace) { var module_definition = new ImportedModuleDefinition (module, this); module_definition.ReadAttributes (); Type[] all_types; try { all_types = module.GetTypes (); } catch (ReflectionTypeLoadException e) { all_types = e.Types; } ImportTypes (all_types, targetNamespace, false); return module_definition; }
public ImportedModuleDefinition ImportModule (Module module, RootNamespace targetNamespace) { var module_definition = new ImportedModuleDefinition (module, this); module_definition.ReadAttributes (); Type extension_type = HasExtensionAttribute (CustomAttributeData.GetCustomAttributes (module)); Type[] all_types; try { all_types = module.GetTypes (); } catch (ReflectionTypeLoadException e) { all_types = e.Types; } ImportTypes (all_types, targetNamespace, extension_type); return module_definition; }