File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
DevProxy.Abstractions/Plugins Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,22 @@ public TConfiguration Configuration
9999 }
100100 public IConfigurationSection ConfigurationSection { get ; } = pluginConfigurationSection ;
101101
102- protected virtual IEnumerable < string > ? GetConfigurationValue ( string key , IEnumerable < string > ? configuredList , IEnumerable < string > ? defaultList = default )
102+ /// <summary>
103+ /// <para>Evaluates the <paramref name="key"/> array property.
104+ /// If the property exists, the <paramref name="configuredList"/> value is used;
105+ /// otherwise, the default <paramref name="defaultList"/> is applied.</para>
106+ /// <para>If the property is <i>null</i>, it is interpreted as an empty array (<i>[]</i>).</para>
107+ /// <para>Note: This is necessary because .NET configuration binding cannot differentiate between an empty array,
108+ /// a null value, or a missing property in appsettings.json.
109+ /// See at <see cref="https://github.com/dotnet/runtime/issues/58930"/>
110+ /// </para>
111+ /// </summary>
112+ /// <param name="key">The array property name</param>
113+ /// <param name="configuredList">The configured list of string values</param>
114+ /// <param name="defaultList">The default list of string values</param>
115+ /// <returns>Returns the result list of string values</returns>
116+ protected virtual IEnumerable < string > ? GetConfigurationValue ( string key , IEnumerable < string > ? configuredList ,
117+ IEnumerable < string > ? defaultList = default )
103118 {
104119 ArgumentNullException . ThrowIfNull ( key , nameof ( key ) ) ;
105120
You can’t perform that action at this time.
0 commit comments