| | | 1 | | using Elsa.Features.Services; |
| | | 2 | | using Elsa.Tenants.Features; |
| | | 3 | | |
| | | 4 | | // ReSharper disable once CheckNamespace |
| | | 5 | | namespace Elsa.Tenants.Extensions; |
| | | 6 | | |
| | | 7 | | /// <summary> |
| | | 8 | | /// Extensions for <see cref="IModule"/> that installs the <see cref="TenantsFeature"/> feature. |
| | | 9 | | /// </summary> |
| | | 10 | | public 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 | | { |
| | 0 | 17 | | module.Configure(configure); |
| | 0 | 18 | | 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 | | { |
| | 0 | 26 | | feature.Module.Configure(configure); |
| | 0 | 27 | | 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 | | { |
| | 0 | 35 | | feature.Module.Configure(configure); |
| | 0 | 36 | | return feature; |
| | | 37 | | } |
| | | 38 | | } |