Browse Source

Prevent duplicate providers in the list.

pull/13330/head
Halil İbrahim Kalkan 4 years ago
parent
commit
1167c78acd
  1. 4
      framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs

4
framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingDefinition.cs

@ -39,7 +39,7 @@ public class SettingDefinition
/// A list of allowed providers to get/set value of this setting. /// A list of allowed providers to get/set value of this setting.
/// An empty list indicates that all providers are allowed. /// An empty list indicates that all providers are allowed.
/// </summary> /// </summary>
public List<string> Providers { get; } //TODO: Rename to AllowedProviders public List<string> Providers { get; }
/// <summary> /// <summary>
/// Is this setting inherited from parent scopes. /// Is this setting inherited from parent scopes.
@ -98,7 +98,7 @@ public class SettingDefinition
{ {
if (!providers.IsNullOrEmpty()) if (!providers.IsNullOrEmpty())
{ {
Providers.AddRange(providers); Providers.AddIfNotContains(providers);
} }
return this; return this;

Loading…
Cancel
Save