Ejemplo n.º 1
0
 private void WriteNamespaceSet(AsNamespaceSetInfo nss)
 {
     WriteMutipleU30(nss.Namespaces);
 }
Ejemplo n.º 2
0
 private void WriteNamespaceSet(AsNamespaceSetInfo nss)
 {
     WriteMutipleU30(nss.Namespaces);
 }
Ejemplo n.º 3
0
        public AsConstantPoolInfo ReadConstantPool()
        {
            var res = new AsConstantPoolInfo();

            var resIntegers = new int[Math.Max(ReadU30(), 1)];

            for (var i = 1; i < resIntegers.Length; i++)
            {
                resIntegers[i] = ReadS32();
            }

            var resUnsignedIntegers = new uint[Math.Max(ReadU30(), 1)];

            for (var i = 1; i < resUnsignedIntegers.Length; i++)
            {
                resUnsignedIntegers[i] = ReadU32();
            }

            var resDoubles = new double[Math.Max(ReadU30(), 1)];

            resDoubles[0] = double.NaN;
            for (var i = 1; i < resDoubles.Length; i++)
            {
                resDoubles[i] = ReadD64();
            }

            var resStrings = new string[Math.Max(ReadU30(), 1)];

            resStrings[0] = string.Empty;
            for (var i = 1; i < resStrings.Length; i++)
            {
                resStrings[i] = ReadString();
            }

            var resNamespaces = new AsNamespaceInfo[Math.Max(ReadU30(), 1)];

            for (var i = 1; i < resNamespaces.Length; i++)
            {
                resNamespaces[i] = ReadNamespace();
            }

            var resNamespaceSets = new AsNamespaceSetInfo[Math.Max(ReadU30(), 1)];

            for (var i = 1; i < resNamespaceSets.Length; i++)
            {
                resNamespaceSets[i] = ReadNamespaceSet();
            }

            var resMultinames = new AsMultinameInfo[Math.Max(ReadU30(), 1)];

            for (var i = 1; i < resMultinames.Length; i++)
            {
                resMultinames[i] = ReadMultiname();
            }

            res.Integers         = resIntegers.ToList();
            res.UnsignedIntegers = resUnsignedIntegers.ToList();
            res.Doubles          = resDoubles.ToList();
            res.Strings          = resStrings.ToList();
            res.Namespaces       = resNamespaces.ToList();
            res.NamespaceSets    = resNamespaceSets.ToList();
            res.Multinames       = resMultinames.ToList();

            return(res);
        }