@@ -408,6 +408,12 @@ public IEnumerable<string> GetSettingValues(string envarName, string section, st
408408 {
409409 yield return value ;
410410 }
411+
412+ // Check for an externally specified default value
413+ if ( TryGetExternalDefault ( section , scope , property , out value ) )
414+ {
415+ yield return value ;
416+ }
411417 }
412418 }
413419
@@ -423,10 +429,10 @@ public IEnumerable<string> GetSettingValues(string envarName, string section, st
423429 yield return value ;
424430 }
425431
426- // Check for an externally specified default value
427- if ( TryGetExternalDefault ( section , property , out string defaultValue ) )
432+ // Check for an externally specified default value without a scope
433+ if ( TryGetExternalDefault ( section , null , property , out value ) )
428434 {
429- yield return defaultValue ;
435+ yield return value ;
430436 }
431437 }
432438 }
@@ -436,10 +442,11 @@ public IEnumerable<string> GetSettingValues(string envarName, string section, st
436442 /// This may come from external policies or the Operating System.
437443 /// </summary>
438444 /// <param name="section">Configuration section name.</param>
445+ /// <param name="scope">Optional configuration scope.</param>
439446 /// <param name="property">Configuration property name.</param>
440447 /// <param name="value">Value of the configuration setting, or null.</param>
441448 /// <returns>True if a default setting has been set, false otherwise.</returns>
442- protected virtual bool TryGetExternalDefault ( string section , string property , out string value )
449+ protected virtual bool TryGetExternalDefault ( string section , string scope , string property , out string value )
443450 {
444451 value = null ;
445452 return false ;
0 commit comments