Пример #1
0
 /// <summary>
 /// Override to deserialize the object from the GFF file's binary data.
 /// </summary>
 /// <param name="rawField">The raw field from the GFF</param>
 /// <param name="rawData">The GFF's raw file data</param>
 void IGffFieldSerialize.Deserialize(RawGffData.RawGffField rawField, RawGffData rawData)
 {
     Value = BitConverter.ToUInt64(rawData.GetComplexDataBuffer(),
         (int) rawField.DataOrDataOffset);
 }
Пример #2
0
        /// <summary>
        /// Override to deserialize the object from the GFF file's binary data.
        /// </summary>
        /// <param name="rawField">The raw field from the GFF</param>
        /// <param name="rawData">The GFF's raw file data</param>
        void IGffFieldSerialize.Deserialize(RawGffData.RawGffField rawField, RawGffData rawData)
        {
            // Determine the length of the bob.
            byte[] complexData = rawData.GetComplexDataBuffer();
            uint length = BitConverter.ToUInt32(complexData, (int) rawField.DataOrDataOffset);

            // Copy the data from the complex data byte array to a local byte array.
            byte[] bytes = new Byte[length];
            for (int i = 0; i < length; i++)
                bytes[i] = complexData[rawField.DataOrDataOffset + 4 + i];

            // Save the data in a memory stream.
            Value = new MemoryStream(bytes, 0, bytes.Length, true, true);
        }
Пример #3
0
 /// <summary>
 /// Override to deserialize the object from the GFF file's binary data.
 /// </summary>
 /// <param name="rawField">The raw field from the GFF</param>
 /// <param name="rawData">The GFF's raw file data</param>
 void IGffFieldSerialize.Deserialize(RawGffData.RawGffField rawField, RawGffData rawData)
 {
     byte[] bytes = rawData.GetComplexDataBuffer();
     uint length = BitConverter.ToUInt32(bytes, (int) rawField.DataOrDataOffset);
     Value = RawGffData.DeserializeString(bytes,
         (int) rawField.DataOrDataOffset + 4, (int) length);
 }
Пример #4
0
 /// <summary>
 /// Override to deserialize the object from the GFF file's binary data.
 /// </summary>
 /// <param name="rawField">The raw field from the GFF</param>
 /// <param name="rawData">The GFF's raw file data</param>
 void IGffFieldSerialize.Deserialize(RawGffData.RawGffField rawField, RawGffData rawData)
 {
     byte[] bytes = rawData.GetComplexDataBuffer();
     byte length = bytes[rawField.DataOrDataOffset];
     Value = RawGffData.DeserializeString(bytes,
         (int) rawField.DataOrDataOffset + 1, (int) length);
 }
Пример #5
0
 /// <summary>
 /// Override to deserialize the object from the GFF file's binary data.
 /// </summary>
 /// <param name="rawField">The raw field from the GFF</param>
 /// <param name="rawData">The GFF's raw file data</param>
 void IGffFieldSerialize.Deserialize(RawGffData.RawGffField rawField, RawGffData rawData)
 {
     Value = new ExoLocString(rawData.GetComplexDataBuffer(),
         (int) rawField.DataOrDataOffset);
 }