< Summary

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

File(s)

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

#LineLine coverage
 1using Elsa.Mediator.Contexts;
 2using Elsa.Mediator.Contracts;
 3using Microsoft.Extensions.DependencyInjection;
 4
 5namespace Elsa.Mediator.PublishingStrategies;
 6
 7/// <summary>
 8/// Invokes event handlers in parallel and does not wait for the result.
 9/// </summary>
 10public class BackgroundProcessingStrategy : IEventPublishingStrategy
 11{
 12    /// <inheritdoc />
 13    public async Task PublishAsync(NotificationStrategyContext context)
 14    {
 015        var notificationsChannel = context.ServiceProvider.GetRequiredService<INotificationsChannel>();
 16
 017        await notificationsChannel.Writer.WriteAsync(context.NotificationContext, context.CancellationToken);
 018    }
 19}

Methods/Properties

PublishAsync()