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

SamboyCoding / Cpp2IL / 10648892934

31 Aug 2024 11:02PM UTC coverage: 29.103% (-0.02%) from 29.124%
10648892934

push

github

SamboyCoding
Core: Support "v29.2"'s isUnmanagedCallersOnly the *correct* way

1227 of 5825 branches covered (21.06%)

Branch coverage included in aggregate %.

1 of 7 new or added lines in 2 files covered. (14.29%)

30 existing lines in 2 files now uncovered.

3314 of 9778 relevant lines covered (33.89%)

104609.41 hits per line

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

76.0
/Cpp2IL.Core/Model/Contexts/SystemTypesContext.cs
1
namespace Cpp2IL.Core.Model.Contexts;
2

3
public class SystemTypesContext
4
{
5
    private ApplicationAnalysisContext _appContext;
6

7
    public TypeAnalysisContext SystemObjectType { get; }
73,365✔
8
    public TypeAnalysisContext SystemVoidType { get; }
354✔
9
    public TypeAnalysisContext SystemBooleanType { get; }
2,472✔
10
    public TypeAnalysisContext SystemCharType { get; }
48✔
11
    public TypeAnalysisContext SystemSByteType { get; }
×
12
    public TypeAnalysisContext SystemByteType { get; }
24✔
13
    public TypeAnalysisContext SystemInt16Type { get; }
×
14
    public TypeAnalysisContext SystemUInt16Type { get; }
×
15
    public TypeAnalysisContext SystemInt32Type { get; }
40,816✔
16
    public TypeAnalysisContext SystemUInt32Type { get; }
36✔
17
    public TypeAnalysisContext SystemInt64Type { get; }
×
18
    public TypeAnalysisContext SystemUInt64Type { get; }
36✔
19
    public TypeAnalysisContext SystemSingleType { get; }
72✔
20
    public TypeAnalysisContext SystemDoubleType { get; }
×
21
    public TypeAnalysisContext SystemIntPtrType { get; }
5,820✔
22
    public TypeAnalysisContext SystemUIntPtrType { get; }
×
23
    public TypeAnalysisContext SystemExceptionType { get; }
×
24
    public TypeAnalysisContext SystemStringType { get; }
3,950✔
25
    public TypeAnalysisContext SystemTypedReferenceType { get; }
×
26
    public TypeAnalysisContext SystemTypeType { get; }
×
27
    public TypeAnalysisContext SystemAttributeType { get; }
×
NEW
28
    public TypeAnalysisContext? UnmanagedCallersOnlyAttributeType { get; }
×
29

30
    public SystemTypesContext(ApplicationAnalysisContext appContext)
12✔
31
    {
32
        _appContext = appContext;
12✔
33

34
        var systemAssembly = _appContext.GetAssemblyByName("mscorlib") ?? throw new("Could not find system assembly");
12!
35

36
        SystemObjectType = systemAssembly.GetTypeByFullName("System.Object")!;
12✔
37
        SystemVoidType = systemAssembly.GetTypeByFullName("System.Void")!;
12✔
38

39
        SystemBooleanType = systemAssembly.GetTypeByFullName("System.Boolean")!;
12✔
40
        SystemCharType = systemAssembly.GetTypeByFullName("System.Char")!;
12✔
41

42
        SystemSByteType = systemAssembly.GetTypeByFullName("System.SByte")!;
12✔
43
        SystemByteType = systemAssembly.GetTypeByFullName("System.Byte")!;
12✔
44

45
        SystemInt16Type = systemAssembly.GetTypeByFullName("System.Int16")!;
12✔
46
        SystemUInt16Type = systemAssembly.GetTypeByFullName("System.UInt16")!;
12✔
47

48
        SystemInt32Type = systemAssembly.GetTypeByFullName("System.Int32")!;
12✔
49
        SystemUInt32Type = systemAssembly.GetTypeByFullName("System.UInt32")!;
12✔
50

51
        SystemInt64Type = systemAssembly.GetTypeByFullName("System.Int64")!;
12✔
52
        SystemUInt64Type = systemAssembly.GetTypeByFullName("System.UInt64")!;
12✔
53

54
        SystemSingleType = systemAssembly.GetTypeByFullName("System.Single")!;
12✔
55
        SystemDoubleType = systemAssembly.GetTypeByFullName("System.Double")!;
12✔
56

57
        SystemIntPtrType = systemAssembly.GetTypeByFullName("System.IntPtr")!;
12✔
58
        SystemUIntPtrType = systemAssembly.GetTypeByFullName("System.UIntPtr")!;
12✔
59

60
        SystemStringType = systemAssembly.GetTypeByFullName("System.String")!;
12✔
61
        SystemTypedReferenceType = systemAssembly.GetTypeByFullName("System.TypedReference")!;
12✔
62
        SystemTypeType = systemAssembly.GetTypeByFullName("System.Type")!;
12✔
63

64
        SystemExceptionType = systemAssembly.GetTypeByFullName("System.Exception")!;
12✔
65
        SystemAttributeType = systemAssembly.GetTypeByFullName("System.Attribute")!;
12✔
66
        
67
        UnmanagedCallersOnlyAttributeType = systemAssembly.GetTypeByFullName("System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute");
12✔
68
    }
12✔
69
}
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