< Summary

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

File(s)

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

#LineLine coverage
 1using CShells.Features;
 2using Elsa.Common.ShellHandlers;
 3using Elsa.Extensions;
 4using Microsoft.Extensions.DependencyInjection;
 5using Microsoft.Extensions.DependencyInjection.Extensions;
 6
 7namespace Elsa.Common.ShellFeatures;
 8
 9/// <summary>
 10/// Adds and configures the Mediator feature.
 11/// </summary>
 12[ShellFeature(
 13    "Mediator",
 14    DisplayName = "Mediator",
 15    Description = "Registers mediator services for in-process notifications and requests",
 16    DependsOn = [typeof(MultitenancyFeature)])]
 17public class MediatorFeature : IShellFeature
 18{
 19    public void ConfigureServices(IServiceCollection services)
 20    {
 221        services
 222            .AddMediator()
 223            .AddMediatorBackgroundChannels();
 24
 225        services.TryAddSingleton<MediatorBackgroundProcessingCoordinator>();
 226        services.AddBackgroundTask<MediatorBackgroundTask>();
 227    }
 28}