LoadData() public method

public LoadData ( int size ) : bool
size int
return bool
Exemplo n.º 1
0
        public static Header Read(LogFileReader reader)
        {
            if (!reader.LoadData (32))
                return null;

            return new Header (reader);
        }
Exemplo n.º 2
0
        public static BufferHeader Read(LogFileReader reader)
        {
            BufferHeader result;
            long position = reader.Position;

            if (!reader.LoadData (48))
                return null;

            try {
                result = new BufferHeader (reader);
            } catch {
                Console.WriteLine ("Exception reading buffer at position {0}", position);
                throw;
            }

            if (!reader.LoadData (result.Length)) {
                reader.Position = position; // rollback
                return null;
            }

            return result;
        }