Ejemplo n.º 1
0
        private ABCFile.Instance readInstance()
        {
            var r = new ABCFile.Instance();

            r.name      = readU30();
            r.superName = readU30();
            r.flags     = (InstanceFlags)readU8();
            if ((r.flags & InstanceFlags.ProtectedNs) != 0)
            {
                r.protectedNs = readU30();
            }
            r.interfaces = new uint[readU30()];
            for (int i = 0; i < r.interfaces.Length; i++)
            {
                r.interfaces[i] = readU30();
            }
            r.iinit  = readU30();
            r.traits = new ABCFile.TraitsInfo[readU30()];
            for (int i = 0; i < r.traits.Length; i++)
            {
                r.traits[i] = readTrait();
            }

            return(r);
        }
Ejemplo n.º 2
0
 private void writeInstance(ABCFile.Instance v)
 {
     writeU30(v.name);
     writeU30(v.superName);
     writeU8((byte)v.flags);
     if ((v.flags & InstanceFlags.ProtectedNs) != 0)
     {
         writeU30(v.protectedNs);
     }
     writeU30((uint)v.interfaces.Length);
     foreach (var value in v.interfaces)
     {
         writeU30(value);
     }
     writeU30(v.iinit);
     writeU30((uint)v.traits.Length);
     foreach (var value in v.traits)
     {
         writeTrait(value);
     }
 }