You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
829 B
C#

using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Settings;
namespace NPin.Framework.SettingManagement.Domain;
public class TenantSettingManagementProvider : SettingManagementProvider, ITransientDependency
{
public override string Name => TenantSettingValueProvider.ProviderName;
protected ICurrentTenant CurrentTenant { get; }
public TenantSettingManagementProvider(ISettingManagementStore settingManagementStore, ICurrentTenant currentTenant)
: base(settingManagementStore)
{
CurrentTenant = currentTenant;
}
protected override string? NormalizeProviderKey(string? providerKey)
{
if (providerKey != null)
{
return providerKey;
}
return CurrentTenant.Id?.ToString();
}
}