Permalink
Browse files

don't try to convert dictionary to list

  • Loading branch information...
mythz committed Jan 9, 2019
1 parent 74ff349 commit 38162228d87b0a861ff31c61e6911b7fc3dc3f7d
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/ServiceStack/NetCoreAppSettings.cs
@@ -23,7 +23,8 @@ private static T Bind<T>(IConfigurationSection config)
if (config.Value != null)
return config.Value.ConvertTo<T>();

if (typeof(T).HasInterface(typeof(IEnumerable)))
if (typeof(T).HasInterface(typeof(IEnumerable))
&& !typeof(T).HasInterface(typeof(IDictionary)))
{
var values = config.GetChildren().Map(x => x.Value);
return values.ConvertTo<T>();

0 comments on commit 3816222

Please sign in to comment.