public void AddAttribute(CompileAttribute attribute)
        {
            attribute.NameIndex = AddConstantUtf8(attribute.Name);

            Attributes.Add(attribute);
        }
Example #2
0
        private static CompileAttribute[] ReadAttributes(EndianBinaryReader reader, List<CompileConstant> constants)
        {
            short attributeCount = reader.ReadInt16();
            var attributes = new CompileAttribute[attributeCount];

            for (int i = 0; i < attributeCount; i++)
            {
                attributes[i] = CompileAttribute.ReadAttribute(reader, constants);
            }

            return attributes;
        }