Ejemplo n.º 1
0
 public RequestController(IProblemRepository repository, ISocialRequestRepository socialRequestRepository, IUserProcessor userProcessor, IStreetRepository streetRepository)
 {
     _problemRepository       = repository;
     _socialRequestRepository = socialRequestRepository;
     _userProcessor           = userProcessor;
     _streetRepository        = streetRepository;
 }
Ejemplo n.º 2
0
 public ProblemsController(
     IProblemRepository problemRepository,
     IRedmineIntegrationService redmineService)
 {
     _problemRepository = problemRepository;
     _redmineService    = redmineService;
 }
 public RequestController(IProblemRepository repository, ISocialRequestRepository socialRequestRepository, IUserProcessor userProcessor, IStreetRepository streetRepository)
 {
     _problemRepository = repository;
     _socialRequestRepository = socialRequestRepository;
     _userProcessor = userProcessor;
     _streetRepository = streetRepository;
 }
Ejemplo n.º 4
0
        public ContestController(IContestRepository contestRepository, IUserContestRepository userContestRepository, IProblemContestRepository problemContestRepository,
                                 ISubmisionContestRepository submisionContestRepository, IAnnouncementRepository announcementRepository, IProblemRepository problemRepository,
                                 ISubmisionRepository submisionRepository, IMessageBuilder emailSender, UserManager <User> userManager,
                                 IConfiguration configuration, ITestsRepository testsRepository, SubmissionHub submissionHub,
                                 IHubContext <SubmissionHub> hubContext, ISerializeTests serializeTests,
                                 IEvaluationRepository evaluationRepository, IUserInformationRepository userInformation)
        {
            _contestRepository          = contestRepository;
            _userContestRepository      = userContestRepository;
            _problemContestRepository   = problemContestRepository;
            _submisionContestRepository = submisionContestRepository;
            _announcementRepository     = announcementRepository;
            _problemRepository          = problemRepository;
            _submisionRepository        = submisionRepository;
            _compilers   = Compilator.Compilers;
            _emailSender = emailSender;
            _userManager = userManager;


            _configuration        = configuration;
            _testRepository       = testsRepository;
            _submissionHub        = submissionHub;
            _evaluationRepository = evaluationRepository;
            _hubContext           = hubContext;
            _serializeTests       = serializeTests;
            _userInformation      = userInformation;

            //intialize compilation and running api
            _compilationApi = _configuration.GetSection("Api")["CompilationApi"];
            _executionApi   = _configuration.GetSection("Api")["ExecutionApi"];
        }
Ejemplo n.º 5
0
 public TestsController(ITestsRepository testsRepository, IConfiguration configuration,
                        IProblemRepository problemRepository)
 {
     _testRepository    = testsRepository;
     _configuration     = configuration;
     _problemRepository = problemRepository;
     _testApi           = _configuration.GetSection("Api")["TestsApi"];
     _deleteTestApi     = _testApi + "/deleteTest";
 }
Ejemplo n.º 6
0
 public ProblemService(IProblemRepository problemRepository, ICustomerRepository customerRepository, IUnitOfWork uow
                       , IEmployeeRepository employeeRepository,
                       ILevelRepository levelRepository)
     : this(problemRepository, uow)
 {
     this._customerRepository = customerRepository;
     _employeeRepository      = employeeRepository;
     _levelRepository         = levelRepository;
 }
 public ProblemsController(
     IProblemRepository problemRepository,
     IEnrolementRepository enrolementRepository,
     IAssignmentRepository assignmentRepository)
 {
     this.problemRepository    = problemRepository;
     this.enrolementRepository = enrolementRepository;
     this.assignmentRepository = assignmentRepository;
 }
        public static ProblemController GetProblemController(
            IMemberRepository memberRepository, IProblemService problemService, IProblemRepository problemRepository)
        {
            var problemController = new ProblemController(memberRepository, problemService, problemRepository, new TestSessionRegistry());
            problemController.InjectFakeContext();
            problemController.ConnectUser();

            return problemController;
        }
 public ProblemController(
     IMemberRepository memberRepository,
     IProblemService problemService,
     IProblemRepository problemRepository,
     ISessionRegistry sessionRegistry) : base(sessionRegistry)
 {
     _memberRepository  = memberRepository;
     _problemService    = problemService;
     _problemRepository = problemRepository;
 }
 public IEnumerable <Question> FindQuestionsByStudent(Guid userId, IProblemRepository problemRepository)
 {
     return((
                from q in this.Questions.ToList()
                join p in problemRepository.Problems
                on q.QuestionId equals p.QuestionId
                where p.StudentId == userId
                select q
                ).ToList());
 }
