internal void EnsureCapacity()
{
if (m_DocumentCount == 0)
{
// First time. Allocate the arrays.
m_Documents = new REDocument[InitialSize];
}
else if (m_DocumentCount == m_Documents.Length)
{
// the arrays are full. Enlarge the arrays
REDocument[] temp = new REDocument [m_DocumentCount * 2];
Array.Copy(m_Documents, temp, m_DocumentCount);
m_Documents = temp;
}
}