示例#1
0
 public static void WriteAll(BinaryWriter writer, SectionSet sections)
 {
     foreach (Section section in sections)
     {
         Write(writer, section);
     }
 }
示例#2
0
        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);
        }
示例#3
0
 public static void WriteAll(Stream stream, SectionSet sections)
 {
     WriteAll(new BinaryWriter(stream), sections);
 }