Exemplo n.º 1
0
        public Present Evaluate(Present[] paramList)
        {
            if (!(paramList[0] is IntParameter))
            {
                return(PresentFailureCode.FailedCast(paramList[0], "FoxitOpenDocument.Evaluate"));
            }

            switch (((IntParameter)paramList[0]).value)
            {
            case 0:
            {
                D.Assert(paramList.Length == 5);
                MapRectangleParameter mapRectangleParameter = (MapRectangleParameter)paramList[1];
                SizeParameter         sizeParameter         = (SizeParameter)paramList[2];
                BoolParameter         boolParameter         = (BoolParameter)paramList[3];
                BoolParameter         boolParameter2        = (BoolParameter)paramList[4];
                return(Render(mapRectangleParameter.value,
                              sizeParameter.value,
                              boolParameter.value,
                              boolParameter2.value));
            }

            case 1:
                D.Assert(paramList.Length == 1);
                return(FetchBounds());

            case 2:
                D.Assert(paramList.Length == 2);
                return(new IntParameter(5));

            case 3:
                D.Assert(paramList.Length == 1);
                if (BuildConfig.theConfig.suppressFoxitMessages)
                {
                    return(new StringParameter(null));
                }

                return(new StringParameter("MapCruncher PDF rendering powered by Foxit Software Company"));

            default:
                return(new PresentFailureCode("Invalid AccessVerb"));
            }
        }
Exemplo n.º 2
0
        public Present Evaluate(Present[] paramList)
        {
            if (!(paramList[0] is IntParameter))
            {
                return(PresentFailureCode.FailedCast(paramList[0], "FoxitOpenDocument.Evaluate"));
            }

            switch (((IntParameter)paramList[0]).value)
            {
            case 0:
            {
                D.Assert(paramList.Length == 5);
                MapRectangleParameter mapRectangleParameter = (MapRectangleParameter)paramList[1];
                SizeParameter         sizeParameter         = (SizeParameter)paramList[2];
                BoolParameter         boolParameter         = (BoolParameter)paramList[3];
                BoolParameter         boolParameter2        = (BoolParameter)paramList[4];
                return(Render(mapRectangleParameter.value,
                              sizeParameter.value,
                              boolParameter.value,
                              boolParameter2.value));
            }

            case 1:
                D.Assert(paramList.Length == 1);
                return(FetchBounds());

            case 2:
            {
                D.Assert(paramList.Length == 2);
                SizeParameter sizeParameter2 = (SizeParameter)paramList[1];
                return(ImageDetail(sizeParameter2.value));
            }

            case 3:
                D.Assert(paramList.Length == 1);
                return(new StringParameter(null));

            default:
                return(new PresentFailureCode("Invalid AccessVerb"));
            }
        }