private IEnumerable <object> ResolveConstructorParameters(RegisteredObject registeredObject) { return(registeredObject .Parameters.Select(parameter => ResolveObject(parameter.ParameterType))); }
public object CreateInstance(params object[] args) { return(Instance = RegisteredObject.CreateInstance(args) ?? throw new InvalidOperationException($"Failed to create instance of type {RegisteredObject.ConcreteType.Name} with interface {RegisteredObject.TypeToResolve.Name}")); }