Beispiel #1
0
        public void WriteObject(object obj)
        {
            SmartSerializer serializer = new SmartSerializer();

            byte[] serialized = serializer.Serialize(obj);
            WriteInteger(serialized.Length);
            WriteBytes(serialized);
        }
Beispiel #2
0
        public object ReadObject()
        {
            SmartSerializer serializer = new SmartSerializer();

            return(serializer.Deserialize(ReadBytes(ReadInteger())));
        }