From 9a9e8d36df7849c30d398d55ee2c75db1722da13 Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 24 Jun 2022 09:56:06 +0800 Subject: [PATCH] Use `IHasExtraProperties` to replace `ExtensibleObject`. --- .../ApplicationConfigurationDto.cs | 6 ++++-- .../AbpApplicationConfigurationAppService.cs | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationDto.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationDto.cs index 4a7a21959f..61b5ec18db 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationDto.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationDto.cs @@ -1,12 +1,12 @@ using System; using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending; using Volo.Abp.AspNetCore.Mvc.MultiTenancy; -using Volo.Abp.ObjectExtending; +using Volo.Abp.Data; namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations; [Serializable] -public class ApplicationConfigurationDto : ExtensibleObject +public class ApplicationConfigurationDto : IHasExtraProperties { public ApplicationLocalizationConfigurationDto Localization { get; set; } @@ -29,4 +29,6 @@ public class ApplicationConfigurationDto : ExtensibleObject public ClockDto Clock { get; set; } public ObjectExtensionsDto ObjectExtensions { get; set; } + + public ExtraPropertyDictionary ExtraProperties { get; set; } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs index abf3fe603c..528a04583d 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs @@ -13,6 +13,7 @@ using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending; using Volo.Abp.AspNetCore.Mvc.MultiTenancy; using Volo.Abp.Authorization; using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Data; using Volo.Abp.Features; using Volo.Abp.GlobalFeatures; using Volo.Abp.Localization; @@ -99,7 +100,8 @@ public class AbpApplicationConfigurationAppService : ApplicationService, IAbpApp CurrentTenant = GetCurrentTenant(), Timing = await GetTimingConfigAsync(), Clock = GetClockConfig(), - ObjectExtensions = _cachedObjectExtensionsDtoService.Get() + ObjectExtensions = _cachedObjectExtensionsDtoService.Get(), + ExtraProperties = new ExtraPropertyDictionary() }; if (_options.Contributors.Any())