< 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
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
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
.ctor(...)100%210%
StartAsync(...)100%210%
StopAsync(...)100%210%

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]
 010public class SetupMediatorPipelines(ICommandPipeline commandPipeline) : IHostedService
 11{
 12    public Task StartAsync(CancellationToken cancellationToken)
 13    {
 014        commandPipeline.Setup(pipeline => pipeline.UseMiddleware<TenantPropagatingMiddleware>(0));
 015        return Task.CompletedTask;
 16    }
 17
 018    public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
 19}