Ejemplo n.º 11
0
 public IEnumerable <Assignment> FindAssignmentsByStudent(Guid userId, IProblemRepository problemRepository)
 {
     return((
                from a in this.Assignments.ToList()
                join p in problemRepository.Problems
                on a.ProblemId equals p.ProblemId
                where p.StudentId == userId
                select a
                ).ToList());
 }
Ejemplo n.º 12
0
 public IEnumerable <Assignment> FindAssignmentsByClass(Guid classId, IProblemRepository problemRepository)
 {
     return((
                from a in this.Assignments.ToList()
                join p in problemRepository.Problems
                on a.ProblemId equals p.ProblemId
                where p.ClassId == classId
                select a
                ).ToList());
 }
 public IEnumerable <Question> FindQuestionsByClass(Guid classId, IProblemRepository problemRepository)
 {
     return((
                from q in this.Questions.ToList()
                join p in problemRepository.Problems
                on q.QuestionId equals p.QuestionId
                where p.ClassId == classId
                select q
                ).ToList());
 }
        public static ProblemController GetProblemController(
            IMemberRepository memberRepository, IProblemService problemService, IProblemRepository problemRepository)
        {
            var problemController = new ProblemController(memberRepository, problemService, problemRepository, new TestSessionRegistry());

            problemController.InjectFakeContext();
            problemController.ConnectUser();

            return(problemController);
        }
 public ProblemController(
     IMemberRepository memberRepository,
     IProblemService problemService,
     IProblemRepository problemRepository,
     ISessionRegistry sessionRegistry)
     : base(sessionRegistry)
 {
     _memberRepository = memberRepository;
     _problemService = problemService;
     _problemRepository = problemRepository;
 }
Ejemplo n.º 16
0
 public IEnumerable <Assignment> FindAssignmentsByTeacher(Guid userId, IProblemRepository problemRepository, IEnrolementRepository enrolementRepository)
 {
     return((
                from a in this.Assignments.ToList()
                join p in problemRepository.Problems
                on a.ProblemId equals p.ProblemId
                join e in enrolementRepository.Enrolement
                on p.ClassId equals e.ClassId
                where e.UserId == userId && e.Role == 2
                select a
                ).ToList());
 }
 public IEnumerable <Question> FindQuestionsByTeacher(Guid userId, IProblemRepository problemRepository, IEnrolementRepository enrolementRepository)
 {
     return((
                from q in this.Questions.ToList()
                join p in problemRepository.Problems
                on q.QuestionId equals p.QuestionId
                join e in enrolementRepository.Enrolement
                on p.ClassId equals e.ClassId
                where e.UserId == userId && e.Role == 2
                select q
                ).ToList());
 }
