예제 #1
0
        /// <summary>
        /// 反序列化
        /// </summary>
        /// <param name="serializationStream"></param>
        /// <returns></returns>
        public object Deserialize(Stream serializationStream)
        {
            LibSerializationInfo sInfo       = new LibSerializationInfo(serializationStream);
            ILibSerializable     deserialize = sInfo.GetObject();

            deserialize.ReadObjectData(sInfo);
            return(deserialize);
        }
예제 #2
0
        public object ReadObject()
        {
            Type             t           = ReadType();
            object           obj         = Activator.CreateInstance(t);
            ILibSerializable deserialize = (ILibSerializable)obj;

            deserialize.ReadObjectData(this);
            return(deserialize);
        }