Model: Allow Name to be changed by plugins
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user