Exemple #1
0
 public IEnumerable <ASMultiname> GetInterfaces()
 {
     for (int i = 0; i < InterfaceIndices.Count; i++)
     {
         int         interfaceIndex = InterfaceIndices[i];
         ASMultiname @interface     = ABC.Pool.Multinames[interfaceIndex];
         yield return(@interface);
     }
 }
Exemple #2
0
 public IEnumerable <ASMultiname> GetTypes()
 {
     for (int i = 0; i < TypeIndices.Count; i++)
     {
         int         typeIndex = TypeIndices[i];
         ASMultiname type      = Pool.Multinames[typeIndex];
         yield return(type);
     }
 }
Exemple #3
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);
        }