Пример #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)));
        }
Пример #2
0
        public void Inject(
            object injectable,
            IEnumerable <object> additional, bool shouldUseAll, InjectContext context, 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");

            InjectExplicit(
                injectable, InstantiateUtil.CreateTypeValueList(additional), shouldUseAll, typeInfo, context, null);
        }