private FunctionCompiler GetCompilerByType(ExcelFunction function)
        {
            var funcType = function.GetType();

            if (_specialCompilers.ContainsKey(funcType))
            {
                return(_specialCompilers[funcType]);
            }
            return(new DefaultCompiler(function, _context));
        }
示例#2
0
        private FunctionCompiler GetCompilerByType(ExcelFunction function)
        {
            var funcType = function.GetType();

            if (_specialCompilers.ContainsKey(funcType))
            {
                return(_specialCompilers[funcType]);
            }
            else if (function.IsLookupFuction)
            {
                return(new LookupFunctionCompiler(function, _context));
            }
            else if (function.IsErrorHandlingFunction)
            {
                return(new ErrorHandlingFunctionCompiler(function, _context));
            }
            return(new DefaultCompiler(function, _context));
        }