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

DemoBytom / DemoEngine / 19463301765

18 Nov 2025 10:46AM UTC coverage: 26.251% (+1.6%) from 24.615%
19463301765

push

coveralls.net

web-flow
Merge pull request #462 from DemoBytom/feature/dx12-arm64

DirectX12 and Windows on Arm migration

530 of 2019 relevant lines covered (26.25%)

0.28 hits per line

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

0.0
/src/Demo.Engine.Core/Interfaces/IDebugLayerLogger.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.Exceptions;
5
using Microsoft.Extensions.Logging;
6

7
namespace Demo.Engine.Core.Interfaces;
8

9
/// <summary>
10
/// A logger used to read the messages from the graphics debug layer
11
/// </summary>
12
public interface IDebugLayerLogger
13
{
14
    /// <summary>
15
    /// Logs messages stored in the graphic's message queue.
16
    /// Messages are removied from the queue after logging them.
17
    /// </summary>
18
    public void LogMessages();
19

20
    /// <summary>
21
    /// Allows reading the messages from the graphic's message queue.
22
    /// Messages are not removed from the queue after reading them.
23
    /// </summary>
24
    /// <param name="readFrom">Position in the queue from which reading should begin</param>
25
    /// <returns>List of messages or empty array</returns>
26
    public DebugLayerMessage[] ReadMessages(ulong readFrom = 0);
27

28
    /// <summary>
29
    /// Returns amount of previously stored messages in the queue, allowing reading from that point only
30
    /// </summary>
31
    /// <returns></returns>
32
    public ulong MessageQueuePosition();
33

34
    /// <summary>
35
    /// Wraps the call in a message queue context, allowing for reading messages produced during this call in case of an error.
36
    /// In case of an error an exception with read messages is thrown.
37
    /// </summary>
38
    /// <typeparam name="T">Type of the resource returned by the func</typeparam>
39
    /// <param name="func">Resource creation function</param>
40
    /// <exception cref="GraphicsException">Exception thrown if an error occurs during the call</exception>
41
    /// <returns>Created resource</returns>
42
    public T WrapCallInMessageExceptionHandler<T>(Func<T> func);
43

44
    /// <summary>
45
    /// Wraps the call in a message queue context, allowing for reading messages produced during this call in case of an error.
46
    /// In case of an error an exception with read messages is thrown.
47
    /// </summary>
48
    /// <param name="act">Action performed</param>
49
    /// <exception cref="GraphicsException">Exception thrown if an error occurs during the call</exception>
50
    public void WrapCallInMessageExceptionHandler(Action act);
51
}
52

53
/// <summary>
54
/// A single message from the debug layer
55
/// </summary>
56
/// <param name="Category">A category of the message, like device creation or destruction</param>
57
/// <param name="Id">Entity that produced the log message</param>
58
/// <param name="Message">Logged message</param>
59
public record DebugLayerMessage(
×
60
    string Category,
×
61
    string Id,
×
62
    string Message,
×
63
    LogLevel LogLevel);
×
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