Пример #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];
 }