Beispiel #1
0
        private ParameterExpression[] PrepareExtraParameters(Type wrappedType, ResolutionContext resolutionContext, Type[] args)
        {
            var length     = args.Length - 1;
            var parameters = new ParameterExpression[length];

            if (length <= 0)
            {
                return(parameters);
            }

            for (var i = 0; i < length; i++)
            {
                var argType   = args[i];
                var argName   = wrappedType.Name + argType.Name + i;
                var parameter = argType.AsParameter(argName);
                parameters[i] = parameter;
            }

            resolutionContext.AddParameterExpressions(wrappedType, parameters);
            return(parameters);
        }