• 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.Core/Features/StaThread/StaThreadRegistrationExtensions.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 Microsoft.Extensions.DependencyInjection;
6

7
namespace Demo.Engine.Core.Features.StaThread;
8

9
internal static class StaThreadRegistrationExtensions
10
{
11
    extension(IServiceCollection services)
12
    {
13
        internal IServiceCollection AddStaThreadFeature()
14
            => services
×
15
                .AddSingletonBoundedChannel<StaThreadRequests>(
×
16
                    new BoundedChannelOptions(10)
×
17
                    {
×
18
                        AllowSynchronousContinuations = false,
×
19
                        FullMode = BoundedChannelFullMode.Wait,
×
20
                        SingleReader = true,
×
21
                        SingleWriter = false,
×
22
                    })
×
23
                .AddSingleton<IStaThreadWriter, StaThreadWriter>()
×
24
                .AddSingleton<IStaThreadReader, StaThreadReader>()
×
25
                ;
26

27
        private IServiceCollection AddSingletonBoundedChannel<T>(
28
            BoundedChannelOptions options)
29
            => services
×
30
                .AddSingleton(_
×
31
                    => Channel.CreateBounded<T>(
×
32
                        options))
×
33
                .AddSingleton(sp
×
34
                    => sp.GetRequiredService<Channel<T>>().Reader)
×
35
                .AddSingleton(sp
×
36
                    => sp.GetRequiredService<Channel<T>>().Writer)
×
37
            ;
38
    }
39
}
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