Ejemplo n.º 1
0
        public CEXTDEFRecord(RecordReader reader, RecordContext context)
            : base(reader, context)
        {
            int startIndex = context.ExternalNames.Count;

            while (!reader.IsEOF)
            {
                UInt16 nameIndex = reader.ReadIndex();
                if (nameIndex == 0 || nameIndex > context.Names.Count)
                {
                    throw new InvalidDataException("LogicalNameIndex is out of range.");
                }
                UInt16 typeIndex = reader.ReadIndex();

                ExternalNameDefinition def = new ExternalNameDefinition();

                def.Name      = context.Names[nameIndex - 1];
                def.TypeIndex = typeIndex;
                def.DefinedBy = reader.RecordNumber;
                context.ExternalNames.Add(def);
            }
            int endIndex = context.ExternalNames.Count;

            this.Definitions = context.ExternalNames.Slice(
                startIndex, endIndex - startIndex);
        }
Ejemplo n.º 2
0
        public EXTDEFRecord(RecordReader reader, RecordContext context)
            : base(reader, context)
        {
            int startIndex = context.ExternalNames.Count;

            while (!reader.IsEOF)
            {
                ExternalNameDefinition def = new ExternalNameDefinition();
                def.Name      = reader.ReadPrefixedString();
                def.TypeIndex = reader.ReadIndex();
                def.DefinedBy = reader.RecordNumber;
                context.ExternalNames.Add(def);
            }
            int endIndex = context.ExternalNames.Count;

            this.Definitions = context.ExternalNames.Slice(
                startIndex, endIndex - startIndex);
        }
Ejemplo n.º 3
0
 public EXTDEFRecord(RecordReader reader, RecordContext context)
     : base(reader, context)
 {
     int startIndex = context.ExternalNames.Count;
     while (!reader.IsEOF)
     {
         ExternalNameDefinition def = new ExternalNameDefinition();
         def.Name = reader.ReadPrefixedString();
         def.TypeIndex = reader.ReadIndex();
         def.DefinedBy = reader.RecordNumber;
         context.ExternalNames.Add(def);
     }
     int endIndex = context.ExternalNames.Count;
     this.Definitions = context.ExternalNames.Slice(
         startIndex, endIndex - startIndex);
 }
Ejemplo n.º 4
0
        public CEXTDEFRecord(RecordReader reader, RecordContext context)
            : base(reader, context)
        {
            int startIndex = context.ExternalNames.Count;
            while (!reader.IsEOF)
            {
                UInt16 nameIndex = reader.ReadIndex();
                if (nameIndex == 0 || nameIndex > context.Names.Count)
                {
                    throw new InvalidDataException("LogicalNameIndex is out of range.");
                }
                UInt16 typeIndex = reader.ReadIndex();

                ExternalNameDefinition def = new ExternalNameDefinition();

                def.Name = context.Names[nameIndex - 1];
                def.TypeIndex = typeIndex;
                def.DefinedBy = reader.RecordNumber;
                context.ExternalNames.Add(def);
            }
            int endIndex = context.ExternalNames.Count;
            this.Definitions = context.ExternalNames.Slice(
                startIndex, endIndex - startIndex);
        }