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

CreateSurface() публичный Метод

Provides the surface of this function if it has been statically defined
public CreateSurface ( DataDictionary.Interpreter.InterpretationContext context, Utils.Parameter xParam, Utils.Parameter yParam, ExplanationPart explain ) : Surface
context DataDictionary.Interpreter.InterpretationContext the context used to create the surface
xParam Utils.Parameter The X axis of this surface
yParam Utils.Parameter The Y axis of this surface
explain ExplanationPart
Результат Surface
        public override Surface CreateSurface(InterpretationContext context, Parameter xParam, Parameter yParam,
            ExplanationPart explain)
        {
            Surface retVal = base.CreateSurface(context, xParam, yParam, explain);

            Function function = GetFunction(context, explain);
            Cast cast = function as Cast;
            if (cast != null)
            {
                // In case of cast, just take the surface of the enclosed expression
                Expression actual = ActualParameters[0];
                retVal = actual.CreateSurface(context, xParam, yParam, explain);
            }
            else
            {
                if (function == null)
                {
                    function = Called.GetCalled(context, explain) as Function;
                }

                if (function != null)
                {
                    Parameter xAxis;
                    Parameter yAxis;
                    SelectXandYAxis(xParam, yParam, function, out xAxis, out yAxis);
                    if (xAxis != null || yAxis != null)
                    {
                        int token = context.LocalScope.PushContext();
                        function.AssignParameters(context, AssignParameterValues(context, function, true, explain));
                        retVal = function.CreateSurfaceForParameters(context, xAxis, yAxis, explain);
                        context.LocalScope.PopContext(token);
                    }
                    else
                    {
                        IValue value = GetValue(context, explain);
                        if (value != null)
                        {
                            retVal = Surface.createSurface(value, xParam, yParam);
                        }
                        else
                        {
                            throw new Exception("Cannot create surface for expression");
                        }
                    }
                }
                else
                {
                    AddError("Cannot determine called function", RuleChecksEnum.SemanticAnalysisError);
                }
            }
            retVal.XParameter = xParam;
            retVal.YParameter = yParam;

            return retVal;
        }