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

SamboyCoding / Cpp2IL / 15052236685

15 May 2025 06:14PM UTC coverage: 34.038% (-0.4%) from 34.453%
15052236685

push

github

SamboyCoding
Implement requested change

1774 of 6622 branches covered (26.79%)

Branch coverage included in aggregate %.

1 of 2 new or added lines in 1 file covered. (50.0%)

320 existing lines in 15 files now uncovered.

4155 of 10797 relevant lines covered (38.48%)

188267.61 hits per line

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

90.91
/Cpp2IL.Core/Model/Contexts/InjectedTypeAnalysisContext.cs
1
using System.Reflection;
2

3
namespace Cpp2IL.Core.Model.Contexts;
4

5
public class InjectedTypeAnalysisContext : TypeAnalysisContext
6
{
7
    public override string DefaultName { get; }
429✔
8

9
    public override string DefaultNs { get; }
771✔
10

UNCOV
11
    public override TypeAttributes TypeAttributes { get; }
×
12
    
UNCOV
13
    protected override bool IsInjected => true;
×
14

15
    public InjectedTypeAnalysisContext(AssemblyAnalysisContext containingAssembly, string ns, string name, TypeAnalysisContext? baseType, TypeAttributes typeAttributes = DefaultTypeAttributes) : base(null, containingAssembly)
379✔
16
    {
17
        DefaultName = name;
379✔
18
        DefaultNs = ns;
379✔
19
        OverrideBaseType = baseType;
379✔
20
        TypeAttributes = typeAttributes;
379✔
21
    }
379✔
22

23
    public InjectedMethodAnalysisContext InjectMethodContext(string methodName, TypeAnalysisContext returnType, MethodAttributes attributes, params TypeAnalysisContext[] args)
24
    {
25
        var method = new InjectedMethodAnalysisContext(this, methodName, returnType, attributes, args);
252✔
26
        Methods.Add(method);
252✔
27

28
        return method;
252✔
29
    }
30

31
    public InjectedFieldAnalysisContext InjectFieldContext(string fieldName, TypeAnalysisContext fieldType, FieldAttributes attributes)
32
    {
33
        var field = new InjectedFieldAnalysisContext(fieldName, fieldType, attributes, this);
42✔
34
        Fields.Add(field);
42✔
35
        return field;
42✔
36
    }
37

38
    public InjectedEventAnalysisContext InjectEventContext(
39
        string eventName,
40
        TypeAnalysisContext eventType,
41
        MethodAnalysisContext? adder,
42
        MethodAnalysisContext? remover,
43
        MethodAnalysisContext? invoker,
44
        EventAttributes eventAttributes)
45
    {
46
        var @event = new InjectedEventAnalysisContext(eventName, eventType, adder, remover, invoker, eventAttributes, this);
42✔
47
        Events.Add(@event);
42✔
48
        return @event;
42✔
49
    }
50

51
    public InjectedPropertyAnalysisContext InjectPropertyContext(
52
        string propertyName,
53
        TypeAnalysisContext propertyType,
54
        MethodAnalysisContext? getter,
55
        MethodAnalysisContext? setter,
56
        PropertyAttributes propertyAttributes)
57
    {
58
        var property = new InjectedPropertyAnalysisContext(propertyName, propertyType, getter, setter, propertyAttributes, this);
42✔
59
        Properties.Add(property);
42✔
60
        return property;
42✔
61
    }
62
}
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