private void Dispose(bool disposing) { if (disposing) { Header.GetEnumerator().Dispose(); Elements.GetEnumerator().Dispose(); Footer.GetEnumerator().Dispose(); Separator = default(T); } }
/// <summary> /// Inserts the <paramref name="collection"/> into the <see cref="Footer"/> <see cref="Stack"/>. /// </summary> /// <param name="collection"></param> public void InsertFooter(IEnumerable <T> collection) { Footer?.GetEnumerator().Dispose(); Footer = null; Footer = new Stack <T>(collection); }