diff --git a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ModuleObjectExtensionManagerExtensions.cs b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ModuleObjectExtensionManagerExtensions.cs index 71339f725f..eeb7095068 100644 --- a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ModuleObjectExtensionManagerExtensions.cs +++ b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ModuleObjectExtensionManagerExtensions.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using JetBrains.Annotations; +using JetBrains.Annotations; using Volo.Abp.ObjectExtending.Modularity; namespace Volo.Abp.ObjectExtending @@ -15,7 +14,7 @@ namespace Volo.Abp.ObjectExtending return objectExtensionManager.Configuration.GetOrAdd( ObjectExtensionManagerConfigurationKey, - () => new ModuleExtensionConfigurationDictionary() + _ => new ModuleExtensionConfigurationDictionary() ) as ModuleExtensionConfigurationDictionary; } } diff --git a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ObjectExtensionManager.cs b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ObjectExtensionManager.cs index 26b692c232..2b0ce8977d 100644 --- a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ObjectExtensionManager.cs +++ b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ObjectExtensionManager.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.Immutable; using JetBrains.Annotations; @@ -11,14 +12,14 @@ namespace Volo.Abp.ObjectExtending public static ObjectExtensionManager Instance { get; set; } = new ObjectExtensionManager(); [NotNull] - public Dictionary Configuration { get; } + public ConcurrentDictionary Configuration { get; } protected Dictionary ObjectsExtensions { get; } protected internal ObjectExtensionManager() { ObjectsExtensions = new Dictionary(); - Configuration = new Dictionary(); + Configuration = new ConcurrentDictionary(); } [NotNull]