< Summary

Information
Class: Elsa.Mediator.HostedServices.BackgroundCommandSenderHostedService
Assembly: Elsa.Mediator
File(s): /home/runner/work/elsa-core/elsa-core/src/common/Elsa.Mediator/HostedServices/BackgroundCommandSenderHostedService.cs
Line coverage
50%
Covered lines: 2
Uncovered lines: 2
Coverable lines: 4
Total lines: 20
Line coverage: 50%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
.ctor(...)100%210%
ExecuteAsync(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/common/Elsa.Mediator/HostedServices/BackgroundCommandSenderHostedService.cs

#LineLine coverage
 1using Elsa.Mediator.Services;
 2using Microsoft.Extensions.Hosting;
 3
 4namespace Elsa.Mediator.HostedServices;
 5
 6/// <summary>
 7/// Hosted service adapter for <see cref="BackgroundCommandProcessor"/>.
 8/// </summary>
 39public class BackgroundCommandSenderHostedService(BackgroundCommandProcessor processor) : BackgroundService
 10{
 11    /// <summary>
 12    /// Initializes a new instance of the <see cref="BackgroundCommandSenderHostedService"/> class.
 13    /// </summary>
 014    public BackgroundCommandSenderHostedService(BackgroundCommandProcessor processor, int workerCount) : this(processor)
 15    {
 016    }
 17
 18    /// <inheritdoc />
 319    protected override Task ExecuteAsync(CancellationToken stoppingToken) => processor.ExecuteAsync(stoppingToken);
 20}