Exemple #1
0
        /// <summary>
        /// Calculate formula
        /// </summary>
        /// <exception cref="VariableNotFoundException"></exception>
        /// <exception cref="InvalidCastException"></exception>
        /// <exception cref="ExtraTypeNoFreeIdException"></exception>
        /// <exception cref="ExtraTypeIdNotFoundException"></exception>
        public double CalcNumber(string formula, IVariablesContainer variables)
        {
            var formulaNodes = _formulaCache.GetFormulaNodes(formula);
            var wrapper      = VariablesSource.Create(variables);

            return(OnCalcNumber(formulaNodes.Nodes, wrapper));
        }