Ejemplo n.º 18
0
 public ProblemController(IProblemRepository problemRepository, ICategoryRepository categoryRepository, IAnswerRepository answerRepository, IUserSolvedRepository userSolvedRepository, IUserAttemptedRepository userAttemptedRepository, IImageRepository imageRepository, ITagRepository tagRepository, ILikeRepository likeRepository, IDislikeRepository dislikeRepository, ICommentRepository commentRepository)
 {
     this.problemRepository = problemRepository;
     this.categoryRepository = categoryRepository;
     this.answerRepository = answerRepository;
     this.userAttemptedRepository = userAttemptedRepository;
     this.userSolvedRepository = userSolvedRepository;
     this.tagRepository = tagRepository;
     this.imageRepository = imageRepository;
     this.likeRepository = likeRepository;
     this.dislikeRepository = dislikeRepository;
     this.commentRepository = commentRepository;
 }
Ejemplo n.º 19
0
 public TestCaseBusiness(ITestCaseRepository repository, IMapper mapper,
                         ISubmissionRepository submissionRepository,
                         IProblemRepository problemRepository,
                         ITestCaseRepository testCaseRepository,
                         IAdminSettingRepository adminSettingRepository,
                         IAdminSettingCacheBusiness adminSettingCacheBusiness) : base(repository, mapper)
 {
     _submissionRepository      = submissionRepository;
     _problemRepository         = problemRepository;
     _testCaseRepository        = testCaseRepository;
     _adminSettingRepository    = adminSettingRepository;
     _adminSettingCacheBusiness = adminSettingCacheBusiness;
 }
Ejemplo n.º 20
0
        public SubmissionController(ISubmisionRepository submisionRepository, IConfiguration configuration,
                                    IProblemRepository problemRepository, IEvaluationRepository evaluationRepository,
                                    ITestsRepository testsRepository)
        {
            _submisionRepository  = submisionRepository;
            _configuration        = configuration;
            _problemRepository    = problemRepository;
            _evaluationRepository = evaluationRepository;
            _testRepository       = testsRepository;

            //intialize compilation and running api
            _compilationApi = _configuration.GetSection("Api")["CompilationApi"];
            _executionApi   = _configuration.GetSection("Api")["ExecutionApi"];
        }
Ejemplo n.º 21
0
        public ProblemsController(IProblemRepository problemRepository, ISubmisionRepository submisionRepository,
                                  ISolutionRepository solutionRepository, IConfiguration configuration,
                                  ITestsRepository testsRepository, SubmissionHub submissionHub,
                                  IHubContext <SubmissionHub> hubContext, ISerializeTests serializeTests,
                                  IEvaluationRepository evaluationRepository)
        {
            _problemRepository    = problemRepository;
            _submisionRepository  = submisionRepository;
            _solutionRepository   = solutionRepository;
            _configuration        = configuration;
            _testRepository       = testsRepository;
            _submissionHub        = submissionHub;
            _evaluationRepository = evaluationRepository;
            _hubContext           = hubContext;
            _serializeTests       = serializeTests;
            _compilers            = Compilator.Compilers;

            //intialize compilation and running api
            _compilationApi = _configuration.GetSection("Api")["CompilationApi"];
            _executionApi   = _configuration.GetSection("Api")["ExecutionApi"];
        }
Ejemplo n.º 22
0
 public AdminSettingBusiness(
     IAdminSettingRepository repository,
     IMapper mapper,
     IResultRepository resultRepository,
     ISubmissionRepository submissionRepository,
     IProblemRepository problemRepository,
     ITestCaseRepository testCaseRepository,
     IAccountRepository accountRepository,
     ISubmissionCacheBusiness submissionCacheBusiness,
     IProblemCacheBusiness problemCacheBusiness,
     IAdminSettingCacheBusiness adminSettingCacheBusiness
     ) : base(repository, mapper)
 {
     _downloadUrl               = "/{0}/problems/{0}/0.in";
     _rankUrl                   = "/{0}/ranks/";
     _resultRepository          = resultRepository;
     _submissionRepository      = submissionRepository;
     _problemRepository         = problemRepository;
     _testCaseRepository        = testCaseRepository;
     _accountRepository         = accountRepository;
     _submissionCacheBusiness   = submissionCacheBusiness;
     _problemCacheBusiness      = problemCacheBusiness;
     _adminSettingCacheBusiness = adminSettingCacheBusiness;
 }
