Exemplo n.º 1
0
        // Methods to write Binary Serialization Record onto the stream, a record is composed of primitive types

        internal void WriteSerializationHeader(int topId, int headerId, int minorVersion, int majorVersion)
        {
            SerializationHeaderRecord record = new SerializationHeaderRecord(BinaryHeaderEnum.SerializedStreamHeader, topId, headerId, minorVersion, majorVersion);

            record.Dump();
            record.Write(this);
        }
Exemplo n.º 2
0
        // Binary Stream Record Reads
        internal void ReadSerializationHeaderRecord()
        {
            var record = new SerializationHeaderRecord();

            record.Read(this);
            _topId    = (record._topId > 0 ? _objectReader.GetId(record._topId) : record._topId);
            _headerId = (record._headerId > 0 ? _objectReader.GetId(record._headerId) : record._headerId);
        }
Exemplo n.º 3
0
        internal void ReadSerializationHeaderRecord()
        {
            SerializationHeaderRecord serializationHeaderRecord = new SerializationHeaderRecord();

            serializationHeaderRecord.Read(this);
            serializationHeaderRecord.Dump();
            this.topId    = serializationHeaderRecord.topId > 0 ? this.objectReader.GetId((long)serializationHeaderRecord.topId) : (long)serializationHeaderRecord.topId;
            this.headerId = serializationHeaderRecord.headerId > 0 ? this.objectReader.GetId((long)serializationHeaderRecord.headerId) : (long)serializationHeaderRecord.headerId;
        }
        internal void ReadSerializationHeaderRecord()
        {
            SerializationHeaderRecord record = new SerializationHeaderRecord();

            record.Read(this);
            record.Dump();
            this.topId    = (record.topId > 0) ? this.objectReader.GetId((long)record.topId) : ((long)record.topId);
            this.headerId = (record.headerId > 0) ? this.objectReader.GetId((long)record.headerId) : ((long)record.headerId);
        }
Exemplo n.º 5
0
        // Binary Stream Record Reads
        internal void ReadSerializationHeaderRecord()
        {
            SerTrace.Log(this, "ReadSerializationHeaderRecord");
            SerializationHeaderRecord record = new SerializationHeaderRecord();

            record.Read(this);
            record.Dump();
            this.topId    = (record.topId > 0 ? objectReader.GetId(record.topId) : record.topId);
            this.headerId = (record.headerId > 0 ? objectReader.GetId(record.headerId) : record.headerId);
        }
Exemplo n.º 6
0
 public void Read(__BinaryParser input)
 {
     byte[] buffer = input.ReadBytes(17);
     if (buffer.Length < 17)
     {
         __Error.EndOfFile();
     }
     this.majorVersion = SerializationHeaderRecord.GetInt32(buffer, 9);
     if (this.majorVersion > this.binaryFormatterMajorVersion)
     {
         throw new SerializationException(Environment.GetResourceString("Serialization_InvalidFormat", (object)BitConverter.ToString(buffer)));
     }
     this.binaryHeaderEnum = (BinaryHeaderEnum)buffer[0];
     this.topId            = SerializationHeaderRecord.GetInt32(buffer, 1);
     this.headerId         = SerializationHeaderRecord.GetInt32(buffer, 5);
     this.minorVersion     = SerializationHeaderRecord.GetInt32(buffer, 13);
 }
Exemplo n.º 7
0
 // Binary Stream Record Reads
 internal void ReadSerializationHeaderRecord()
 {
     var record = new SerializationHeaderRecord();
     record.Read(this);
     _topId = (record._topId > 0 ? _objectReader.GetId(record._topId) : record._topId);
     _headerId = (record._headerId > 0 ? _objectReader.GetId(record._headerId) : record._headerId);
 }
Exemplo n.º 8
0
 [System.Security.SecurityCritical]  // auto-generated
 internal void ReadSerializationHeaderRecord()
 {
     SerTrace.Log( this, "ReadSerializationHeaderRecord");
     SerializationHeaderRecord record = new SerializationHeaderRecord();
         record.Read(this);
         record.Dump();
      this.topId = (record.topId > 0 ? objectReader.GetId(record.topId) : record.topId);
      this.headerId = (record.headerId > 0 ? objectReader.GetId(record.headerId) : record.headerId);
 }
Exemplo n.º 9
0
        // Methods to write Binary Serialization Record onto the stream, a record is composed of primitive types

        internal void WriteSerializationHeader(int topId, int headerId, int minorVersion, int majorVersion) 
        {
            SerializationHeaderRecord record = new SerializationHeaderRecord(BinaryHeaderEnum.SerializedStreamHeader, topId, headerId, minorVersion, majorVersion); 
            record.Dump(); 
            record.Write(this);
        } 
 internal void ReadSerializationHeaderRecord()
 {
     SerializationHeaderRecord record = new SerializationHeaderRecord();
     record.Read(this);
     record.Dump();
     this.topId = (record.topId > 0) ? this.objectReader.GetId((long) record.topId) : ((long) record.topId);
     this.headerId = (record.headerId > 0) ? this.objectReader.GetId((long) record.headerId) : ((long) record.headerId);
 }