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

SamboyCoding / Cpp2IL / 14017205606

23 Mar 2025 08:33AM UTC coverage: 27.153% (+0.03%) from 27.127%
14017205606

Pull #432

github

web-flow
Merge 043964bcd into 4409a1bb4
Pull Request #432: Use newer AsmResolver APIs and update the places we import references

1270 of 6478 branches covered (19.6%)

Branch coverage included in aggregate %.

0 of 24 new or added lines in 4 files covered. (0.0%)

2 existing lines in 2 files now uncovered.

3377 of 10636 relevant lines covered (31.75%)

122492.94 hits per line

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

54.17
/Cpp2IL.Core/Model/Contexts/PropertyAnalysisContext.cs
1
using System.Reflection;
2
using Cpp2IL.Core.Utils;
3
using LibCpp2IL.Metadata;
4
using StableNameDotNet.Providers;
5

6
namespace Cpp2IL.Core.Model.Contexts;
7

8
public class PropertyAnalysisContext : HasCustomAttributesAndName, IPropertyInfoProvider
9
{
10
    public TypeAnalysisContext DeclaringType { get; }
53,640✔
11
    public Il2CppPropertyDefinition Definition { get; }
30,733✔
12

13
    public MethodAnalysisContext? Getter { get; }
2✔
14
    public MethodAnalysisContext? Setter { get; }
×
15

16
    protected override int CustomAttributeIndex => Definition.customAttributeIndex;
30,720✔
17

18
    public override AssemblyAnalysisContext CustomAttributeAssembly => DeclaringType.DeclaringAssembly;
53,640✔
19

20
    public override string DefaultName => Definition.Name!;
10✔
21

NEW
22
    public bool IsStatic => Definition.IsStatic;
×
23

NEW
24
    public PropertyAttributes PropertyAttributes => (PropertyAttributes)Definition.attrs;
×
25

UNCOV
26
    public TypeAnalysisContext PropertyTypeContext => DeclaringType.DeclaringAssembly.ResolveIl2CppType(Definition.RawPropertyType!);
×
27

28
    public PropertyAnalysisContext(Il2CppPropertyDefinition definition, TypeAnalysisContext parent) : base(definition.token, parent.AppContext)
42,180✔
29
    {
30
        DeclaringType = parent;
42,180✔
31
        Definition = definition;
42,180✔
32

33
        InitCustomAttributeData();
42,180✔
34

35
        Getter = parent.GetMethod(definition.Getter);
42,180✔
36
        Setter = parent.GetMethod(definition.Setter);
42,180✔
37
    }
42,180✔
38

39
    public override string ToString() => $"Property:  {Definition.DeclaringType!.Name}::{Definition.Name}";
×
40

41
    #region StableNameDotNet implementation
42

43
    public ITypeInfoProvider PropertyTypeInfoProvider
44
        => Definition.RawPropertyType!.ThisOrElementIsGenericParam()
×
45
            ? new GenericParameterTypeInfoProviderWrapper(Definition.RawPropertyType!.GetGenericParamName())
×
46
            : TypeAnalysisContext.GetSndnProviderForType(AppContext, Definition.RawPropertyType!);
×
47

48
    public string PropertyName => Name;
×
49

50
    #endregion
51
}
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