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

SamboyCoding / Cpp2IL / 15044429489

15 May 2025 12:03PM UTC coverage: 34.453% (-0.1%) from 34.593%
15044429489

push

github

SamboyCoding
ContextToFieldDescriptor helper class

1795 of 6522 branches covered (27.52%)

Branch coverage included in aggregate %.

0 of 9 new or added lines in 1 file covered. (0.0%)

64 existing lines in 6 files now uncovered.

4143 of 10713 relevant lines covered (38.67%)

160198.46 hits per line

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

0.0
/Cpp2IL.Core/Utils/AsmResolver/ContextToFieldDescriptor.cs
1
using AsmResolver.DotNet;
2
using AsmResolver.DotNet.Signatures;
3
using Cpp2IL.Core.Model.Contexts;
4

5
namespace Cpp2IL.Core.Utils.AsmResolver;
6

7
public static class ContextToFieldDescriptor
8
{
9
    private static FieldDefinition GetFieldDefinition(this FieldAnalysisContext context)
10
    {
NEW
11
        return context.GetExtraData<FieldDefinition>("AsmResolverField") ?? throw new($"AsmResolver field not found in method analysis context for {context}");
×
12
    }
13

14
    private static FieldSignature ToFieldSignature(this FieldAnalysisContext context, ModuleDefinition parentModule)
15
    {
NEW
16
        return new FieldSignature(context.ToTypeSignature(parentModule));
×
17
    }
18

19
    public static IFieldDescriptor ToFieldDescriptor(this FieldAnalysisContext context, ModuleDefinition parentModule)
20
    {
NEW
21
        return context is ConcreteGenericFieldAnalysisContext concreteField
×
NEW
22
            ? concreteField.ToFieldDescriptor(parentModule)
×
NEW
23
            : parentModule.DefaultImporter.ImportField(context.GetFieldDefinition());
×
24
    }
25

26
    public static IFieldDescriptor ToFieldDescriptor(this ConcreteGenericFieldAnalysisContext context, ModuleDefinition parentModule)
27
    {
NEW
28
        return new MemberReference(
×
NEW
29
            context.DeclaringType.ToTypeSignature(parentModule).ToTypeDefOrRef(),
×
NEW
30
            context.Name,
×
NEW
31
            context.BaseFieldContext.ToFieldSignature(parentModule));
×
32
    }
33
}
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