private ICallable CreateGraphResult(InterpretationContext context, Function leftFunction,
List<Parameter> unboundLeft, Function rightFunction, List<Parameter> unboundRight, ExplanationPart explain)
{
ICallable retVal = null;
Graph leftGraph = createGraphForUnbound(context, Left, leftFunction, unboundLeft, explain);
if (leftGraph != null)
{
Graph rightGraph = createGraphForUnbound(context, Right, rightFunction, unboundRight, explain);
if (rightGraph != null)
{
Graph combinedGraph = CombineGraph(leftGraph, rightGraph) as Graph;
if (combinedGraph != null)
{
retVal = combinedGraph.Function;
}
}
else
{
AddError("Cannot create graph for " + Right, RuleChecksEnum.ExecutionFailed);
}
}
else
{
AddError("Cannot create graph for " + Left, RuleChecksEnum.ExecutionFailed);
}
return retVal;
}