From b1d61f81f0207d5f441080cff6ab455d73c5082a Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Mon, 21 Dec 2020 19:02:03 +0100 Subject: [PATCH] Model: Allow Name to be changed by plugins --- Il2CppInspector.Common/Reflection/MemberInfo.cs | 2 +- Il2CppInspector.Common/Reflection/PropertyInfo.cs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Il2CppInspector.Common/Reflection/MemberInfo.cs b/Il2CppInspector.Common/Reflection/MemberInfo.cs index 22761cc..6b0fdc7 100644 --- a/Il2CppInspector.Common/Reflection/MemberInfo.cs +++ b/Il2CppInspector.Common/Reflection/MemberInfo.cs @@ -26,7 +26,7 @@ namespace Il2CppInspector.Reflection { public abstract MemberTypes MemberType { get; } // Name of the member - public virtual string Name { get; protected set; } + public virtual string Name { get; set; } // Name of the member with @ prepended if the name is a C# reserved keyword, plus invalid characters substituted public virtual string CSharpName => Constants.Keywords.Contains(Name) ? "@" + Name : Name.ToCIdentifier(); diff --git a/Il2CppInspector.Common/Reflection/PropertyInfo.cs b/Il2CppInspector.Common/Reflection/PropertyInfo.cs index bc3a715..c684ae5 100644 --- a/Il2CppInspector.Common/Reflection/PropertyInfo.cs +++ b/Il2CppInspector.Common/Reflection/PropertyInfo.cs @@ -29,8 +29,6 @@ namespace Il2CppInspector.Reflection { public bool IsAutoProperty => DeclaringType.DeclaredFields.Any(f => f.Name == $"<{Name}>k__BackingField"); - public override string Name { get; protected set; } - public override string CSharpName { get { // Explicit interface implementation