示例#1
0
 public Booking(TimeSlot Time, List<Room> Rooms, Subject Subject, List<Student> Students, Teacher Teacher, BookingType BookingType)
 {
     TimeSlot = Time;
     this.Rooms = Rooms;
     this.Subject = Subject;
     this.Students = Students;
     this.Teacher = Teacher;
     this.BookingType = BookingType;
 }
示例#2
0
        // Deserialise from an input stream
        protected override void Deserialise(Reader In)
        {
            base.Deserialise(In);

            Ticks = In.ReadInt64();
            BookingType = (BookingType)In.ReadInt32();
            TimeSlot = new TimeSlot() { Id = In.ReadInt32() };
            Rooms = new List<Room>(In.ReadInt32());
            for (int x = 0; x < Rooms.Capacity; x++)
                Rooms.Add(new Room() { Id = In.ReadInt32() });
            Subject = new Subject() { Id = In.ReadInt32() };
            Students = new List<Student>(In.ReadInt32());
            for (int x = 0; x < Students.Capacity; x++)
                Students.Add(new Student() { Id = In.ReadInt32() });
            Teacher = new Teacher() { Id = In.ReadInt32() };
        }