示例#1
0
        public object Deserialize(Type type)
        {
            bool   success;
            object ret = tr.Read(br, type, out success);

            if (!success)
            {
                if (type.IsValueType)
                {
                    int    count = br.ReadInt32();
                    byte[] data  = br.ReadBytes(count);
                    ret = Deserialize(data, type);
                }
                else
                {
                    throw new RawSerializerException("Cannot deserialize " + type.AssemblyQualifiedName);
                }
            }

            return(ret);
        }