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

DemoBytom / DemoEngine / 13909899542

17 Mar 2025 09:09PM UTC coverage: 13.087% (+3.7%) from 9.384%
13909899542

push

coveralls.net

DemoBytom
Removing DirectX 11 and unused services

298 of 2277 relevant lines covered (13.09%)

190.21 hits per line

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

0.0
/src/Demo.Engine.Core/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 System.Threading.Channels;
5
using Demo.Engine.Core.Components.Keyboard.Internal;
6
using Demo.Engine.Core.Features.StaThread;
7
using Demo.Engine.Core.Interfaces;
8
using Demo.Engine.Core.Interfaces.Components;
9
using Demo.Engine.Core.Interfaces.Platform;
10
using Demo.Engine.Core.Platform;
11
using Demo.Engine.Core.Services;
12
using Microsoft.Extensions.DependencyInjection;
13

14
namespace Demo.Engine.Core;
15

16
public static class RegistrationExtensions
17
{
18
    public static IServiceCollection AddEngineCore(
19
        this IServiceCollection services) => services
×
20
                .AddSingleton<IKeyboardCache, KeyboardCache>()
×
21
                .AddTransient<IFpsTimer, FpsTimer>()
×
22
                .AddTransient<IContentFileProvider, ContentFileProvider>()
×
23
                .AddHostedService<EngineService>()
×
24
                .AddScoped<IMainLoopLifetime, MainLoopLifetime>()
×
25
                .AddScoped<ILoopJob, LoopJob>()
×
26
                .AddScoped<IMainLoopService, MainLoopService>()
×
27
                .AddStaThreadFeature()
×
28
                ;
29

30
    internal static IServiceCollection AddScopedBoundedChannel<T>(
31
        this IServiceCollection services,
32
            BoundedChannelOptions options)
33
        => services
×
34
            .AddScoped(_
×
35
                => Channel.CreateBounded<T>(
×
36
                    options))
×
37
            .AddScoped(sp
×
38
                => sp.GetRequiredService<Channel<T>>().Reader)
×
39
            .AddScoped(sp
×
40
                => sp.GetRequiredService<Channel<T>>().Writer)
×
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