< Summary

Information
Class: Elsa.Common.Multitenancy.HostedServices.ActivateTenants
Assembly: Elsa.Common
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Multitenancy/HostedServices/ActivateTenants.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 18
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.Common/Multitenancy/HostedServices/ActivateTenants.cs

#LineLine coverage
 1using JetBrains.Annotations;
 2using Microsoft.Extensions.Hosting;
 3
 4namespace Elsa.Common.Multitenancy.HostedServices;
 5
 6[UsedImplicitly]
 17public class ActivateTenants(ITenantService tenantService) : IHostedService
 8{
 9    public async Task StartAsync(CancellationToken cancellationToken)
 10    {
 111        await tenantService.ActivateTenantsAsync(cancellationToken);
 112    }
 13
 14    public async Task StopAsync(CancellationToken cancellationToken)
 15    {
 216        await tenantService.DeactivateTenantsAsync(cancellationToken);
 217    }
 18}