• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SamboyCoding / Cpp2IL / 23394769930

22 Mar 2026 03:25AM UTC coverage: 35.372% (+0.3%) from 35.085%
23394769930

push

github

SamboyCoding
core: Fix support for nested array custom attribute params

1964 of 6917 branches covered (28.39%)

Branch coverage included in aggregate %.

0 of 1 new or added line in 1 file covered. (0.0%)

279 existing lines in 10 files now uncovered.

4461 of 11247 relevant lines covered (39.66%)

254592.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

53.97
/LibCpp2IL/BinaryStructures/Il2CppMethodSpec.cs
1
using System;
2
using System.Linq;
3
using System.Text;
4
using LibCpp2IL.Metadata;
5
using LibCpp2IL.Reflection;
6

7
namespace LibCpp2IL.BinaryStructures;
8

9
public class Il2CppMethodSpec : ReadableClass
10
{
11
    // Populated by Il2CppBinary.Init for per-context usage.
12
    internal Il2CppBinary? OwningBinary { get; set; }
2,203,630✔
13
    internal Il2CppMetadata? OwningMetadata { get; set; }
4,539,982✔
14

15
    public int methodDefinitionIndex;
16
    public int classIndexIndex;
17
    public int methodIndexIndex;
18

19
    public Il2CppMethodDefinition? MethodDefinition 
20
        => (OwningMetadata ?? LibCpp2IlMain.TheMetadata)
3,646,004!
21
            ?.GetMethodDefinitionFromIndex(Il2CppVariableWidthIndex<Il2CppMethodDefinition>.MakeTemporaryForFixedWidthUsage(methodDefinitionIndex)); //DynWidth: Il2CppMethodSpec is in-binary, dynamic widths weren't applied here.
3,646,004✔
22

23
    public Il2CppGenericInst? GenericClassInst
24
    {
25
        get
26
        {
27
            var binary = OwningBinary ?? LibCpp2IlMain.Binary;
1,232,916!
28
            if (binary == null) return null;
1,232,916!
29
            if (classIndexIndex < 0) return null;
1,232,916!
30
            var inst = binary.GetGenericInst(classIndexIndex);
1,232,916✔
31
            inst.OwningBinary = binary;
1,232,916✔
32
            return inst;
1,232,916✔
33
        }
34
    }
35

36
    public Il2CppGenericInst? GenericMethodInst
37
    {
38
        get
39
        {
40
            var binary = OwningBinary ?? LibCpp2IlMain.Binary;
76,736!
41
            if (binary == null) return null;
76,736!
42
            if (methodIndexIndex < 0) return null;
76,736!
43
            var inst = binary.GetGenericInst(methodIndexIndex);
76,736✔
44
            inst.OwningBinary = binary;
76,736✔
45
            return inst;
76,736✔
46
        }
47
    }
48

49
    public Il2CppTypeReflectionData[] GenericClassParams => classIndexIndex == -1 ? [] : LibCpp2ILUtils.GetGenericTypeParams(GenericClassInst!)!;
1,375,664✔
50

51
    public Il2CppTypeReflectionData[] GenericMethodParams => methodIndexIndex == -1 ? [] : LibCpp2ILUtils.GetGenericTypeParams(GenericMethodInst!)!;
482,346✔
52

53
    public override string ToString()
54
    {
UNCOV
55
        var sb = new StringBuilder();
×
56

UNCOV
57
        sb.Append(MethodDefinition?.ReturnType).Append(" ");
×
58

UNCOV
59
        sb.Append(MethodDefinition?.DeclaringType?.FullName);
×
60

UNCOV
61
        if (classIndexIndex != -1)
×
UNCOV
62
            sb.Append("<").Append(string.Join(", ", GenericClassParams.AsEnumerable())).Append(">");
×
63

UNCOV
64
        sb.Append(".").Append(MethodDefinition?.Name);
×
65

UNCOV
66
        if (methodIndexIndex != -1)
×
UNCOV
67
            sb.Append("<").Append(string.Join(", ", GenericMethodParams.AsEnumerable())).Append(">");
×
68

UNCOV
69
        return sb.ToString();
×
70
    }
71

72
    public override void Read(ClassReadingBinaryReader reader)
73
    {
74
        methodDefinitionIndex = reader.ReadInt32();
893,978✔
75
        classIndexIndex = reader.ReadInt32();
893,978✔
76
        methodIndexIndex = reader.ReadInt32();
893,978✔
77
    }
893,978✔
78
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc