< Summary

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

#LineLine coverage
 1using Elsa.Mediator.Contracts;
 2using Elsa.Workflows.Runtime.Notifications;
 3
 4namespace Elsa.Workflows.Runtime;
 5
 6/// <summary>
 7/// Relies on the <see cref="INotificationSender"/> to synchronously publish the received request as a domain event.
 8/// </summary>
 9public class SynchronousTaskDispatcher : ITaskDispatcher
 10{
 11    private readonly INotificationSender _notificationSender;
 12
 13    /// <summary>
 14    /// Constructor.
 15    /// </summary>
 016    public SynchronousTaskDispatcher(INotificationSender notificationSender) => _notificationSender = notificationSender
 17
 18    /// <inheritdoc />
 019    public async Task DispatchAsync(RunTaskRequest request, CancellationToken cancellationToken = default) => await _not
 20}