object ITargetSelector.GetTarget(string target, object callContext) { if (_instanceHandlers.TryGetValue(target, out var instance)) { return(instance); } if (_handlers.TryGetValue(target, out var type)) { return(_factory.CreateInstance(type, callContext)); } throw new ArgumentException($"Handler for {target} is not registered"); }
object ITargetSelector.GetTarget(string target) { return(_factory.CreateInstance(_handlers[target])); }