< Summary

Information
Class: Elsa.Common.Multitenancy.DefaultTenantScopeFactory
Assembly: Elsa.Common
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Multitenancy/Implementations/DefaultTenantScopeFactory.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 12
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%
CreateScope(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Multitenancy/Implementations/DefaultTenantScopeFactory.cs

#LineLine coverage
 1using Microsoft.Extensions.DependencyInjection;
 2
 3namespace Elsa.Common.Multitenancy;
 4
 15public class DefaultTenantScopeFactory(ITenantAccessor tenantAccessor, IServiceScopeFactory serviceScopeFactory) : ITena
 6{
 7    public TenantScope CreateScope(Tenant? tenant)
 8    {
 19        var serviceScope = serviceScopeFactory.CreateAsyncScope();
 110        return new(serviceScope, tenantAccessor, tenant);
 11    }
 12}