-
-
Notifications
You must be signed in to change notification settings - Fork 340
Expand file tree
/
Copy pathCpp2IlMethodRef.cs
More file actions
37 lines (26 loc) · 1.1 KB
/
Copy pathCpp2IlMethodRef.cs
File metadata and controls
37 lines (26 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System.Linq;
using System.Text;
using LibCpp2IL.BinaryStructures;
using LibCpp2IL.Metadata;
namespace LibCpp2IL;
public class Cpp2IlMethodRef(Il2CppMethodSpec methodSpec)
{
public Il2CppTypeDefinition DeclaringType => BaseMethod.DeclaringType!;
public Il2CppType[] TypeGenericParams => methodSpec.GenericClassParams;
public Il2CppMethodDefinition BaseMethod => methodSpec.MethodDefinition!;
public Il2CppType[] MethodGenericParams => methodSpec.GenericMethodParams;
public ulong GenericVariantPtr;
public ulong AdjustorThunkPtr;
public override string ToString()
{
var sb = new StringBuilder();
sb.Append(BaseMethod.ReturnType).Append(" ");
sb.Append(DeclaringType.FullName);
if (TypeGenericParams.Length > 0)
sb.Append("<").Append(string.Join(", ", TypeGenericParams.AsEnumerable())).Append(">");
sb.Append(".").Append(BaseMethod.Name);
if (MethodGenericParams.Length > 0)
sb.Append("<").Append(string.Join(", ", MethodGenericParams.AsEnumerable())).Append(">");
return sb.ToString();
}
}