public AbstractFormulas(SpreadsheetVisitor visitor)
        {
            Visitor = visitor;

            //Register all AbstractFormula derivates
            //TODO: Slow in practice (?), and only needs to be calculated once (list doesnt change)!
            var AbstractFunctionFormulaTypes = ReflectiveEnumerator.GetEnumerableOfType <AbstractFormula>();

            foreach (var tp in AbstractFunctionFormulaTypes)
            {
                Register(tp.GetType(), tp.ExpressionType);
            }
        }
Exemple #2
0
        public static void Init()
        {
            if (initialized)
            {
                return;
            }

            initialized = true;

            //TODO: Slow in practice (?), and only needs to be calculated once (list doesnt change)!
            var AbstractFunctionFormulaTypes = ReflectiveEnumerator.GetEnumerableOfType <AbstractFunctionFormula>();

            foreach (var tp in AbstractFunctionFormulaTypes)
            {
                Register(tp.GetType(), tp.FunctionType);
            }
        }