< Summary

Information
Class: Elsa.Workflows.Runtime.WorkflowCommitNotificationSender
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Services/WorkflowCommitNotificationSender.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 21
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
SendAsync(...)100%11100%
SendAsync(...)100%22100%

File(s)

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

#LineLine coverage
 1using Elsa.Mediator.Contracts;
 2
 3namespace Elsa.Workflows.Runtime;
 4
 5/// <summary>
 6/// Buffers notifications emitted during workflow commit persistence and delegates all other notifications to the mediat
 7/// </summary>
 7228public class WorkflowCommitNotificationSender(IMediator mediator, WorkflowCommitNotificationBuffer buffer) : INotificati
 9{
 10    /// <inheritdoc />
 11    public Task SendAsync(INotification notification, CancellationToken cancellationToken = default)
 12    {
 1765413        return SendAsync(notification, null, cancellationToken);
 14    }
 15
 16    /// <inheritdoc />
 17    public Task SendAsync(INotification notification, IEventPublishingStrategy? strategy, CancellationToken cancellation
 18    {
 1765419        return buffer.TryAdd(notification, strategy) ? Task.CompletedTask : mediator.SendAsync(notification, strategy, c
 20    }
 21}