Implimented discussed changes

This commit is contained in:
Khionu Sybiern
2017-03-01 14:19:28 -05:00
parent c350debdba
commit 4274900d43
2 changed files with 5 additions and 1 deletions

View File

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