Esempio n. 1
0
        public object Deserialize(BinaryReader reader)
        {
            int            id             = (int)reader.ReadByte();
            ObjectStreamer objectStreamer = this.streamerByTypeId[id];

            return(objectStreamer.Read(reader));
        }
Esempio n. 2
0
        public virtual object GetObject()
        {
            if (this.obj != null)
            {
                return(this.obj);
            }
            if (this.objLength == -1)
            {
                return(null);
            }
            MemoryStream   input          = new MemoryStream(this.ReadObjectData());
            BinaryReader   reader         = new BinaryReader(input);
            ObjectStreamer objectStreamer = this.file.streamerManager.streamerByTypeId[(int)this.typeId];

            this.obj = objectStreamer.Read(reader);
            if (this.typeId == 101)
            {
                ((DataSeries)this.obj).Init(this.file, this);
            }
            return(this.obj);
        }