Model: Allow Name to be changed by plugins

This commit is contained in:
Katy Coe
2020-12-21 19:02:03 +01:00
parent 2a5e0c3e10
commit b1d61f81f0
2 changed files with 1 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ namespace Il2CppInspector.Reflection {
public abstract MemberTypes MemberType { get; } public abstract MemberTypes MemberType { get; }
// Name of the member // 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 // 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(); public virtual string CSharpName => Constants.Keywords.Contains(Name) ? "@" + Name : Name.ToCIdentifier();

View File

@@ -29,8 +29,6 @@ namespace Il2CppInspector.Reflection {
public bool IsAutoProperty => DeclaringType.DeclaredFields.Any(f => f.Name == $"<{Name}>k__BackingField"); public bool IsAutoProperty => DeclaringType.DeclaredFields.Any(f => f.Name == $"<{Name}>k__BackingField");
public override string Name { get; protected set; }
public override string CSharpName { public override string CSharpName {
get { get {
// Explicit interface implementation // Explicit interface implementation