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

DemoBytom / DemoEngine / 25692492109

11 May 2026 07:28PM UTC coverage: 28.743% (+0.4%) from 28.38%
25692492109

push

coveralls.net

DemoBytom
WIP Instrumentation source generator

1248 of 4342 relevant lines covered (28.74%)

0.33 hits per line

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

0.0
/src/Demo.Engine.Platform.DirectX12/RegistrationExtensions.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
using Demo.Engine.Core.Interfaces.Rendering;
6
using Demo.Engine.Core.Interfaces.Rendering.Shaders;
7
using Demo.Engine.Observability.Abstractions;
8
using Demo.Engine.Platform.DirectX12.Shaders;
9
using Microsoft.Extensions.DependencyInjection;
10

11
namespace Demo.Engine.Platform.DirectX12;
12

13
public static class RegistrationExtensions
14
{
15
    public static IServiceCollection AddDirectX12(
16
        this IServiceCollection services)
17
        => services
×
18
            .AddScoped<D3D12RenderingEngine>()
×
19
            .AddScoped<IRenderingEngine>(sp
×
20
                => sp.GetRequiredService<D3D12RenderingEngine>())
×
21
            .AddScoped<ID3D12RenderingEngine>(sp
×
22
                => sp.GetRequiredService<D3D12RenderingEngine>())
×
23
            .AddScoped<IDebugLayerLogger, DebugLayerLogger>()
×
24
            // shaders
×
25
            .AddSingleton<IShaderCompiler, ShaderCompilerOld>()
×
26
            .AddSingleton<IShaderAsyncCompiler, ShaderCompiler>()
×
27
            .AddSingleton<IEngineShaderManager, EngineShaderManager>()
×
28
            //Cube
×
29
            .AddScoped<ICube, Cube>()
×
30
        ;
31

32
    public static ref TTelemetryBuilder WithDirectX12Instrumentation<TTelemetryBuilder>(
33
        ref this TTelemetryBuilder instrumentationBuilder)
34
        where TTelemetryBuilder : struct, ITelemetryBuilder<TTelemetryBuilder>, allows ref struct
35
    {
36
        instrumentationBuilder.WithInstrumentation<InstrumentationDX12>();
×
37

38
        return ref instrumentationBuilder;
×
39
    }
40
}
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