Output: Explicitly implemented generic properties could have mismatched chevrons
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
All rights reserved.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@@ -28,12 +29,17 @@ namespace Il2CppInspector.Reflection {
|
|||||||
|
|
||||||
public override string Name { get; protected set; }
|
public override string Name { get; protected set; }
|
||||||
|
|
||||||
public string CSharpName =>
|
public string CSharpName {
|
||||||
// Explicit interface implementation
|
get {
|
||||||
CSharpSafeName.IndexOf('.') != -1? string.Join('.', CSharpSafeName.Split('.')[^2..])
|
// Explicit interface implementation
|
||||||
|
if (DeclaringType.ImplementedInterfaces
|
||||||
|
.FirstOrDefault(i => CSharpSafeName.IndexOf("." + i.CSharpTypeDeclarationName, StringComparison.Ordinal) != -1) is TypeInfo @interface)
|
||||||
|
return CSharpSafeName.Substring(CSharpSafeName.IndexOf("." + @interface.CSharpTypeDeclarationName, StringComparison.Ordinal) + 1);
|
||||||
|
|
||||||
// Regular method
|
// Regular method
|
||||||
: Name;
|
return Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public TypeInfo PropertyType => GetMethod?.ReturnType ?? SetMethod.DeclaredParameters[^1].ParameterType;
|
public TypeInfo PropertyType => GetMethod?.ReturnType ?? SetMethod.DeclaredParameters[^1].ParameterType;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user