Ejemplo n.º 23
0
 public WorkflowService(IProblemRepository problemRepository, IProblemStateRepository problemStateRepository)
 {
     _problemRepository = problemRepository;
     _problemStateRepository = problemStateRepository;
 }
Ejemplo n.º 24
0
 public ProblemService(IProblemRepository problemRepository, IUnitOfWork uow)
 {
     _problemRepository = problemRepository;
     _uow = uow;
 }
 public SolutionsService(ISolutionRepository solutionRepository, IProblemRepository problemRepository)
 {
     _solutionRepository = solutionRepository;
     _problemRepository  = problemRepository;
 }
Ejemplo n.º 26
0
 public HomeController(IProblemRepository problemRepository)
 {
     _problemRepository = problemRepository;
 }
 public StatisticsController(IProblemRepository repository, ISocialRequestRepository socialRequestRepository, IUserProcessor userProcessor)
 {
     this._problemRepository = repository;
     this._socialRequestRepository = socialRequestRepository;
     this._userProcessor = userProcessor;
 }
Ejemplo n.º 28
0
 public ProblemsController(IProblemRepository problemRepository)
 {
     _problemRepository = problemRepository;
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProblemFactory"/> class.
 /// </summary>
 /// <param name="problemRepository">The problem repository.</param>
 public ProblemFactory( IProblemRepository problemRepository )
 {
     _problemRepository = problemRepository;
 }
Ejemplo n.º 30
0
 public ArticlesController(IProblemRepository problemRepository, ISolutionRepository solutionRepository)
 {
     _problemRepository  = problemRepository;
     _solutionRepository = solutionRepository;
 }
Ejemplo n.º 31
0
 public void Dispose()
 {
     Problems = null;
 }
Ejemplo n.º 32
0
 public QuestionsController(IQuestionRepository questionRepository, IEnrolementRepository enrolementRepository, IProblemRepository problemRepository)
 {
     this.questionRepository   = questionRepository;
     this.enrolementRepository = enrolementRepository;
     this.problemRepository    = problemRepository;
 }
Ejemplo n.º 33
0
 public ProblemService(IProblemRepository problemRepository, IProblemTypeRepository problemTypeRepository)
 {
     _problemRepository     = problemRepository;
     _problemTypeRepository = problemTypeRepository;
 }
Ejemplo n.º 34
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProblemDtoFactory"/> class.
 /// </summary>
 /// <param name="problemRepository">The problem repository.</param>
 public ProblemDtoFactory(IProblemRepository problemRepository)
 {
     _problemRepository = problemRepository;
 }
 public ProblemsController(IProblemRepository problemRepository)
 {
     this._problemRepository = problemRepository;
 }
Ejemplo n.º 36
0
 public HomeController(IProblemRepository r)
 {
     repo = r;
 }
Ejemplo n.º 37
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetProblemByKeyRequestHanlder"/> class.
 /// </summary>
 /// <param name="problemRepository">The problem repository.</param>
 public GetProblemByKeyRequestHanlder(IProblemRepository problemRepository)
 {
     _problemRepository = problemRepository;
 }
Ejemplo n.º 38
0
 public ProblemService(IProblemRepository problemRepository, ITagService tagRepository, INotificationService notificationService)
 {
     _notificationService = notificationService;
     _problemRepository   = problemRepository;
     _tagRepository       = tagRepository;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AssociateProblemsWithVisitRequestHandler"/> class.
 /// </summary>
 /// <param name="visitRepository">The visit repository.</param>
 /// <param name="problemRepository">The problem repository.</param>
 public AssociateProblemsWithVisitRequestHandler(
     IVisitRepository visitRepository, IProblemRepository problemRepository)
 {
     _visitRepository   = visitRepository;
     _problemRepository = problemRepository;
 }