< Summary

Information
Class: Elsa.Mediator.PublishingStrategies.SequentialProcessingStrategy
Assembly: Elsa.Mediator
File(s): /home/runner/work/elsa-core/elsa-core/src/common/Elsa.Mediator/PublishingStrategies/SequentialProcessingStrategy.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 23
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
PublishAsync()100%22100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/common/Elsa.Mediator/PublishingStrategies/SequentialProcessingStrategy.cs

#LineLine coverage
 1using Elsa.Mediator.Contexts;
 2using Elsa.Mediator.Contracts;
 3using Elsa.Mediator.Extensions;
 4
 5namespace Elsa.Mediator.PublishingStrategies;
 6
 7/// <summary>
 8/// Invokes event handlers in sequence and waits for the result.
 9/// </summary>
 10public class SequentialProcessingStrategy : IEventPublishingStrategy
 11{
 12    /// <inheritdoc />
 13    public async Task PublishAsync(NotificationStrategyContext context)
 14    {
 1131615        var notificationContext = context.NotificationContext;
 1131616        var notification = notificationContext.Notification;
 1131617        var notificationType = notification.GetType();
 1131618        var handleMethod = notificationType.GetNotificationHandlerMethod();
 19
 4809820        foreach (var handler in context.Handlers)
 1273321            await handler.InvokeAsync(handleMethod, context.NotificationContext);
 1131622    }
 23}

Methods/Properties

PublishAsync()