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

DemoBytom / DemoEngine / 24861970515

23 Apr 2026 10:23PM UTC coverage: 30.3% (-0.09%) from 30.388%
24861970515

push

coveralls.net

DemoBytom
Abstracting the `StaThreadReader`

The functionality of reading from the `StaThreadRequest` channel has been abstracted, so that now the consumer can now provide a lambda used for invocation purposes of each request. This means the `StaThreadRequests` can go back to being internal implementation detail of the channel.
Also refactored `WindowsMessagePump` to now be asynchronously disposed. The `MarshallingControl` is now disposed after the `StaThreadRequest` channel stops being served.
Removed `InvokeAsync` and `CreateSurface` from the `IRenderingControl` interface.

1282 of 4231 relevant lines covered (30.3%)

0.37 hits per line

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

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

4
using System.Drawing;
5
using Demo.Engine.Core.ValueObjects;
6

7
namespace Demo.Engine.Core.Interfaces.Platform;
8

9
public readonly ref struct RenderingControlSizeEventArgs
10
{
11
    private readonly ref readonly Width _width;
12
    private readonly ref readonly Height _height;
13

14
    public readonly ref readonly Width Width => ref _width;
×
15
    public readonly ref readonly Height Height => ref _height;
×
16
    public RenderingControlSizeEventArgs(
17
        ref readonly Width drawWidth,
18
        ref readonly Height drawHeight)
19
    {
20
        _width = ref drawWidth;
×
21
        _height = ref drawHeight;
×
22
    }
×
23
}
24

25
public interface IRenderingControl : IDisposable
26
{
27
    /// <summary>
28
    /// User resized event
29
    /// </summary>
30
    event EventHandler<RenderingControlSizeEventArgs>? UserResized;
31
    event EventHandler<EventArgs>? RenderingFormClosed;
32

33
    /// <summary>
34
    /// Displays the control to the user.
35
    /// </summary>
36
    void Show();
37

38
    IntPtr Handle { get; }
39

40
    bool IsDisposed { get; }
41

42
    bool IsFullscreen { get; }
43

44
    /// <summary>
45
    /// Width of the drawable area
46
    /// </summary>
47
    Width DrawWidth { get; }
48

49
    /// <summary>
50
    /// Height of the drawable area
51
    /// </summary>
52
    Height DrawHeight { get; }
53

54
    RectangleF DrawingArea { get; }
55

56
    public void SetFullscreen(bool isFullscreen);
57
}
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