Exemple #1
0
        public void ReadWriteFixedString512()
        {
            var dataStream = new DataStreamWriter(300 * 4, Allocator.Temp);

            var src = new FixedString512("This is a string");

            dataStream.WriteFixedString512(src);

            //Assert.AreEqual(src.LengthInBytes+2, dataStream.Length);

            var reader = new DataStreamReader(dataStream.AsNativeArray());
            var dst    = reader.ReadFixedString512();

            Assert.AreEqual(src, dst);
        }
 public override void Deserialize(DataStreamReader reader)
 {
     MessageContent = reader.ReadFixedString512().ToString();
 }