Output: Suppress global::Locale when using --must-compile

This commit is contained in:
Katy Coe
2020-01-21 03:01:19 +01:00
parent 4c29821ee0
commit 024b390f25
3 changed files with 11 additions and 2 deletions

View File

@@ -195,6 +195,15 @@ namespace Il2CppInspector
if (ExcludedNamespaces?.Any(x => x == type.Namespace || type.Namespace.StartsWith(x + ".")) ?? false)
continue;
// Don't output global::Locale if desired
if (MustCompile
&& type.Name == "Locale" && type.Namespace == string.Empty
&& type.BaseType.FullName == "System.Object"
&& type.IsClass && type.IsSealed && type.IsNotPublic && !type.ContainsGenericParameters
&& type.DeclaredMembers.Count == type.DeclaredMethods.Count
&& type.GetMethods("GetText").Length == type.DeclaredMethods.Count)
continue;
// Assembly.DefinedTypes returns nested types in the assembly by design - ignore them
if (type.IsNested)
continue;