示例#1
0
        public override void Read(byte[] rpnBytes, int startIndex)
        {
            this.argumentsCount = rpnBytes[startIndex];
            ushort num = BitConverter.ToUInt16(rpnBytes, startIndex + 1);

            this.function = FormulaFunctionsTable.Instance[num];
        }
示例#2
0
        private void AddFunction(ushort code, string name, FormulaTokenCode argumentCode, FormulaTokenClass returnCode, byte argumentsCount)
        {
            FormulaFunctionInfo info = new FormulaFunctionInfo(code, name, argumentCode, returnCode, argumentsCount);

            this.codesToFunctions[code] = (info);
            this.namesToFunctions[name] = (info);
        }
示例#3
0
        private void AddFunctionToken(string functionValue)
        {
            this.isFunctionArgumentsProcessed = true;
            this.lastFunctionInfo             = FormulaFunctionsTable.Instance[functionValue];
            byte argumentsCount = this.ArgumentList();

            this.isFunctionArgumentsProcessed = false;
            this.GetNextOnDemand(')');
            FormulaFunctionInfo info = FormulaFunctionsTable.Instance[functionValue];
            byte num2 = info.ArgumentsCount;

            if (num2 != 255)
            {
                string str = (num2 == 1) ? " argument." : " arguments.";
                if (argumentsCount != num2)
                {
                    this.NotifyError(string.Concat(new object[] { "Function: ", FormulaFunctionsTable.Instance[info.Code].Name, " expects ", num2, str }));
                }
            }
            this.AddToken(FormulaTokensFactory.CreateFunctionFromName(functionValue, this.lastFunctionInfo.ReturnCode, argumentsCount));
        }
示例#4
0
 public override void DelayInitialize(object[] data)
 {
     this.function       = FormulaFunctionsTable.Instance[data[0] as string];
     this.argumentsCount = (byte)(data[1]);
 }
示例#5
0
        public override void Read(byte[] rpnBytes, int startIndex)
        {
            ushort num = BitConverter.ToUInt16(rpnBytes, startIndex);

            this.function = FormulaFunctionsTable.Instance[num];
        }
示例#6
0
 public override void DelayInitialize(object[] data)
 {
     this.function = FormulaFunctionsTable.Instance[data[0] as string];
 }