Implement Reflection.Assembly

This commit is contained in:
Katy Coe
2017-10-25 05:53:34 +02:00
parent f832c478c2
commit 4ab71d8594
3 changed files with 44 additions and 28 deletions

View File

@@ -7,15 +7,10 @@ namespace Il2CppInspector.Reflection
{
public List<Assembly> Assemblies { get; } = new List<Assembly>();
// Factory instantiation via Il2CppReflector.Parse only
private Il2CppReflector() { }
public static Il2CppReflector Parse(Il2CppInspector package) {
var r = new Il2CppReflector();
// TODO: Populate reflection classes
return r;
public Il2CppReflector(Il2CppInspector package) {
// Create Assembly objects from Il2Cpp package
for (var image = 0; image < package.Metadata.Images.Length; image++)
Assemblies.Add(new Assembly(package, image));
}
// Get the assembly in which a type is defined