Ejemplo n.º 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 CreateTeacherCommand(ITeacherFactory teacherFactory)
        {
            if (teacherFactory == null)
            {
                throw new ArgumentNullException(nameof(teacherFactory));
            }

            this.teacherFactory = teacherFactory;
        }
Ejemplo n.º 3
0
 public CreateTeacherCommand(
     IRepository <ITeacher> teachersRepository,
     ITeacherFactory teacherFactory,
     IMarkFactory markFactory)
     : base(teachersRepository)
 {
     this.ValidateNonNullParameters(teacherFactory, markFactory);
     this.teacherFactory = teacherFactory;
     this.markFactory    = markFactory;
 }
 public CommandFactory(IStudentFactory studentFactory, ITeacherFactory teacherFactory)
 {
     commands = new Dictionary <string, Func <ICommand> >
     {
         { "CreateStudent", () => new CreateStudentCommand(studentFactory) },
         { "CreateTeacher", () => new CreateTeacherCommand(teacherFactory) },
         { "RemoveStudent", () => new RemoveStudentCommand() },
         { "RemoveTeacher", () => new RemoveTeacherCommand() },
         { "StudentListMarks", () => new StudentListMarksCommand() },
         { "TeacherAddMark", () => new TeacherAddMarkCommand() }
     };
 }
Ejemplo n.º 5
0
        public CreateTeacherCommand(ITeacherFactory factory, ISchoolService service)
        {
            if (factory == null)
            {
                throw new ArgumentNullException("factory cannot be null");
            }

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

            this.factory = factory;
            this.schoolService = service;
        }
Ejemplo n.º 6
0
        public CreateTeacherCommand(ITeacherFactory factory, ISchoolService service)
        {
            if (factory == null)
            {
                throw new ArgumentNullException("factory cannot be null");
            }

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

            this.factory       = factory;
            this.schoolService = service;
        }
Ejemplo n.º 7
0
        public CreateTeacherCommand(ITeacherFactory teacherFactory, ITeachersData teachersData, IIdentityProvider idProvider)
        {
            if (teacherFactory == null)
            {
                throw new ArgumentNullException(nameof(teacherFactory));
            }

            if (idProvider == null)
            {
                throw new ArgumentNullException(nameof(idProvider));
            }

            this.idProvider     = idProvider;
            this.teacherFactory = teacherFactory;
            this.teachersData   = teachersData;
        }
Ejemplo n.º 8
0
 public CreateTeacherCommand(ITeacherFactory factory, ITeacherService service)
 {
     this.factory = factory ?? throw new ArgumentNullException("factory cannot be null");
     this.service = service ?? throw new ArgumentNullException("service cannot be null");
 }
 public CreateTeacherCommand(ITeacherFactory teacherFactory, IAddTeacher addTeacher)
 {
     this.teacherFactory = teacherFactory;
     this.addTeacher     = addTeacher;
 }
 public CreateTeacherCommand(ITeacherFactory teacherFactory, IMarkFactory markFactory, IStorage teachersData)
 {
     this.teacherFactory = teacherFactory;
     this.markFactory    = markFactory;
     this.teachersData   = teachersData;
 }
Ejemplo n.º 11
0
 public CreateTeacherHandler(ICommandFactory commandFactory, ITeacherFactory teacherFactory, IMarkFactory markFactory)
     : base(commandFactory)
 {
     this.teacherFactory = teacherFactory;
     this.markFactory    = markFactory;
 }
Ejemplo n.º 12
0
 public CreateTeacherCommand(ITeacherFactory teacherFactory)
 {
     this.teacherFactory = teacherFactory;
 }