Example #1
0
        protected bool ReadArray <T>(BinaryReader stream, ref T[] v, CVSReader.ValueParse <T> parse)
        {
            byte b = stream.ReadByte();

            if (b > 0)
            {
                v = new T[(int)b];
                for (byte b2 = 0; b2 < b; b2 += 1)
                {
                    parse.Read(stream, ref v[(int)b2]);
                }
            }
            else
            {
                v = null;
            }
            return(true);
        }
Example #2
0
 protected bool Read <T>(BinaryReader stream, ref T v, CVSReader.ValueParse <T> parse)
 {
     parse.Read(stream, ref v);
     return(true);
 }