Пример #1
0
        public NamedEntity Read()
        {
            var entity = new NamedEntity();

            entity.Name = _reader.ReadString();
            entity.Id   = _reader.ReadInt32();
            return(entity);
        }
Пример #2
0
 public void Write(NamedEntity entity)
 {
     _writer.Write(entity.Name);
     _writer.Write(entity.Id);
 }