System.Data.RecordManager.Clear C# (CSharp) Метод

Clear() приватный Метод

private Clear ( bool clearAll ) : void
clearAll bool
Результат void
        internal void Clear(bool clearAll)
        {
            if (clearAll)
            {
                for (int record = 0; record < _recordCapacity; ++record)
                {
                    _rows[record] = null;
                }
                int count = _table._columnCollection.Count;
                for (int i = 0; i < count; ++i)
                {
                    // this improves performance by caching the column instead of obtaining it for each row
                    DataColumn column = _table._columnCollection[i];
                    for (int record = 0; record < _recordCapacity; ++record)
                    {
                        column.FreeRecord(record);
                    }
                }
                _lastFreeRecord = 0;
                _freeRecordList.Clear();
            }
            else
            { // just clear attached rows
                _freeRecordList.Capacity = _freeRecordList.Count + _table.Rows.Count;
                for (int record = 0; record < _recordCapacity; ++record)
                {
                    if (_rows[record] != null && _rows[record].rowID != -1)
                    {
                        int tempRecord = record;
                        FreeRecord(ref tempRecord);
                    }
                }
            }
        }