< Summary

Information
Class: Elsa.Workflows.Runtime.BackgroundTaskDispatcher
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Services/BackgroundTaskDispatcher.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 17
Line coverage: 0%
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%210%
DispatchAsync()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Services/BackgroundTaskDispatcher.cs

#LineLine coverage
 1using Elsa.Mediator;
 2using Elsa.Mediator.Contracts;
 3using Elsa.Workflows.Runtime.Notifications;
 4
 5namespace Elsa.Workflows.Runtime;
 6
 7/// <summary>
 8/// Relies on the <see cref="INotificationSender"/> to publish the received request as a domain event from a background 
 9/// </summary>
 010public class BackgroundTaskDispatcher(INotificationSender notificationSender) : ITaskDispatcher
 11{
 12    /// <inheritdoc />
 13    public async Task DispatchAsync(RunTaskRequest request, CancellationToken cancellationToken = default)
 14    {
 015        await notificationSender.SendAsync(request, NotificationStrategy.Background, cancellationToken);
 016    }
 17}