Fix detection of IDependencyMap impl

Not pretty, but it works.
This commit is contained in:
Khionu Sybiern
2017-03-01 07:13:38 -05:00
parent 4c2221dacb
commit df6579260e

View File

@@ -58,7 +58,7 @@ namespace Discord.Commands
{
if (targetType == typeof(CommandService))
arg = service;
else if (targetType == typeof(IDependencyMap))
else if (targetType.GetTypeInfo().ImplementedInterfaces.Contains(typeof(IDependencyMap)))
arg = map;
else
throw new InvalidOperationException($"Failed to create \"{baseType.FullName}\", dependency \"{targetType.Name}\" was not found.");