/// <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); }
public object ReadObject() { Type t = ReadType(); object obj = Activator.CreateInstance(t); ILibSerializable deserialize = (ILibSerializable)obj; deserialize.ReadObjectData(this); return(deserialize); }