Beispiel #1
0
 /// <summary>
 /// Create student
 /// </summary>
 /// <param name="name">Name of student</param>
 /// <param name="mentor">Ref on mentor, who has a course</param>
 public Student(string name, IMentor mentor) : this(name)
 {
     if (mentor == null)
     {
         throw new ArgumentNullException();
     }
     logger.Trace("Create student");
     logger.Info($"Student name is {name}. Mentors' course : {mentor.Course.Name}");
     CheckCourse(mentor.Course);
     RegisterOnCourse(mentor.Course);
 }
 public CourseManager(string name, int number, IMentor mentor)
 {
     if (number <= 0)
     {
         throw new ArgumentException();
     }
     if (name == null || mentor == null)
     {
         throw new ArgumentNullException();
     }
     Name             = name;
     NumberOfStudents = number;
     Mentor           = mentor;
 }
Beispiel #3
0
 public HomeController(IUser iuser, ITraining itraining,
                       IPdfSharpService pdfService, IMentor mentor,
                       IInternal iinternal, IAllocation allocation,
                       IAspiration aspiration, ILog log,
                       IMigraDocService migraDocService)
 {
     _IUser           = iuser;
     _ITraining       = itraining;
     _pdfService      = pdfService;
     _IMentor         = mentor;
     _IInternal       = iinternal;
     _IAllocation     = allocation;
     _IAspiration     = aspiration;
     _ILog            = log;
     _migraDocService = migraDocService;
 }
            /// <summary>
            /// Create math course
            /// </summary>
            /// <param name="number">Max number of students in the group</param>
            /// <param name="name">Name of the course</param>
            /// <param name="mentor">Reference on mentor</param>
            public MathCourse(int number, string name, IMentor mentor)
            {
                if (number < 0)
                {
                    throw new AggregateException();
                }
                if (name == null || mentor == null)
                {
                    throw new ArgumentNullException();
                }

                logger.Trace($"Create: course - {name}; number of students - {number}");
                teacher          = mentor;
                numberOfStudents = number;
                Name             = name;
                group            = new List <IStudent>();
                archives         = new List <IArchive>();
            }
 /// <summary>
 /// Create instance of Math course manager
 /// </summary>
 /// <param name="number">Max number of students in the group</param>
 /// <param name="name">Name of the course</param>
 /// <param name="mentor">Reference on mentor</param>
 public MathCourseManager(int number, string name, IMentor mentor) : base(name, number, mentor)
 {
 }
Beispiel #6
0
 public MentorController(ITraining itraining, IUser iuser, IMentor imentor)
 {
     _ITraining = itraining;
     _IUser     = iuser;
     _IMentor   = imentor;
 }