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

SamboyCoding / Cpp2IL / 23779472822

31 Mar 2026 03:46AM UTC coverage: 35.366% (-0.02%) from 35.39%
23779472822

Pull #539

github

web-flow
Merge 6ef414ea4 into 72c306a27
Pull Request #539: Refactor Il2CppBinary and related components

1964 of 6925 branches covered (28.36%)

Branch coverage included in aggregate %.

21 of 56 new or added lines in 20 files covered. (37.5%)

134 existing lines in 6 files now uncovered.

4468 of 11262 relevant lines covered (39.67%)

225256.39 hits per line

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

0.0
/Cpp2IL.Core/Extensions/EnumerableExtensions.cs
1
using System;
2
using System.Collections;
3
using System.Collections.Generic;
4
using System.Linq;
5

6
namespace Cpp2IL.Core.Extensions;
7

8
internal static class EnumerableExtensions
9
{
10
    public static IEnumerable<T> MaybeAppend<T>(this IEnumerable<T> enumerable, T? item) where T : struct
11
    {
12
        if (item is not null)
×
13
        {
14
            return enumerable.Append(item.Value);
×
15
        }
16

17
        return enumerable;
×
18
    }
19

NEW
20
    public static MemoryEnumerable<T> AsEnumerable<T>(this ReadOnlyMemory<T> memory) => new(memory);
×
21

NEW
22
    public static MemoryEnumerator<T> GetEnumerator<T>(this ReadOnlyMemory<T> memory) => new(memory);
×
23

NEW
24
    public class MemoryEnumerable<T>(ReadOnlyMemory<T> memory) : IEnumerable<T>
×
25
    {
26
        public IEnumerator<T> GetEnumerator() => new MemoryEnumerator<T>(memory);
×
27

28
        IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
×
29
    }
30

NEW
31
    public class MemoryEnumerator<T>(ReadOnlyMemory<T> memory) : IEnumerator<T>
×
32
    {
33
        private int _index = -1;
×
34

35
        public bool MoveNext()
36
        {
37
            _index++;
×
38
            return _index < memory.Length;
×
39
        }
40

41
        public void Reset()
42
        {
43
            _index = -1;
×
44
        }
×
45

46
        public T Current => memory.Span[_index];
×
47

48
        object? IEnumerator.Current => Current;
×
49

50
        public void Dispose()
51
        {
52
            // Nothing to dispose
53
        }
×
54
    }
55
}
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