Esempio n. 1
0
        public void AddMethod(ASMethod method, string qualifiedName)
        {
            var qname = new ASMultiname(ABC.Pool);

            qname.NameIndex      = ABC.Pool.AddConstant(qualifiedName);
            qname.Kind           = MultinameKind.QName;
            qname.NamespaceIndex = 1; // Public

            int methodIndex = ABC.AddMethod(method);
            int qnameIndex  = ABC.Pool.AddConstant(qname);

            var trait = new ASTrait(ABC);

            trait.Kind        = TraitKind.Method;
            trait.QNameIndex  = qnameIndex;
            trait.MethodIndex = methodIndex;

            method.Trait     = trait;
            method.Container = this;
            Traits.Add(trait);
        }