DataDictionary.Interpreter.Call.CreateParameterAssociation C# (CSharp) Метод

CreateParameterAssociation() приватный Метод

Creates the association between parameter (from the called ICallable) and its associated expression
private CreateParameterAssociation ( ICallable callable ) : Expression>.Dictionary
callable ICallable
Результат Expression>.Dictionary
        private Dictionary<Parameter, Expression> CreateParameterAssociation(ICallable callable)
        {
            Dictionary<Parameter, Expression> retVal = null;

            if (callable != null)
            {
                if (callable.FormalParameters.Count == NamedActualParameters.Count + ActualParameters.Count)
                {
                    retVal = new Dictionary<Parameter, Expression>();

                    int i = 0;
                    foreach (Expression expression in ActualParameters)
                    {
                        Parameter parameter = (Parameter) callable.FormalParameters[i];
                        retVal.Add(parameter, expression);
                        i = i + 1;
                    }

                    foreach (KeyValuePair<Designator, Expression> pair in NamedActualParameters)
                    {
                        Parameter parameter = callable.GetFormalParameter(pair.Key.Image);
                        if (parameter != null)
                        {
                            retVal.Add(parameter, pair.Value);
                        }
                    }
                }
            }

            return retVal;
        }