Move default excluded namespaces to Constants
This commit is contained in:
@@ -36,5 +36,18 @@ namespace Il2CppInspector.Reflection
|
|||||||
"using", /* "using static", */ "virtual", "void",
|
"using", /* "using static", */ "virtual", "void",
|
||||||
"volatile", "while"
|
"volatile", "while"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Default namespaces to exclude
|
||||||
|
public static readonly List<string> DefaultExcludedNamespaces = new List<string> {
|
||||||
|
"System",
|
||||||
|
"Mono",
|
||||||
|
"Microsoft.Win32",
|
||||||
|
"Unity",
|
||||||
|
"UnityEditor",
|
||||||
|
"UnityEngine",
|
||||||
|
"UnityEngineInternal",
|
||||||
|
"AOT",
|
||||||
|
"JetBrains.Annotations"
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,25 +41,11 @@ namespace Il2CppInspector
|
|||||||
if (inspectors.Count == 0)
|
if (inspectors.Count == 0)
|
||||||
throw new Exception("Could not find any images in the IL2CPP binary");
|
throw new Exception("Could not find any images in the IL2CPP binary");
|
||||||
|
|
||||||
// Exclusions
|
|
||||||
|
|
||||||
var excludedNamespaces = new List<string> {
|
|
||||||
"System",
|
|
||||||
"Mono",
|
|
||||||
"Microsoft.Win32",
|
|
||||||
"Unity",
|
|
||||||
"UnityEditor",
|
|
||||||
"UnityEngine",
|
|
||||||
"UnityEngineInternal",
|
|
||||||
"AOT",
|
|
||||||
"JetBrains.Annotations"
|
|
||||||
};
|
|
||||||
|
|
||||||
// Dump each image in the binary separately
|
// Dump each image in the binary separately
|
||||||
int i = 0;
|
int i = 0;
|
||||||
foreach (var il2cpp in inspectors)
|
foreach (var il2cpp in inspectors)
|
||||||
new CSharpCodeStubs(new Il2CppModel(il2cpp)) {
|
new CSharpCodeStubs(new Il2CppModel(il2cpp)) {
|
||||||
ExcludedNamespaces = excludedNamespaces,
|
ExcludedNamespaces = Constants.DefaultExcludedNamespaces,
|
||||||
SuppressMetadata = false,
|
SuppressMetadata = false,
|
||||||
MustCompile = true
|
MustCompile = true
|
||||||
}.WriteSingleFile(testPath + @"\test-result" + (i++ > 0 ? "-" + (i - 1) : "") + ".cs");
|
}.WriteSingleFile(testPath + @"\test-result" + (i++ > 0 ? "-" + (i - 1) : "") + ".cs");
|
||||||
|
|||||||
Reference in New Issue
Block a user