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

SamboyCoding / Cpp2IL / 15052278841

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

push

github

SamboyCoding
Support injecting anything
* Nested types
* Events
* Properties
* Assemblies

Support additional metadata in injected assemblies

Make setter for TypeAnalysisContext::OverrideBaseType public

TypeAnalysisContext::InterfaceContexts as list rather than array

Fix sign bug

Support generic parameters on type contexts and method contexts

Make GenericParameterTypeAnalysisContext instances unique

Revert change to Il2CppGenericParameter::Index

Use attributes to determine if injected methods are static
* Also add hide by sig attribute for injected constructors

Support overrides on injected methods

In ControlFlowGraphOutputFormat, exclude injected assemblies

Ensure injected assemblies can't delete existing assemblies

Backing field on .NET Standard for injected method overrides

Implement requested change

1774 of 6622 branches covered (26.79%)

Branch coverage included in aggregate %.

147 of 196 new or added lines in 27 files covered. (75.0%)

53 existing lines in 2 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

31.82
/Cpp2IL.Core/Model/Contexts/InjectedEventAnalysisContext.cs
1
using System.Reflection;
2

3
namespace Cpp2IL.Core.Model.Contexts;
4

5
public class InjectedEventAnalysisContext : EventAnalysisContext
6
{
7
    public override string DefaultName { get; }
1✔
NEW
8
    public override EventAttributes EventAttributes { get; }
×
9
    public override TypeAnalysisContext EventTypeContext { get; }
1✔
10
    public override bool IsStatic
11
    {
12
        get
13
        {
NEW
14
            if (Adder is not null)
×
NEW
15
                return Adder.IsStatic;
×
NEW
16
            if (Remover is not null)
×
NEW
17
                return Remover.IsStatic;
×
NEW
18
            if (Invoker is not null)
×
NEW
19
                return Invoker.IsStatic;
×
20

NEW
21
            throw new("Event has no methods");
×
22
        }
23
    }
NEW
24
    protected override bool IsInjected => true;
×
25

26
    public InjectedEventAnalysisContext(
27
        string name,
28
        TypeAnalysisContext eventType,
29
        MethodAnalysisContext? adder,
30
        MethodAnalysisContext? remover,
31
        MethodAnalysisContext? invoker,
32
        EventAttributes eventAttributes,
33
        TypeAnalysisContext parent) : base(adder, remover, invoker, parent)
42✔
34
    {
35
        DefaultName = name;
42✔
36
        EventTypeContext = eventType;
42✔
37
        EventAttributes = eventAttributes;
42✔
38
    }
42✔
39
}
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