internal override void Read(ModuleReader reader, MemberHeader header) { // Get the module. ChelaModule module = GetModule(); // Read the type. type = module.GetType(reader.ReadUInt()); // Read the add modifier. addModifier = (Function)module.GetMember(reader.ReadUInt()); // Read the remove modifier. removeModifier = (Function)module.GetMember(reader.ReadUInt()); }
internal override void Read(ModuleReader reader, MemberHeader header) { // Read the type and slot. uint typeId = reader.ReadUInt(); slot = reader.ReadInt(); // Load the field type. this.type = GetModule().GetType(typeId); uint initializerSize = header.memberSize - 8; if (!type.IsConstant() || IsExternal()) { // Skip the initializer. reader.Skip(initializerSize); } else { // Load the initializer. initializer = ConstantValue.ReadQualified(GetModule(), reader); } }
internal override void Read(ModuleReader reader, MemberHeader header) { // Read the type and slot. uint typeId = reader.ReadUInt(); slot = reader.ReadInt(); // Load the field type. this.type = GetModule().GetType(typeId); uint initializerSize = header.memberSize - 8; if(!type.IsConstant() || IsExternal()) { // Skip the initializer. reader.Skip(initializerSize); } else { // Load the initializer. initializer = ConstantValue.ReadQualified(GetModule(), reader); } }