using CShells.Features;
using Elsa.Common.Multitenancy;
using Elsa.Extensions;
using JetBrains.Annotations;
using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Tenants.ShellFeatures;
///
/// Enables tenant management capabilities.
///
[ShellFeature(
DisplayName = "Tenant Management",
Description = "Provides tenant store and management capabilities")]
[UsedImplicitly]
public class TenantManagementFeature : IShellFeature
{
///
/// A factory that instantiates an .
///
public Func TenantStoreFactory { get; set; } = sp => sp.GetRequiredService();
public void ConfigureServices(IServiceCollection services)
{
services
.AddMemoryStore()
.AddScoped(TenantStoreFactory);
}
}