コード例 #1
0
        public void RemoveAll(Func <XLRow, Boolean> predicate)
        {
            foreach (var row in _dictionary.Values.Where(predicate).Where(row1 => !Deleted.ContainsKey(row1.RowNumber())))
            {
                Deleted.Add(row.RowNumber(), row);
            }

            _dictionary.RemoveAll(predicate);
        }
コード例 #2
0
        public bool Remove(int key)
        {
            if (!Deleted.ContainsKey(key))
            {
                Deleted.Add(key, _dictionary[key]);
            }

            return(_dictionary.Remove(key));
        }
コード例 #3
0
        public bool Remove(KeyValuePair <int, XLRow> item)
        {
            if (!Deleted.ContainsKey(item.Key))
            {
                Deleted.Add(item.Key, _dictionary[item.Key]);
            }

            return(_dictionary.Remove(item.Key));
        }
コード例 #4
0
        public void Add(KeyValuePair <int, XLRow> item)
        {
            if (item.Key > MaxRowUsed)
            {
                MaxRowUsed = item.Key;
            }

            if (Deleted.ContainsKey(item.Key))
            {
                Deleted.Remove(item.Key);
            }

            _dictionary.Add(item.Key, item.Value);
        }