Beispiel #1
0
 public CreateTeacherCommand(ITeacherFactory teacherFactory, ISchoolSystemData schoolSystemData, IMarkFactory markFactory)
 {
     this.teacherFactory   = teacherFactory ?? throw new ArgumentNullException("Teacher Factory cannot be null!");
     this.schoolSystemData = schoolSystemData ?? throw new ArgumentNullException("School system data cannot be null!");
     this.markFactory      = markFactory ?? throw new ArgumentNullException("Mark factory cannot be null!");
     this.currentTeacherId = 0;
 }
        public AddMarksPresenter(
            IAddMarksView view,
            IStudentClassService studentClassService,
            IStudentService studentService,
            ITeacherService teacherService,
            IMarkService markService,
            IMarkFactory markFactory)
            : base(view)
        {
            Validator.ValidateForNull(studentClassService, "studentClassService");
            Validator.ValidateForNull(studentService, "studentService");
            Validator.ValidateForNull(teacherService, "teacherService");
            Validator.ValidateForNull(markService, "markService");
            Validator.ValidateForNull(markFactory, "markFactory");

            this.studentClassService = studentClassService;
            this.studentService      = studentService;
            this.teacherService      = teacherService;
            this.markFactory         = markFactory;
            this.markService         = markService;

            this.View.PageLoad      += View_PageLoad;
            this.View.ClassSelected += View_ClassSelected;
            this.View.InsertMarks   += View_InsertMarks;
        }
Beispiel #3
0
 public CreateTeacherCommand(
     IRepository <ITeacher> teachersRepository,
     ITeacherFactory teacherFactory,
     IMarkFactory markFactory)
     : base(teachersRepository)
 {
     this.ValidateNonNullParameters(teacherFactory, markFactory);
     this.teacherFactory = teacherFactory;
     this.markFactory    = markFactory;
 }
        public Teacher(string firstName, string lastName, Subject subject, IMarkFactory markFactory)
            : base(firstName, lastName)
        {
            if (markFactory == null)
            {
                throw new ArgumentNullException(nameof(markFactory));
            }

            this.Subject     = subject;
            this.markFactory = markFactory;
        }
Beispiel #5
0
        public TeacherAddMarkCommand(IMarkFactory factory, ISchoolService service)
        {
            if (factory == null)
            {
                throw new ArgumentNullException("factory cannot be null");
            }

            if (service == null)
            {
                throw new ArgumentNullException("service cannot be null");
            }

            this.markFactory   = factory;
            this.schoolService = service;
        }
 public CreateTeacherCommand(ITeacherFactory teacherFactory, IMarkFactory markFactory, IStorage teachersData)
 {
     this.teacherFactory = teacherFactory;
     this.markFactory    = markFactory;
     this.teachersData   = teachersData;
 }
Beispiel #7
0
 public Teacher(string firstName, string lastName, Subject subject, IMarkFactory factory)
     : base(firstName, lastName)
 {
     this.Subject = subject;
     this.factory = factory;
 }
Beispiel #8
0
 public Teacher(string firstName, string lastName, Subject subject, IMarkFactory markFactory)
     : base(firstName, lastName)
 {
     this.markFactory = markFactory ?? throw new ArgumentNullException("Mark factory cannot be null!");
     this.Subject     = subject;
 }
Beispiel #9
0
 public CreateTeacherHandler(ICommandFactory commandFactory, ITeacherFactory teacherFactory, IMarkFactory markFactory)
     : base(commandFactory)
 {
     this.teacherFactory = teacherFactory;
     this.markFactory    = markFactory;
 }
Beispiel #10
0
 public TeacherAddMarkCommand(IMarkFactory factory, IStudentService studentService, ITeacherService teacherService)
 {
     this.markFactory    = factory ?? throw new ArgumentNullException("factory cannot be null");
     this.studentService = studentService ?? throw new ArgumentNullException("studentService cannot be null");
     this.teacherService = teacherService ?? throw new ArgumentNullException("teacherService cannot be null");
 }