예제 #1
0
파일: Tally.cs 프로젝트: zxcvas/ClosedXML
 public double Count(bool numbersOnly)
 {
     if (numbersOnly)
     {
         return(NumericValues().Count());
     }
     else
     {
         return(_list.Where(o => !Statistical.IsBlank(o)).Count());
     }
 }
예제 #2
0
        // build/get static keyword table
        Dictionary <string, FunctionDefinition> GetFunctionTable()
        {
            if (_fnTbl == null)
            {
                // create table
                _fnTbl = new Dictionary <string, FunctionDefinition>(StringComparer.InvariantCultureIgnoreCase);

                // register built-in functions (and constants)
                Logical.Register(this);
                MathTrig.Register(this);
                Text.Register(this);
                Statistical.Register(this);
                DateAndTime.Register(this);
            }
            return(_fnTbl);
        }