From 0f3b31749b69f5a0b059535f338a77efd431e61e Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Fri, 14 Aug 2020 02:01:37 +0200 Subject: [PATCH] AppModel: Rename AppType.ILType to AppType.Type for consistency --- Il2CppInspector.Common/Model/AppType.cs | 8 ++++---- Il2CppInspector.Common/Outputs/JSONMetadata.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Il2CppInspector.Common/Model/AppType.cs b/Il2CppInspector.Common/Model/AppType.cs index 86f9a3f..df46eb3 100644 --- a/Il2CppInspector.Common/Model/AppType.cs +++ b/Il2CppInspector.Common/Model/AppType.cs @@ -25,7 +25,7 @@ namespace Il2CppInspector.Model public CppComplexType CppValueType { get; internal set; } // 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) public ulong TypeClassAddress { get; internal set; } @@ -36,7 +36,7 @@ namespace Il2CppInspector.Model public AppType(TypeInfo ilType, CppComplexType cppType, CppComplexType valueType = null, ulong cppClassPtr = 0xffffffff_ffffffff, ulong cppTypeRefPtr = 0xffffffff_ffffffff) { CppType = cppType; - ILType = ilType; + Type = ilType; CppValueType = valueType; TypeClassAddress = cppClassPtr; TypeRefPtrAddress = cppTypeRefPtr; @@ -45,8 +45,8 @@ namespace Il2CppInspector.Model // The C++ name of the type // 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 - 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; } } \ No newline at end of file diff --git a/Il2CppInspector.Common/Outputs/JSONMetadata.cs b/Il2CppInspector.Common/Outputs/JSONMetadata.cs index b62cd55..0ae58ba 100644 --- a/Il2CppInspector.Common/Outputs/JSONMetadata.cs +++ b/Il2CppInspector.Common/Outputs/JSONMetadata.cs @@ -104,7 +104,7 @@ namespace Il2CppInspector.Outputs if (type.TypeClassAddress != 0xffffffff_ffffffff) { writeObject(() => { writeTypedName(type.TypeClassAddress, $"struct {type.Name}__Class *", $"{type.Name}__TypeInfo"); - writeDotNetTypeName(type.ILType); + writeDotNetTypeName(type.Type); }); } } @@ -118,7 +118,7 @@ namespace Il2CppInspector.Outputs writeObject(() => { // A generic type definition does not have any direct C++ types, but may have a reference writeName(type.TypeRefPtrAddress, $"{type.Name}__TypeRef"); - writeDotNetTypeName(type.ILType); + writeDotNetTypeName(type.Type); }); } }