using Abp.Configuration; using IwbZero.Authorization.Base.SystemInfo; namespace IwbZero.Configuration { /// /// Implements methods to convert objects between SettingInfo and Setting classes. /// internal static class SettingExtensions { /// /// Creates new object from given object. /// public static SysSetting ToSetting(this SettingInfo settingInfo) { return settingInfo == null ? null : new SysSetting(settingInfo.TenantId, settingInfo.UserId, settingInfo.Name, settingInfo.Value, "", 0); } /// /// Creates new object from given object. /// public static SettingInfo ToSettingInfo(this SysSetting sysSetting) { return sysSetting == null ? null : new SettingInfo(sysSetting.TenantId, sysSetting.UserId, sysSetting.Name, sysSetting.Value); } } }