// Deserialise properties and IDs protected override void Deserialise(Reader In) { base.Deserialise(In); RoomName = In.ReadString(); StandardSeats = In.ReadInt32(); SpecialSeats = In.ReadInt32(); SpecialSeatType = In.ReadString(); ComputerNamesJoined = In.ReadString(); Bookings = Enumerable.Repeat(new Booking(), In.ReadInt32()).ToList(); Bookings.ForEach(b => b.Id = In.ReadInt32()); Department = new Department() { Id = In.ReadInt32() }; }
protected override void Deserialise(Reader In) { // Deserialise base class then this class base.Deserialise(In); Title = In.ReadString(); Department = new Department() { Id = In.ReadInt32() }; Classes = Enumerable.Repeat(new Class(), In.ReadInt32()).ToList(); Classes.ForEach(c => c.Id = In.ReadInt32()); Email = In.ReadString(); Bookings = Enumerable.Repeat(new Booking(), In.ReadInt32()).ToList(); Bookings.ForEach(b => b.Id = In.ReadInt32()); }