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

DemoBytom / DemoEngine / 22109264872

17 Feb 2026 05:44PM UTC coverage: 29.986% (+0.2%) from 29.787%
22109264872

push

coveralls.net

web-flow
Merge pull request #502 from DemoBytom/feature/small_fixes

Fixes #501 
Turns on several diagnostics as warnings (and thus errors):
- [CA1852](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1852)
- [CA1001](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1001)
- [CA2213](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2213)
- [CA2216](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2216)
- [CA2215](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2215)
- [CA1816](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1816)

639 of 2131 relevant lines covered (29.99%)

0.33 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
    private int _disposedValue; //0 == false, anything else == true
15

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

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

24
    private void Dispose(bool disposing)
25
    {
26
        if (Interlocked.Exchange(ref _disposedValue, 1) != 0)
×
27
        {
28
            return;
×
29
        }
30

31
        if (disposing)
×
32
        {
33
            _loopCancellationTokenSource.Dispose();
×
34
        }
35
    }
×
36

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