private object[] GetArgumentsWith(ParameterInfo[] parameters, ArgumentContainer arguments, ArgumentContainer runtimeArguments, Func<Type, object> dependencyResolver, params Type[] registeredTypes) { var resolutionContext = new LightCore.Activation.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 LightCore.Activation.ResolutionContext( null, RegistrationHelper.GetRegistrationContainerFor(registeredTypes), arguments, new ArgumentContainer()); return selector .SelectConstructor(constructors, resolutionContext); }
/// <summary> /// Creates a new instance of <see cref="RegistrationItem" />. /// </summary> internal RegistrationItem() { this.Arguments = new ArgumentContainer(); this.RuntimeArguments = new ArgumentContainer(); }
private object[] GetArgumentsWith(ParameterInfo[] parameters, ArgumentContainer arguments, ArgumentContainer runtimeArguments, Func<Type, object> dependencyResolver) { return this.GetArgumentsWith(parameters, arguments, runtimeArguments, dependencyResolver, new Type[] { }); }
private ConstructorInfo Select(IEnumerable<ConstructorInfo> constructors, ArgumentContainer arguments) { return this.Select(constructors, arguments, new Type[] { }); }
/// <summary> /// Initializes a new instance of <see cref="ResolutionContext" />. /// <param name="container">The container.</param> /// <param name="registrations">The registrations.</param> /// <param name="arguments">The arguments.</param> /// <param name="runtimeArguments">The runtime arguments.</param> /// </summary> internal ResolutionContext(IContainer container, IRegistrationContainer registrations, ArgumentContainer arguments, ArgumentContainer runtimeArguments) : this(container, registrations) { this.Arguments = arguments; this.RuntimeArguments = runtimeArguments; }
/// <summary> /// Initializes a new instance of <see cref="ResolutionContext" />. /// </summary> internal ResolutionContext() { this.Arguments = new ArgumentContainer(); this.RuntimeArguments = new ArgumentContainer(); }