예제 #1
0
        public PerformerService(IRepo <Performer> performerRepo, IRepo <Division> divisionRepo, IRepo <PersonName> personNameRepo, IRepo <Organization> organizationRepo, ICrossReferenceRepo <ContestantPerformer> contestantPerformerRepo)
        {
            if (performerRepo == null)
            {
                throw new ApplicationException("A PerformerService cannot be constructed without a PerformerRepo.");
            }
            if (divisionRepo == null)
            {
                throw new ApplicationException("A PerformerService cannot be constructed without a DivisionRepo.");
            }
            if (personNameRepo == null)
            {
                throw new ApplicationException("A PerformerService cannot be constructed without a PersonNameRepo.");
            }
            if (organizationRepo == null)
            {
                throw new ApplicationException("A PerformerService cannot be constructed without an OrganizationRepo.");
            }
            if (contestantPerformerRepo == null)
            {
                throw new ApplicationException("A PerformerService cannot be constructed without an ContestantPerformerRepo.");
            }

            PerformerRepo           = performerRepo;
            DivisionRepo            = divisionRepo;
            PersonNameRepo          = personNameRepo;
            OrganizationRepo        = organizationRepo;
            ContestantPerformerRepo = contestantPerformerRepo;
        }
예제 #2
0
        public JudgeService(IRepo <Judge> judgeRepo, ICrossReferenceRepo <ContestJudge> contestJudgeRepo)
        {
            if (judgeRepo == null)
            {
                throw new ApplicationException("A JudgeService cannot be constructed without a JudgeRepo.");
            }
            if (contestJudgeRepo == null)
            {
                throw new ApplicationException("A JudgeService cannot be constructed without an ContestJudgeRepo.");
            }

            JudgeRepo        = judgeRepo;
            ContestJudgeRepo = contestJudgeRepo;
        }
예제 #3
0
        public ContestService(IRepo <Contest> contestRepo, ICrossReferenceRepo <ShowContest> showContestRepo)
        {
            if (contestRepo == null)
            {
                throw new ApplicationException("A ContestService cannot be constructed without a ContestRepo.");
            }
            if (showContestRepo == null)
            {
                throw new ApplicationException("A ContestService cannot be constructed without a ShowContestRepo.");
            }

            ContestRepo     = contestRepo;
            ShowContestRepo = showContestRepo;
        }
예제 #4
0
        public ContestantService(IRepo <Contestant> contestantRepo, IRepo <Performance> performanceRepo, ICrossReferenceRepo <ContestContestant> contestContestantRepo)
        {
            if (contestantRepo == null)
            {
                throw new ApplicationException("A " + this.GetType().Name + " cannot be constructed without a ContestantRepo.");
            }
            if (performanceRepo == null)
            {
                throw new ApplicationException("A " + this.GetType().Name + " cannot be constructed without a PerformanceRepo.");
            }

            ContestantRepo        = contestantRepo;
            PerformanceRepo       = performanceRepo;
            ContestContestantRepo = contestContestantRepo;
        }
        public ScoreCriterionService(IRepo <ScoreCriterion> scoreCriterionRepo, ICrossReferenceRepo <ContestScoreCriterion> contestScoreCriterionRepo)
        {
            if (scoreCriterionRepo == null)
            {
                throw new ApplicationException("A ScoreCriterionService cannot be constructed without a ScoreCriterionRepo.");
            }

            if (contestScoreCriterionRepo == null)
            {
                throw new ApplicationException("A ScoreCriterionService cannot be constructed without an ContestScoreCriterionRepo.");
            }

            ScoreCriterionRepo        = scoreCriterionRepo;
            ContestScoreCriterionRepo = contestScoreCriterionRepo;
        }