DevTreks.Extensions/Jace/CalculationEngine.cs
/// <summary>
/// Build a .NET func for the provided formula.
/// </summary>
/// <param name="formulaText">The formula that must be converted into a .NET func.</param>
/// <returns>A .NET func for the provided formula.</returns>
Build a .NET func for the provided formula.
Build a . NET func for the provided formula .
public Func<Dictionary<string, double>, double> Build(string formulaText)
        {
            if (string.IsNullOrEmpty(formulaText))
                throw new ArgumentNullException("formulaText");
            if (IsInFormulaCache(formulaText))
            {
                return executionFormulaCache[formulaText];
            }
            else
            {
                Operation operation = BuildAbstractSyntaxTree(formulaText);
                return BuildFormula(formulaText, operation);
            }
        }
public Func < Dictionary < string , double > , double > Build ( string formulaText ) { if ( string . IsNullOrEmpty ( formulaText ) ) throw new ArgumentNullException ( " " ) ; if ( IsInFormulaCache ( formulaText ) ) { return executionFormulaCache [ formulaText ] ; } else { Operation operation = BuildAbstractSyntaxTree ( formulaText ) ; return BuildFormula ( formulaText , operation ) ; } }
Build a .NET func for the provided formula.
Build a . NET func for the provided formula .
A .NET func for the provided formula.
A . NET func for the provided formula .
formulaText
string
The formula that must be converted into a .NET func.
The formula that must be converted into a . NET func .