Ejemplo n.º 1
0
        public object Instantiate(
            Type concreteType, params object[] extraArgs)
        {
            Assert.That(!extraArgs.Contains(null),
                        "Null value given to factory constructor arguments when instantiating object with type '{0}'. In order to use null use InstantiateExplicit", concreteType);

            return(InstantiateExplicit(
                       concreteType, InstantiateUtil.CreateTypeValueList(extraArgs)));
        }
Ejemplo n.º 2
0
        internal static void Inject(
            DiContainer container, object injectable,
            IEnumerable <object> additional, bool shouldUseAll, ZenjectTypeInfo typeInfo)
        {
            Assert.That(!additional.Contains(null),
                        "Null value given to injection argument list. In order to use null you must provide a List<TypeValuePair> and not just a list of objects");

            Inject(
                container, injectable,
                InstantiateUtil.CreateTypeValueList(additional), shouldUseAll, typeInfo);
        }