Ejemplo n.º 1
0
 public void Write(Stream stream)
 {
     using (BionWriter writer = new BionWriter(stream))
     {
         Write(writer);
     }
 }
Ejemplo n.º 2
0
        public void Write(BionWriter writer)
        {
            writer.WriteStartArray();

            long lastEndPosition = 0;

            foreach (ContainerEntry entry in _index)
            {
                writer.WriteValue(entry.EndByteOffset - lastEndPosition);
                writer.WriteValue(entry.ByteLength);

                lastEndPosition = entry.EndByteOffset;
            }

            writer.WriteEndArray();
        }