Пример #1
0
 public Teacher[] GetTeachers(MasterData masterData) => GetTs <Teacher>(masterData, ElementType.TEACHER);
Пример #2
0
 public Subject[] GetSubjects(MasterData masterData) => GetTs <Subject>(masterData, ElementType.SUBJECT);
Пример #3
0
 public Class[] GetClasses(MasterData masterData) => GetTs <Class>(masterData, ElementType.CLASS);
Пример #4
0
 public Room[] GetRooms(MasterData masterData) => GetTs <Room>(masterData, ElementType.ROOM);
Пример #5
0
        // is: {standard: true}
        // rights: ["READ_HOMEWORK"]
        // can: {requestStudents: false, requestLessonTopic: false, submitLessonTopic: false}

        private T[] GetTs <T>(MasterData masterData, ElementType tType)
        {
            return(Elements.Where(e => e.ElementType == tType).Select(e => (T)masterData.GetElement(tType, e.ElementId)).ToArray());
        }