public ASMultiname(ASConstantPool pool, FlashReader input) : this(pool) { Kind = (MultinameKind)input.ReadByte(); switch (Kind) { case MultinameKind.QName: case MultinameKind.QNameA: { NamespaceIndex = input.ReadInt30(); NameIndex = input.ReadInt30(); break; } case MultinameKind.RTQName: case MultinameKind.RTQNameA: { NameIndex = input.ReadInt30(); break; } case MultinameKind.RTQNameL: case MultinameKind.RTQNameLA: { /* No data. */ break; } case MultinameKind.Multiname: case MultinameKind.MultinameA: { NameIndex = input.ReadInt30(); NamespaceSetIndex = input.ReadInt30(); break; } case MultinameKind.MultinameL: case MultinameKind.MultinameLA: { NamespaceSetIndex = input.ReadInt30(); break; } case MultinameKind.TypeName: { QNameIndex = input.ReadInt30(); TypeIndices.Capacity = input.ReadInt30(); for (int i = 0; i < TypeIndices.Capacity; i++) { int typeIndex = input.ReadInt30(); TypeIndices.Add(typeIndex); } break; } } }
public ASNamespaceSet(ASConstantPool pool, FlashReader input) : this(pool) { NamespaceIndices.Capacity = input.ReadInt30(); for (int i = 0; i < NamespaceIndices.Capacity; i++) { int namespaceIndex = input.ReadInt30(); NamespaceIndices.Add(namespaceIndex); } }
public ASNamespace(ASConstantPool pool, FlashReader input) : base(pool) { Kind = (NamespaceKind)input.ReadByte(); if (!Enum.IsDefined(typeof(NamespaceKind), Kind)) { throw new InvalidCastException($"Invalid namespace kind for value {Kind:0x00}."); } NameIndex = input.ReadInt30(); }
public ABCFile(byte[] data) : this() { _initialLength = data.Length; _input = new FlashReader(data); ushort minor = _input.ReadUInt16(); ushort major = _input.ReadUInt16(); Version = new Version(major, minor); Pool = new ASConstantPool(this, _input); PopulateList(Methods, ReadMethod); PopulateList(Metadata, ReadMetadata); PopulateList(Instances, ReadInstance); PopulateList(Classes, ReadClass, Instances.Count); PopulateList(Scripts, ReadScript); PopulateList(MethodBodies, ReadMethodBody); }
public ASNamespaceSet(ASConstantPool pool) : base(pool) { NamespaceIndices = new List <int>(); }
public ASNamespace(ASConstantPool pool) : base(pool) { }
public ASMultiname(ASConstantPool pool) : base(pool) { TypeIndices = new List <int>(); }