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

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

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