Ejemplo n.º 1
0
        private void SerializationBytesExTest(bool compressed)
        {
            SerializationFakeClass obj = new SerializationFakeClass();
            obj.FakeInt = 2;
            var bytes = obj.SerializeToBytes(compressed);

            Console.WriteLine("Bytes array length: {0}", bytes.Length);
            Console.WriteLine("Bytes: {0}", bytes);

            SerializationFakeClass outObj;
            typeof(SerializationFakeClass).DeserializeFromBytes(bytes, compressed, out outObj);

            Assert.AreEqual(obj.FakeInt == outObj.FakeInt, true);
        }