< Summary

Information
Class: Elsa.Common.Features.MediatorFeature
Assembly: Elsa.Common
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Features/MediatorFeature.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 24
Line coverage: 100%
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%11100%
Apply()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Features/MediatorFeature.cs

#LineLine coverage
 1using Elsa.Features.Abstractions;
 2using Elsa.Features.Services;
 3using Microsoft.Extensions.DependencyInjection;
 4
 5namespace Elsa.Common.Features;
 6
 7/// <summary>
 8/// Adds and configures the Mediator feature.
 9/// </summary>
 10public class MediatorFeature : FeatureBase
 11{
 12    /// <inheritdoc />
 113    public MediatorFeature(IModule module) : base(module)
 14    {
 115    }
 16
 17    /// <inheritdoc />
 18    public override void Apply()
 19    {
 120        Services
 121            .AddMediator()
 122            .AddMediatorHostedServices();
 123    }
 24}