Output: Don't emit unnecessary scope on explicit interface implementations of methods and properties

This commit is contained in:
Katy Coe
2019-11-17 23:38:47 +01:00
parent 22d85ce683
commit 10dfc60344
3 changed files with 25 additions and 3 deletions

View File

@@ -26,6 +26,13 @@ namespace Il2CppInspector.Reflection {
public override string Name { get; protected set; }
public string CSharpName =>
// Explicit interface implementation
Name.IndexOf('.') != -1? string.Join('.', Name.Split('.')[^2..])
// Regular method
: Name;
public TypeInfo PropertyType => GetMethod?.ReturnType ?? SetMethod.DeclaredParameters[^1].ParameterType;
public override MemberTypes MemberType => MemberTypes.Property;