private static void CollectBlackListTypes(HashSet <TypeDefinition> typesToPreserve, IList <TypeDefinition> types, List <string> baseTypes) { if (types == null) { return; } using (IEnumerator <TypeDefinition> enumerator1 = ((IEnumerable <TypeDefinition>)types).GetEnumerator()) { while (((IEnumerator)enumerator1).MoveNext()) { TypeDefinition current1 = enumerator1.Current; if (current1 != null) { using (List <string> .Enumerator enumerator2 = baseTypes.GetEnumerator()) { while (enumerator2.MoveNext()) { string current2 = enumerator2.Current; if (MonoAssemblyStripping.DoesTypeEnheritFrom((TypeReference)current1, current2)) { typesToPreserve.Add(current1); break; } } } MonoAssemblyStripping.CollectBlackListTypes(typesToPreserve, (IList <TypeDefinition>)current1.get_NestedTypes(), baseTypes); } } } }
private static void CollectBlackListTypes(HashSet <TypeDefinition> typesToPreserve, IList <TypeDefinition> types, List <string> baseTypes) { if (types != null) { foreach (TypeDefinition current in types) { if (current != null) { foreach (string current2 in baseTypes) { if (MonoAssemblyStripping.DoesTypeEnheritFrom(current, current2)) { typesToPreserve.Add(current); break; } } MonoAssemblyStripping.CollectBlackListTypes(typesToPreserve, current.NestedTypes, baseTypes); } } } }
private static void GenerateBlackListTypeXML(TextWriter w, IList <TypeDefinition> types, List <string> baseTypes) { if (types == null) { return; } foreach (TypeDefinition current in types) { if (current != null) { foreach (string current2 in baseTypes) { if (MonoAssemblyStripping.DoesTypeEnheritFrom(current, current2)) { w.WriteLine("<type fullname=\"{0}\" preserve=\"all\"/>", current.FullName); break; } } MonoAssemblyStripping.GenerateBlackListTypeXML(w, current.NestedTypes, baseTypes); } } }