public CatalogReader(TagRepository rpa, BinaryReader reader) { uint numStrings = reader.ReadUInt32(); m_strings = new string[numStrings]; for (uint i = 0; i < numStrings; i++) m_strings[i] = reader.ReadString(); uint numTypeNames = reader.ReadUInt32(); m_typeNames = new List<TypeNameTag>(); for (uint i = 0; i < numTypeNames; i++) m_typeNames.Add(rpa.InternTypeName(TypeNameTag.Read(this, reader))); uint numTypeSpecs = reader.ReadUInt32(); m_typeSpecs = new List<TypeSpecTag>(); for (uint i = 0; i < numTypeSpecs; i++) m_typeSpecs.Add(rpa.InternTypeSpec(TypeSpecTag.ReadVariant(this, reader))); uint numMethodSignatures = reader.ReadUInt32(); m_methodSignatures = new MethodSignatureTag[numMethodSignatures]; for (uint i = 0; i < numMethodSignatures; i++) m_methodSignatures[i] = rpa.InternMethodSignature(MethodSignatureTag.Read(this, reader)); uint numVtableSlotTags = reader.ReadUInt32(); m_methodDeclTags = new MethodDeclTag[numVtableSlotTags]; for (uint i = 0; i < numVtableSlotTags; i++) m_methodDeclTags[i] = rpa.InternMethodDeclTag(MethodDeclTag.Read(this, reader)); uint numMethodSpecs = reader.ReadUInt32(); m_methodSpecs = new MethodSpecTag[numMethodSpecs]; for (uint i = 0; i < numMethodSpecs; i++) m_methodSpecs[i] = rpa.InternMethodSpec(MethodSpecTag.Read(this, reader)); m_assemblyName = GetString(reader.ReadUInt32()); if (!rpa.RegisterAssembly(m_assemblyName)) throw new Exception("Assembly registered multiple times"); }