AppModel: Rename AppType.ILType to AppType.Type for consistency

This commit is contained in:
Katy Coe
2020-08-14 02:01:37 +02:00
parent 9fd64fabf9
commit 0f3b31749b
2 changed files with 6 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ namespace Il2CppInspector.Model
public CppComplexType CppValueType { get; internal set; } public CppComplexType CppValueType { get; internal set; }
// The type in the .NET type model this object maps to // The type in the .NET type model this object maps to
public TypeInfo ILType { get; internal set; } public TypeInfo Type { get; internal set; }
// The VA of the Il2CppClass object which defines this type (ClassName__TypeInfo) // The VA of the Il2CppClass object which defines this type (ClassName__TypeInfo)
public ulong TypeClassAddress { get; internal set; } public ulong TypeClassAddress { get; internal set; }
@@ -36,7 +36,7 @@ namespace Il2CppInspector.Model
public AppType(TypeInfo ilType, CppComplexType cppType, CppComplexType valueType = null, public AppType(TypeInfo ilType, CppComplexType cppType, CppComplexType valueType = null,
ulong cppClassPtr = 0xffffffff_ffffffff, ulong cppTypeRefPtr = 0xffffffff_ffffffff) { ulong cppClassPtr = 0xffffffff_ffffffff, ulong cppTypeRefPtr = 0xffffffff_ffffffff) {
CppType = cppType; CppType = cppType;
ILType = ilType; Type = ilType;
CppValueType = valueType; CppValueType = valueType;
TypeClassAddress = cppClassPtr; TypeClassAddress = cppClassPtr;
TypeRefPtrAddress = cppTypeRefPtr; TypeRefPtrAddress = cppTypeRefPtr;
@@ -45,8 +45,8 @@ namespace Il2CppInspector.Model
// The C++ name of the type // The C++ name of the type
// TODO: Known issue here where we should be using CppDeclarationGenerator.TypeNamer to ensure uniqueness // TODO: Known issue here where we should be using CppDeclarationGenerator.TypeNamer to ensure uniqueness
// Prefer Foo over Foo__Boxed; if there is no C++ type defined, just convert the IL type to a C identifier // Prefer Foo over Foo__Boxed; if there is no C++ type defined, just convert the IL type to a C identifier
public string Name => CppValueType?.Name ?? CppType?.Name ?? ILType.Name.ToCIdentifier(); public string Name => CppValueType?.Name ?? CppType?.Name ?? Type.Name.ToCIdentifier();
public override string ToString() => ILType.FullName + " -> " + CppType.Name; public override string ToString() => Type.FullName + " -> " + CppType.Name;
} }
} }

View File

@@ -104,7 +104,7 @@ namespace Il2CppInspector.Outputs
if (type.TypeClassAddress != 0xffffffff_ffffffff) { if (type.TypeClassAddress != 0xffffffff_ffffffff) {
writeObject(() => { writeObject(() => {
writeTypedName(type.TypeClassAddress, $"struct {type.Name}__Class *", $"{type.Name}__TypeInfo"); writeTypedName(type.TypeClassAddress, $"struct {type.Name}__Class *", $"{type.Name}__TypeInfo");
writeDotNetTypeName(type.ILType); writeDotNetTypeName(type.Type);
}); });
} }
} }
@@ -118,7 +118,7 @@ namespace Il2CppInspector.Outputs
writeObject(() => { writeObject(() => {
// A generic type definition does not have any direct C++ types, but may have a reference // A generic type definition does not have any direct C++ types, but may have a reference
writeName(type.TypeRefPtrAddress, $"{type.Name}__TypeRef"); writeName(type.TypeRefPtrAddress, $"{type.Name}__TypeRef");
writeDotNetTypeName(type.ILType); writeDotNetTypeName(type.Type);
}); });
} }
} }