< Summary

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

File(s)

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

#LineLine coverage
 1namespace Elsa.Common.Multitenancy;
 2
 3/// <summary>
 4/// An implementation of <see cref="ITenantResolver"/> that always returns the default tenant.
 5/// </summary>
 6public class DefaultTenantResolver : TenantResolverBase
 7{
 08    private readonly Tenant _defaultTenant = new()
 09    {
 010        Id = string.Empty,
 011        Name = "Default"
 012    };
 13
 14    protected override TenantResolverResult Resolve(TenantResolverContext context)
 15    {
 016        return Resolved(_defaultTenant.Id);
 17    }
 18}