Пример #1
0
        // 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() };
        }
Пример #2
0
        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());
        }