public static void WriteAll(BinaryWriter writer, SectionSet sections) { foreach (Section section in sections) { Write(writer, section); } }
public static SectionSet ReadAll(BinaryReader reader) { SectionSet sections = new SectionSet(); while (reader.BaseStream.Position < reader.BaseStream.Length) { Section section = Read(reader); sections.Add(section); if (section.GetType() == typeof(GENEEOF)) { break; } } return(sections); }
public static void WriteAll(Stream stream, SectionSet sections) { WriteAll(new BinaryWriter(stream), sections); }