Пример #1
0
        public static void Write(Stream stream, Itc itc)
        {
            BinaryMapping.WriteObject <Header>(stream, itc.header);

            for (int i = 0; i < itc.header.ItemsTotal; i++)
            {
                BinaryMapping.WriteObject <ITCData>(stream, itc.AllITC[i]);
            }
        }
Пример #2
0
        public static Itc Read(Stream stream)
        {
            Itc itc = new Itc();

            itc.header = BinaryMapping.ReadObject <Header>(stream);

            itc.AllITC = new List <ITCData>();

            for (int i = 0; i < itc.header.ItemsTotal; i++)
            {
                itc.AllITC.Add(BinaryMapping.ReadObject <ITCData>(stream));
            }

            return(itc);
        }