Exemple #1
0
 public static SerializedGraph Read(ByteArrayBuffer buffer
     )
 {
     var id = buffer.ReadInt();
     var length = buffer.ReadInt();
     return new SerializedGraph(id, buffer.ReadBytes(length));
 }
Exemple #2
0
        public static SerializedGraph Read(ByteArrayBuffer buffer
                                           )
        {
            var id     = buffer.ReadInt();
            var length = buffer.ReadInt();

            return(new SerializedGraph(id, buffer.ReadBytes(length)));
        }
Exemple #3
0
        private static byte[] BytesToSendFor(string message)
        {
            var io = new LatinStringIO();
            var marshalledStringLength = io.Length(message);
            var buffer = new ByteArrayBuffer(marshalledStringLength + Const4.IntLength);

            buffer.WriteInt(marshalledStringLength);

            io.WriteLengthAndString(buffer, message);
            buffer.Seek(0);
            return(buffer.ReadBytes(buffer.Length()));
        }
Exemple #4
0
 public virtual void ReadBytes(byte[] bytes)
 {
     _current.ReadBytes(bytes);
 }