Esempio n. 1
0
        private object[] getInstantiatedConstructorParameters(ConstructorInfo ctrInfo)
        {
            List <object> parameters = new List <object>();

            foreach (ParameterInfo paramInfo in ctrInfo.GetParameters())
            {
                parameters.Add(GetInstance(componentRegistry.GetComponent(paramInfo.Name, paramInfo.ParameterType)));
            }
            return(parameters.ToArray());
        }
Esempio n. 2
0
        public object GetComponent(string componentName)
        {
            IComponent component = componentRegistry.GetComponent(componentName);

            return(componentActivator.GetInstance(component));
        }