Exemplo n.º 1
0
        /// <summary>
        /// Converts the data of this object into a byte array.
        /// </summary>
        /// <returns></returns>
        public void GetByteData(BinaryWriter writer)
        {
            ByteFunctions.WriteFixedString(writer, mMetaStreamVersion); //Meta Stream Keyword [4 bytes]
            writer.Write(mDefaultSectionChunkSize);                     //Default Section Chunk Size [4 bytes] default section chunk size
            writer.Write(mDebugSectionChunkSize);                       //Debug Section Chunk Size [4 bytes] debug section chunk size (always zero)
            writer.Write(mAsyncSectionChunkSize);                       //Async Section Chunk Size [4 bytes] async section chunk size (size of the bytes after the file header)
            writer.Write(mClassNamesLength);                            //mClassNamesLength [4 bytes]

            //--------------------------mClassNames--------------------------
            for (int i = 0; i < mClassNames.Length; i++)
            {
                writer.Write(mClassNames[i].mTypeNameCRC.mCrc64); //symbol
                writer.Write(mClassNames[i].mVersionCRC);         //version crc
            }
        }
        /// <summary>
        /// Converts the data of this object into a byte array.
        /// </summary>
        /// <returns></returns>
        public void GetByteData(BinaryWriter writer)
        {
            ByteFunctions.WriteFixedString(writer, mMetaStreamVersion); //Meta Stream Keyword [4 bytes]
            writer.Write(mClassNamesLength);                            //mClassNamesLength [4 bytes]

            //--------------------------mClassNames--------------------------
            for (int i = 0; i < mClassNames.Length; i++)
            {
                //symbol
                writer.Write(mClassNames[i].mTypeNameCRC.mCrc64);

                //version crc
                writer.Write(mClassNames[i].mVersionCRC);
            }
        }