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

SamboyCoding / Cpp2IL / 15038179532

15 May 2025 06:28AM UTC coverage: 34.406% (-0.4%) from 34.826%
15038179532

Pull #451

github

web-flow
Merge c2b1b2523 into e93c0fecc
Pull Request #451: Support injecting anything

1787 of 6586 branches covered (27.13%)

Branch coverage included in aggregate %.

147 of 195 new or added lines in 27 files covered. (75.38%)

53 existing lines in 2 files now uncovered.

4170 of 10728 relevant lines covered (38.87%)

189532.84 hits per line

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

73.68
/Cpp2IL.Core/Model/Contexts/InjectedMethodAnalysisContext.cs
1
using System.Collections.Generic;
2
using System.Reflection;
3

4
namespace Cpp2IL.Core.Model.Contexts;
5

6
public class InjectedMethodAnalysisContext : MethodAnalysisContext
7
{
8
    public override ulong UnderlyingPointer => 0;
×
9

10
    public override string DefaultName { get; }
3✔
11

NEW
12
    public override bool IsStatic => Attributes.HasFlag(MethodAttributes.Static);
×
13

14
    public override MethodAttributes Attributes { get; }
×
15
    
16
    protected override bool IsInjected => true;
×
17

18
#if NET5_0_OR_GREATER
19
    // Covariant return types are .NET 5.0+
20
    public override List<MethodAnalysisContext> Overrides { get; } = new();
252✔
21
#else
22
    public override IEnumerable<MethodAnalysisContext> Overrides => [];
23
#endif
24

25
    public InjectedMethodAnalysisContext(TypeAnalysisContext parent, string name, TypeAnalysisContext returnType, MethodAttributes attributes, TypeAnalysisContext[] injectedParameterTypes, string[]? injectedParameterNames = null) : base(null, parent)
252✔
26
    {
27
        DefaultName = name;
252✔
28
        InjectedReturnType = returnType;
252✔
29
        Attributes = attributes;
252✔
30

31
        for (var i = 0; i < injectedParameterTypes.Length; i++)
672✔
32
        {
33
            var injectedParameterType = injectedParameterTypes[i];
84✔
34
            var injectedParameterName = injectedParameterNames?[i];
84!
35

36
            Parameters.Add(new InjectedParameterAnalysisContext(injectedParameterName, injectedParameterType, i, this));
84✔
37
        }
38
    }
252✔
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

© 2026 Coveralls, Inc