< Summary

Information
Class: Elsa.Tenants.Mediator.Tasks.SetupMediatorPipelines
Assembly: Elsa.Tenants
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Tenants/Mediator/Tasks/SetupMediatorPipelines.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 19
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%
StartAsync(...)100%11100%
StopAsync(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Tenants/Mediator/Tasks/SetupMediatorPipelines.cs

#LineLine coverage
 1using Elsa.Mediator.Middleware.Command;
 2using Elsa.Mediator.Middleware.Command.Contracts;
 3using Elsa.Tenants.Mediator.Middleware;
 4using JetBrains.Annotations;
 5using Microsoft.Extensions.Hosting;
 6
 7namespace Elsa.Tenants.Mediator.Tasks;
 8
 9[UsedImplicitly]
 710public class SetupMediatorPipelines(ICommandPipeline commandPipeline) : IHostedService
 11{
 12    public Task StartAsync(CancellationToken cancellationToken)
 13    {
 1414        commandPipeline.Setup(pipeline => pipeline.UseMiddleware<TenantPropagatingMiddleware>(0));
 715        return Task.CompletedTask;
 16    }
 17
 618    public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
 19}