private ICallable CreateSurfaceResult(InterpretationContext context, Function leftFunction,
List<Parameter> unboundLeft, Function rightFunction, List<Parameter> unboundRight, ExplanationPart explain)
{
ICallable retVal = null;
Surface leftSurface = CreateSurfaceForUnbound(context, Left, leftFunction, unboundLeft, explain);
if (leftSurface != null)
{
Surface rightSurface = CreateSurfaceForUnbound(context, Right, rightFunction, unboundRight, explain);
if (rightSurface != null)
{
retVal = CombineSurface(leftSurface, rightSurface).Function;
}
else
{
AddError("Cannot create surface for " + Right, RuleChecksEnum.ExecutionFailed);
}
}
else
{
AddError("Cannot create surface for " + Left, RuleChecksEnum.ExecutionFailed);
}
return retVal;
}