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

SamboyCoding / Cpp2IL / 23825638668

01 Apr 2026 12:20AM UTC coverage: 35.293% (-0.08%) from 35.373%
23825638668

Pull #539

github

web-flow
Merge 963638c77 into 25552e0ff
Pull Request #539: Refactor Il2CppBinary and related components

1965 of 6943 branches covered (28.3%)

Branch coverage included in aggregate %.

21 of 92 new or added lines in 20 files covered. (22.83%)

478 existing lines in 20 files now uncovered.

4483 of 11327 relevant lines covered (39.58%)

223963.8 hits per line

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

0.0
/Cpp2IL.Core/Model/Contexts/NativeMethodAnalysisContext.cs
1
using System;
2
using System.Reflection;
3
using LibCpp2IL;
4

5
namespace Cpp2IL.Core.Model.Contexts;
6

7
public sealed class NativeMethodAnalysisContext : MethodAnalysisContext
8
{
9
    public override ulong UnderlyingPointer { get; }
×
10

11
    public override string DefaultName { get; }
×
12

13
    protected override bool IsInjected => true;
×
14

15
    public override TypeAnalysisContext DefaultReturnType => isVoid ? AppContext.SystemTypes.SystemVoidType : AppContext.SystemTypes.SystemObjectType;
×
16

17
    public override MethodAttributes DefaultAttributes => MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.HideBySig;
×
18

19
    public override MethodImplAttributes DefaultImplAttributes => MethodImplAttributes.Managed;
×
20

21
    protected override int CustomAttributeIndex => -1;
×
22

23
    private readonly bool isVoid;
24

25
    public NativeMethodAnalysisContext(TypeAnalysisContext parent, ulong address, bool voidReturn) : base(null, parent)
×
26
    {
27
        if (address == 0)
×
28
            throw new ArgumentOutOfRangeException(nameof(address));
×
29

30
        isVoid = voidReturn;
×
31
        UnderlyingPointer = address;
×
32
        if (LibCpp2IlMain.Binary?.TryGetExportedFunctionName(UnderlyingPointer, out var name) ?? false)
×
33
        {
34
            DefaultName = name;
×
35
        }
36
        else
37
        {
38
            DefaultName = $"NativeMethod_0x{UnderlyingPointer:X}";
×
39
        }
40

UNCOV
41
        rawMethodBody = AppContext.InstructionSet.GetRawBytesForMethod(this, false);
×
UNCOV
42
    }
×
43
}
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