コード例 #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;
 }
コード例 #2
0
        public CreateTeacherCommand(ITeacherFactory teacherFactory)
        {
            if (teacherFactory == null)
            {
                throw new ArgumentNullException(nameof(teacherFactory));
            }

            this.teacherFactory = teacherFactory;
        }
コード例 #3
0
 public CreateTeacherCommand(
     IRepository <ITeacher> teachersRepository,
     ITeacherFactory teacherFactory,
     IMarkFactory markFactory)
     : base(teachersRepository)
 {
     this.ValidateNonNullParameters(teacherFactory, markFactory);
     this.teacherFactory = teacherFactory;
     this.markFactory    = markFactory;
 }
コード例 #4
0
 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() }
     };
 }
コード例 #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;
        }
コード例 #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;
        }
コード例 #7
0
ファイル: CreateTeacherCommand.cs プロジェクト: shakuu/Exams
        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;
        }
コード例 #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");
 }
コード例 #9
0
 public CreateTeacherCommand(ITeacherFactory teacherFactory, IAddTeacher addTeacher)
 {
     this.teacherFactory = teacherFactory;
     this.addTeacher     = addTeacher;
 }
コード例 #10
0
 public CreateTeacherCommand(ITeacherFactory teacherFactory, IMarkFactory markFactory, IStorage teachersData)
 {
     this.teacherFactory = teacherFactory;
     this.markFactory    = markFactory;
     this.teachersData   = teachersData;
 }
コード例 #11
0
 public CreateTeacherHandler(ICommandFactory commandFactory, ITeacherFactory teacherFactory, IMarkFactory markFactory)
     : base(commandFactory)
 {
     this.teacherFactory = teacherFactory;
     this.markFactory    = markFactory;
 }
コード例 #12
0
 public CreateTeacherCommand(ITeacherFactory teacherFactory)
 {
     this.teacherFactory = teacherFactory;
 }