< 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: 30
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 Elsa.Platform.PackageManifest.Generator.Hints;
 5using Microsoft.Extensions.DependencyInjection;
 6using Microsoft.Extensions.DependencyInjection.Extensions;
 7
 8namespace Elsa.Common.ShellFeatures;
 9
 10/// <summary>
 11/// Adds and configures the Mediator feature.
 12/// </summary>
 13[ManifestFeatureCategory("Infrastructure")]
 14[ShellFeature(
 15    "Mediator",
 16    DisplayName = "Mediator",
 17    Description = "Registers mediator services for in-process notifications and requests",
 18    DependsOn = [typeof(MultitenancyFeature)])]
 19public class MediatorFeature : IShellFeature
 20{
 21    public void ConfigureServices(IServiceCollection services)
 22    {
 223        services
 224            .AddMediator()
 225            .AddMediatorBackgroundChannels();
 26
 227        services.TryAddSingleton<MediatorBackgroundProcessingCoordinator>();
 228        services.AddBackgroundTask<MediatorBackgroundTask>();
 229    }
 30}