Ejemplo n.º 1
0
 private void Load()
 {
     if (_rows != null)
     {
         return;
     }
     loader(path, b =>
     {
         if (b != null)
         {
             SpreadSheet ss  = new SpreadSheet(b);
             ss.allowNullRow = allowNullRow;
             ss.trimSpace    = trimSpace;
             if (_rows == null)
             {
                 _rows = ss.GetRows <R>(1);
             }
             else
             {
                 _rows.AddRange(ss.GetRows <R>(1));
             }
             _indexer = _rows.ToDictionary(GetKey);
             for (int i = 0; i < _rows.Count; ++i)
             {
                 ProcessRow(i + 1, _rows[i]);
             }
         }
         else
         {
             log.Warn("Can't access {0}", path);
         }
     });
 }