예제 #1
0
        public static object[] GetValue(this IInjector source, BuilderParameterInfo[] parameterInfos, IEnumerable <IBuilderValue> values)
        {
            object[] args;
            if (parameterInfos != null)
            {
                if (parameterInfos.Length > 0)
                {
                    args = new object[parameterInfos.Length];
                    BuilderParameterInfo p;
                    for (int i = 0; i < parameterInfos.Length; i++)
                    {
                        p = parameterInfos[i];

                        args[i] = source.GetValue(p, values);
                    }
                }
                else
                {
                    args = InternalExtensions.EmptyObjects;
                }
            }
            else
            {
                args = null;
            }
            return(args);
        }
예제 #2
0
 public object[] GetValues(BuilderParameterInfo[] parameterInfos, IBuilderValue[] values)
 {
     return(injector.GetValue(parameterInfos, CombinValues(values, this.values)));
 }