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

SamboyCoding / Cpp2IL / 14963447019

12 May 2025 03:55AM UTC coverage: 34.803% (-0.02%) from 34.826%
14963447019

Pull #447

github

web-flow
Merge 83a563e34 into e93c0fecc
Pull Request #447: Implement some missing property overrides on injected methods

1808 of 6490 branches covered (27.86%)

Branch coverage included in aggregate %.

1 of 8 new or added lines in 4 files covered. (12.5%)

3 existing lines in 3 files now uncovered.

4158 of 10652 relevant lines covered (39.03%)

161170.59 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

NEW
13
    protected override bool IsInjected => true;
×
14

UNCOV
15
    public override bool IsStatic => true;
×
16

17
    public override bool IsVoid { get; }
×
18

19
    public override MethodAttributes Attributes => MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.HideBySig;
×
20

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

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

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

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

© 2025 Coveralls, Inc