/// <inheritdoc /> protected override void Cleanup() { Elements.Values.ForEach(e => e.Dispose()); Elements.Clear(); ElementsSCA.Clear(); ContentsSCA.Clear(); }
/// <inheritdoc /> protected override void Cleanup() { IEnumerableEx.ForEach(Elements.Values, e => e.Dispose()); Elements.Clear(); ElementsSCA.Clear(); ContentsSCA.Clear(); }
protected override void CommitFromMemory() { Dictionary <int, InfContentsElem> cttElems = new Dictionary <int, InfContentsElem>(); Dictionary <int, InfElementsElemContainer> elElems = new Dictionary <int, InfElementsElemContainer>(); foreach (SegmentStream cttStream in ContentsSCA.GetStreams()) { StreamToStruct <InfContentsElem, InfContentsElem>( cttStream, InfContentsElem.SizeOfContentsElem, e => e, cttElems ); } foreach (SegmentStream elStream in ElementsSCA.GetStreams()) { StreamToStruct <InfElementsElemContainer, InfElementsElem>( elStream, InfElementsElem.SizeOfElementsElem, e => new InfElementsElemContainer(e), elElems ); } foreach (int id in cttElems.Keys) { Commit(id, cttElems.SafeGet(id), null); } foreach (int id in elElems.Keys) { Commit(id, null, elElems.SafeGet(id)); } }