DataDictionary.Interpreter.BinaryExpression.createGraphForUnbound C# (CSharp) Method

createGraphForUnbound() private method

Creates the graph for the unbound parameters provided
private createGraphForUnbound ( DataDictionary.Interpreter.InterpretationContext context, Expression expression, DataDictionary.Functions.Function function, List unbound, ExplanationPart explain ) : Graph
context DataDictionary.Interpreter.InterpretationContext
expression Expression
function DataDictionary.Functions.Function
unbound List
explain ExplanationPart
return Graph
        private Graph createGraphForUnbound(InterpretationContext context, Expression expression, Function function,
            List<Parameter> unbound, ExplanationPart explain)
        {
            Graph retVal;

            if (unbound.Count == 0)
            {
                if (function != null && function.FormalParameters.Count > 0)
                {
                    retVal = function.CreateGraph(context, (Parameter) function.FormalParameters[0], explain);
                }
                else
                {
                    retVal = Graph.createGraph(expression.GetValue(context, explain), null, explain);
                }
            }
            else
            {
                if (function == null)
                {
                    retVal = expression.CreateGraph(context, unbound[0], explain);
                }
                else
                {
                    retVal = function.CreateGraph(context, unbound[0], explain);
                }
            }

            return retVal;
        }