private object[] GetArgumentsWith(ParameterInfo[] parameters, ArgumentContainer arguments,
                                          ArgumentContainer runtimeArguments, Func <Type, object> dependencyResolver, params Type[] registeredTypes)
        {
            var resolutionContext = new ResolutionContext(
                null,
                RegistrationHelper.GetRegistrationContainerFor(registeredTypes),
                arguments,
                runtimeArguments);

            var argumentCollector = new LightCore.Activation.Components.ArgumentCollector();

            return(argumentCollector.CollectArguments(dependencyResolver, parameters, resolutionContext));
        }
        private ConstructorInfo Select(IEnumerable <ConstructorInfo> constructors, ArgumentContainer arguments,
                                       params Type[] registeredTypes)
        {
            var selector = new LightCore.Activation.Components.ConstructorSelector();

            var resolutionContext =
                new ResolutionContext(
                    null,
                    RegistrationHelper.GetRegistrationContainerFor(registeredTypes),
                    arguments,
                    new ArgumentContainer());

            return(selector
                   .SelectConstructor(constructors, resolutionContext));
        }