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

DemoBytom / DemoEngine / 22002767440

13 Feb 2026 09:03PM UTC coverage: 33.08% (+0.09%) from 32.988%
22002767440

push

coveralls.net

DemoBytom
Turn on few more diagnostics

1220 of 3688 relevant lines covered (33.08%)

0.35 hits per line

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

0.0
/src/Demo.Engine.Core/Services/MainLoopLifetime.cs
1
// Copyright © Michał Dembski and contributors.
2
// Distributed under MIT license. See LICENSE file in the root for more information.
3

4
using Demo.Engine.Core.Interfaces;
5

6
namespace Demo.Engine.Core.Services;
7

8
internal sealed class MainLoopLifetime
9
    : IMainLoopLifetime,
10
      IDisposable
11
{
12
    private readonly CancellationTokenSource _loopCancellationTokenSource = new();
×
13
    private bool _disposedValue;
14

15
    /// <inheritdoc cref="CancellationTokenSource.Cancel()"/>
16
    public void Cancel()
17
        => _loopCancellationTokenSource.Cancel();
×
18

19
    /// <inheritdoc cref="CancellationTokenSource.Token"/>
20
    public CancellationToken Token
21
        => _loopCancellationTokenSource.Token;
×
22

23
    private void Dispose(bool disposing)
24
    {
25
        if (!_disposedValue)
×
26
        {
27
            if (disposing)
×
28
            {
29
                _loopCancellationTokenSource.Dispose();
×
30
            }
31

32
            _disposedValue = true;
×
33
        }
34
    }
×
35

36
    public void Dispose()
37
    {
38
        // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
39
        Dispose(disposing: true);
×
40
        GC.SuppressFinalize(this);
×
41
    }
×
42
}
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