Esempio n. 1
0
        public static ExpressionEvalConfig BuildConfig(DecimalAndFunctionSeparators doubleDecimalSeparator)
        {
            // build and set operators
            ExprOperatorBuilder operatorsBuilder = new ExprOperatorBuilder();

            ExpressionEvalConfig exprEvalConfig = new ExpressionEvalConfig();

            exprEvalConfig.SetLang(Language.En);
            exprEvalConfig.SetDecimalAndFunctionSeparators(doubleDecimalSeparator);
            operatorsBuilder.BuildOperators(exprEvalConfig);
            return(exprEvalConfig);
        }
        public void SetDecimalAndFunctionSeparators(DecimalAndFunctionSeparators doubleDecimalSeparator)
        {
            DecimalAndFunctionSeparators = doubleDecimalSeparator;

            ListSeparatorSpecial = _listSeparatorSpecialBase;

            // adds the function call parameter separator
            if (DecimalAndFunctionSeparators == DecimalAndFunctionSeparators.Standard)
            {
                // exp: fct(a,b)
                // dot is the double decimal separator, exp 12.34 -> not placed in this list!
                ListSeparatorSpecial += ",";
            }
            else
            {
                // exp: fct(a;b)
                ListSeparatorSpecial += ";";
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Concerns both objects: double decimal separator
 /// and function call parameters separator
 /// 2 cases:
 ///  -Standard: décimal separator is dot and parameters separator is comma.
 ///     exp: 12.45     fct(a,b)
 ///
 ///  -ExcelLike: décimal separator is comma and parameters separator is double-comma.
 ///     exp: 12,45     fct(a;b)
 ///
 /// </summary>
 public void SetDecimalAndFunctionSeparators(DecimalAndFunctionSeparators doubleDecimalSeparator)
 {
     _exprEvalConfig.SetDecimalAndFunctionSeparators(doubleDecimalSeparator);
 }