コード例 #1
0
ファイル: CvSymbol.cs プロジェクト: rtownsend/MOSA-Project
        /// <summary>
        /// Reads the specified reader.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public static CvSymbol Read(BinaryReader reader)
        {
            CvSymbol result;
            ushort len = reader.ReadUInt16();
            CvEntryType type = (CvEntryType)reader.ReadUInt16();

            switch (type)
            {
                case CvEntryType.PublicSymbol3:
                    result = new CvPublicSymbol3(len, type, reader);
                    break;

                case CvEntryType.PublicFunction13:
                    result = new CvFunctionSymbol3(len, type, reader);
                    break;

                default:
                    result = new CvSymbol(len, type);
                    break;
            }

            return result;
        }
コード例 #2
0
        /// <summary>
        /// Reads the specified reader.
        /// </summary>
        /// <param name="reader">The reader.</param>
        public static CvSymbol Read(BinaryReader reader)
        {
            CvSymbol    result;
            ushort      len  = reader.ReadUInt16();
            CvEntryType type = (CvEntryType)reader.ReadUInt16();

            switch (type)
            {
            case CvEntryType.PublicSymbol3:
                result = new CvPublicSymbol3(len, type, reader);
                break;

            case CvEntryType.PublicFunction13:
                result = new CvFunctionSymbol3(len, type, reader);
                break;

            default:
                result = new CvSymbol(len, type);
                break;
            }

            return(result);
        }