예제 #1
0
        public ASInstance(ABCFile abc, FlashReader reader)
            : this(abc)
        {
            TypeIndex      = reader.Read7BitEncodedInt();
            SuperTypeIndex = reader.Read7BitEncodedInt();
            ClassInfo      = (ClassFlags)reader.ReadByte();

            if ((ClassInfo & ClassFlags.ProtectedNamespace) != 0)
            {
                ProtectedNamespaceIndex = reader.Read7BitEncodedInt();
            }

            InterfaceIndices.Capacity = reader.Read7BitEncodedInt();
            for (int i = 0; i < InterfaceIndices.Capacity; i++)
            {
                InterfaceIndices.Add(reader.Read7BitEncodedInt());
            }

            ConstructorIndex = reader.Read7BitEncodedInt();
            if (Constructor != null)
            {
                Constructor.IsConstructor = true;
            }

            Traits.Capacity = reader.Read7BitEncodedInt();
            for (int i = 0; i < Traits.Capacity; i++)
            {
                Traits.Add(new ASTrait(abc, reader));
            }
        }
예제 #2
0
        public ASInstance(ABCFile abc, FlashReader input)
            : this(abc)
        {
            QNameIndex = input.ReadInt30();
            SuperIndex = input.ReadInt30();
            Flags      = (ClassFlags)input.ReadByte();

            if (Flags.HasFlag(ClassFlags.ProtectedNamespace))
            {
                ProtectedNamespaceIndex = input.ReadInt30();
            }

            InterfaceIndices.Capacity = input.ReadInt30();
            for (int i = 0; i < InterfaceIndices.Capacity; i++)
            {
                int interfaceIndex = input.ReadInt30();
                InterfaceIndices.Add(interfaceIndex);
            }

            ConstructorIndex          = input.ReadInt30();
            Constructor.IsConstructor = true;
            Constructor.Container     = this;

            PopulateTraits(input);
        }