< Summary

Information
Class: Elsa.Tenants.Extensions.ModuleExtensions
Assembly: Elsa.Tenants
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Tenants/Extensions/ModuleExtensions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 38
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
UseTenants(...)100%210%
UseTenantManagementEndpoints(...)100%210%
UseTenantManagement(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Tenants/Extensions/ModuleExtensions.cs

#LineLine coverage
 1using Elsa.Features.Services;
 2using Elsa.Tenants.Features;
 3
 4// ReSharper disable once CheckNamespace
 5namespace Elsa.Tenants.Extensions;
 6
 7/// <summary>
 8/// Extensions for <see cref="IModule"/> that installs the <see cref="TenantsFeature"/> feature.
 9/// </summary>
 10public static class ModuleExtensions
 11{
 12    /// <summary>
 13    /// Installs and configures the <see cref="TenantsFeature"/> feature.
 14    /// </summary>
 15    public static IModule UseTenants(this IModule module, Action<TenantsFeature>? configure = default)
 16    {
 017        module.Configure(configure);
 018        return module;
 19    }
 20
 21    /// <summary>
 22    /// Installs and configures the <see cref="TenantManagementEndpointsFeature"/> feature.
 23    /// </summary>
 24    public static TenantsFeature UseTenantManagementEndpoints(this TenantsFeature feature, Action<TenantManagementEndpoi
 25    {
 026        feature.Module.Configure(configure);
 027        return feature;
 28    }
 29
 30    /// <summary>
 31    /// Installs and configures the <see cref="TenantManagementFeature"/> feature.
 32    /// </summary>
 33    public static TenantsFeature UseTenantManagement(this TenantsFeature feature, Action<TenantManagementFeature>? confi
 34    {
 035        feature.Module.Configure(configure);
 036        return feature;
 37    }
 38}