* TemplateParser.cs: FindNamespaceInAssembly must catch
ReflectionTypeLoadException so that it doesn't break on invalid
assemblies.
svn path=/trunk/mcs/; revision=141962
+2009-09-15 Marek Habersack <mhabersack@novell.com>
+
+ * TemplateParser.cs: FindNamespaceInAssembly must catch
+ ReflectionTypeLoadException so that it doesn't break on invalid
+ assemblies.
+
2009-08-24 Marek Habersack <mhabersack@novell.com>
* PageParser.cs: 2.0 profile takes advantage of the inputFile
bool FindNamespaceInAssembly (Assembly asm, string namesp)
{
- foreach (Type type in asm.GetTypes ()) {
+ Type[] asmTypes;
+
+ try {
+ asmTypes = asm.GetTypes ();
+ } catch (ReflectionTypeLoadException) {
+ // ignore
+ return false;
+ }
+
+ foreach (Type type in asmTypes) {
if (String.Compare (type.Namespace, namesp, StringComparison.Ordinal) == 0) {
namespacesCache.Add (namesp, true);
AddAssembly (asm, true);