예제 #1
0
 public SuperadminController([FromServices]
                             IUserService userService,
                             ISpecialistService specialistService,
                             ISessionService sessionService,
                             IReviewService reviewService,
                             IProblemService problemService,
                             IProblemImageService problemImageService,
                             IProblemResourceService problemResourceService,
                             IClientVideoReviewService videoReviewService,
                             IFileService fileService,
                             IArticleService articleService,
                             IArticleLikeService articleLikeService,
                             IArticleCommentService articleCommentService,
                             IArticlePublishService articlePublishService)
 {
     UserService            = userService;
     SpecialistService      = specialistService;
     SessionService         = sessionService;
     ReviewService          = reviewService;
     ProblemService         = problemService;
     ProblemImageService    = problemImageService;
     ProblemResourceService = problemResourceService;
     VideoReviewService     = videoReviewService;
     FileService            = fileService;
     ArticleService         = articleService;
     ArticleLikeService     = articleLikeService;
     ArticleCommentService  = articleCommentService;
     ArticlePublishService  = articlePublishService;
 }
예제 #2
0
 public SpecialistController([FromServices]
                             IUserService userService,
                             IArticleLikeService articleLikeService,
                             IArticleCommentService articleCommentService,
                             IArticlePublishService articlePublishService,
                             ISpecialistService specialistService,
                             IReviewService reviewService,
                             ISessionService sessionService,
                             IProblemService problemService,
                             IProblemImageService problemImageService,
                             IProblemResourceService problemResourceService,
                             IProblemResourceTaskService problemResourceTaskService,
                             SessionsTimerService sessionsTimerService)
 {
     UserService                = userService;
     ArticleLikeService         = articleLikeService;
     ArticleCommentService      = articleCommentService;
     ArticlePublishService      = articlePublishService;
     SpecialistService          = specialistService;
     ReviewService              = reviewService;
     SessionService             = sessionService;
     ProblemService             = problemService;
     ProblemImageService        = problemImageService;
     ProblemResourceService     = problemResourceService;
     ProblemResourceTaskService = problemResourceTaskService;
     SessionsTimerService       = sessionsTimerService;
 }
예제 #3
0
 public ProblemController(IProblemService ProblemService,
                          IProblemCategoryService ProblemCategoryService,
                          IBelongService BelongService,
                          IChapterService ChapterService, ISubjectInfoService SubjectInfoService,
                          IProblemLibraryService ProblemLibraryService,
                          IAnswerService AnswerService,
                          IGrabTopicService grabTopic,
                          IExamClassService examClassService,
                          IExamProblemService examProblemService,
                          IExamAnswerService examAnswerService,
                          IImageInfoService imageInfoService)
 {
     _ProblemService         = ProblemService;
     _ProblemCategoryService = ProblemCategoryService;
     _BelongService          = BelongService;
     _ChapterService         = ChapterService;
     _SubjectInfoService     = SubjectInfoService;
     _ProblemLibraryService  = ProblemLibraryService;
     _AnswerService          = AnswerService;
     _grabTopic          = grabTopic;
     _examClassService   = examClassService;
     _examProblemService = examProblemService;
     _examAnswerService  = examAnswerService;
     _imageInfoService   = imageInfoService;
 }
        public ProblemServiceTest()
        {
            _conn = new DbConnexion("Test_LittleProblem");
            _problemCollection = _conn.Collection <Problem>(CollectionNames.Problem);
            _problemService    = new ProblemService(_conn);

            // Perform factory set up (once for entire test run)
            IGenerationSessionFactory factory = AutoPocoContainer.Configure(x =>
            {
                x.Conventions(c => c.UseDefaultConventions());
                x.AddFromAssemblyContainingType <Member>();

                x.Include <Member>()
                .Setup(m => m.Id).Use <ObjectIdDataSource>()
                .Setup(m => m.OpenId).Random(5, 10)
                .Setup(m => m.UserName).Random(5, 7);

                x.Include <Problem>()
                .Setup(p => p.Id).Use <ObjectIdDataSource>()
                .Setup(p => p.Text).Use <LoremIpsumSource>()
                .Setup(p => p.Title).Random(7, 12);

                x.Include <Response>()
                .Setup(r => r.Text).Use <LoremIpsumSource>();
            });

            // Generate one of these per test (factory will be a static variable most likely)
            _session = factory.CreateSession();
        }
 public BlackBoxController(IProblemService problemService, IRunner runner, Dictionary <DataGeneratorType, IDataCreator> generators, ISolutionsService solutionsService)
 {
     _problemService   = problemService;
     _runner           = runner;
     _generators       = generators;
     _solutionsService = solutionsService;
 }
        public ProblemServiceTest()
        {
            _conn = new DbConnexion("Test_LittleProblem");
            _problemCollection = _conn.Collection<Problem>(CollectionNames.Problem);
            _problemService = new ProblemService(_conn);

            // Perform factory set up (once for entire test run)
            IGenerationSessionFactory factory = AutoPocoContainer.Configure(x =>
            {
                x.Conventions(c => c.UseDefaultConventions());
                x.AddFromAssemblyContainingType<Member>();

                x.Include<Member>()
                    .Setup(m => m.Id).Use<ObjectIdDataSource>()
                    .Setup(m => m.OpenId).Random(5, 10)
                    .Setup(m => m.UserName).Random(5, 7);

                x.Include<Problem>()
                    .Setup(p => p.Id).Use<ObjectIdDataSource>()
                    .Setup(p => p.Text).Use<LoremIpsumSource>()
                    .Setup(p => p.Title).Random(7, 12);

                x.Include<Response>()
                    .Setup(r => r.Text).Use<LoremIpsumSource>();
            });

            // Generate one of these per test (factory will be a static variable most likely)
            _session = factory.CreateSession();
        }
 /// <summary>
 ///     Konstruktor kontrolera.
 /// </summary>
 /// <param name="logger"></param>
 /// <param name="context"></param>
 /// <param name="problemService"></param>
 /// <param name="authorService"></param>
 public ProblemsController(ILogger <ProblemsController> logger, IProblemDbContext context,
                           IProblemService problemService, IAuthorService authorService = null)
 {
     _logger         = logger;
     _context        = context;
     _problemService = problemService;
     _authorService  = authorService;
 }
        protected override void SetUp()
        {
            base.SetUp();

            problemService = Container.Get<IProblemService>();
            featureSelector = Container.Get<IFeatureSelector>();
            localStorageHandler = Container.Get<ILocalStorageHandler>();
        }
예제 #9
0
 public SubmissionService(
     SULSContext context,
     IProblemService problemService,
     IUserService userService) : base(context)
 {
     this.problemService = problemService;
     this.userService    = userService;
 }
예제 #10
0
 public AdminSettingController(IAdminSettingService adminSettingService,
                               IProblemService problemService,
                               ITestCaseService testCaseService)
 {
     _adminSettingService = adminSettingService;
     _problemService      = problemService;
     _testCaseService     = testCaseService;
 }
예제 #11
0
        public Population(int size, IIndividualFactory individualFactory, IProblemService problemService)
        {
            Size = size;
            _individualFactory = individualFactory;
            _problemService    = problemService;

            Individuals = new IIndividual[Size];
        }
 public EvolutionService(IProblemService problemService, IPopulationFactory populationFactory,
                         ICrossoverOperator crossoverOperator,
                         IMutationOperator mutationOperator)
 {
     _problemService    = problemService;
     _populationFactory = populationFactory;
     _crossoverOperator = crossoverOperator;
     _mutationOperator  = mutationOperator;
 }
        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;
        }
예제 #14
0
 public AssistenciaController()
 {
     _chamadoService    = new ChamadoService();
     _sistemaService    = new SistemaService();
     _severidadeService = new SeveridadeService();
     _prioridadeService = new PrioridadeService();
     _problemService    = new ProblemService();
     _changeService     = new ChangeService();
 }
예제 #15
0
 public SubjectController(UserManager <User> userManager, IUserService userService, ApplicationContext context, ISubjectService subjectService, IProblemService problemService, IPictureService pictureService, IOptionService optionService)
 {
     _userManager    = userManager;
     _db             = context;
     _subjectService = subjectService;
     _problemService = problemService;
     _pictureService = pictureService;
     _optionService  = optionService;
     _userService    = userService;
 }
        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;
 }
예제 #18
0
 public JudgeService(WebHostDbContext dbContext,
                     IProblemService problemService,
                     ILanguageService languageService,
                     IMessageQueueService messageQueueService)
 {
     this.dbContext           = dbContext;
     this.problemService      = problemService;
     this.languageService     = languageService;
     this.messageQueueService = messageQueueService;
 }
 public ProblemController(
     IMemberRepository memberRepository,
     IProblemService problemService,
     IProblemRepository problemRepository,
     ISessionRegistry sessionRegistry)
     : base(sessionRegistry)
 {
     _memberRepository = memberRepository;
     _problemService = problemService;
     _problemRepository = problemRepository;
 }
예제 #20
0
 public MessageHanderService(ICoinmarketcapService coinmarketcapService,
                             IOkexService okexService, IHuobiService huobiService, INewsService newsService, IPmtownService pmtownService, IProblemService problemService, ILintCodeService lintCodeService)
 {
     _coinmarketcapService = coinmarketcapService;
     _okexService          = okexService;
     _huobiService         = huobiService;
     _newsService          = newsService;
     _pmtownService        = pmtownService;
     _problemService       = problemService;
     _lintCodeService      = lintCodeService;
 }
예제 #21
0
 public JudgeController(IJudgeService judgeService, IProblemService problemService,
                        IContestService contestService, IGroupService groupService, UserManager <UserInfo> userManager,
                        ILanguageService languageService)
 {
     this.judgeService    = judgeService;
     this.problemService  = problemService;
     this.contestService  = contestService;
     this.groupService    = groupService;
     this.userManager     = userManager;
     this.languageService = languageService;
 }
        public DrugSuggestionAIService(IPatientService patientService, IProblemService problemService,
                                       IHostingEnvironment env, RootConfiguration rootConfiguration)
        {
            _patientService    = patientService;
            _problemService    = problemService;
            _rootConfiguration = rootConfiguration;

            _rootpath = _rootpath ?? new Rootpath();
            _rootpath.ContentRootPath = env.ContentRootPath;
            _rootpath.WebRootPath     = env.WebRootPath;
        }
예제 #23
0
 public ContestController(
     UserManager<UserInfo> userManager,
     IContestService contestService,
     IProblemService problemService,
     IVoteService voteService)
 {
     this.userManager = userManager;
     this.contestService = contestService;
     this.problemService = problemService;
     this.voteService = voteService;
 }
예제 #24
0
 public ProblemQueue(
     ILogger <ProblemQueue> logger,
     IOptions <Options> options,
     IServiceProvider sp,
     IProblemService svc,
     StatsService statsService,
     IHttpClientFactory httpClientFactory
     ) : base(logger, options, sp, httpClientFactory)
 {
     Service = svc;
     Stats   = statsService;
 }
예제 #25
0
 public JudgeController(IJudgeService judgeService, IProblemService problemService,
                        IContestService contestService, IGroupService groupService, CachedUserManager <UserInfo> userManager,
                        ILanguageService languageService, WebHostDbContext dbContext)
 {
     this.judgeService    = judgeService;
     this.problemService  = problemService;
     this.contestService  = contestService;
     this.groupService    = groupService;
     this.userManager     = userManager;
     this.languageService = languageService;
     this.dbContext       = dbContext;
 }
예제 #26
0
        public StudentDataService(int maxRowIndex, int maxColumnIndex, dynamic[,] csvFileData,
                                  IProblemService problemService)
        {
            MaxNumberOfStudents  = maxRowIndex;
            MaxNumberOfTimeSlots = maxColumnIndex;

            _csvFileData       = csvFileData;
            _problemService    = problemService;
            _studentPreference = new T[maxRowIndex, maxColumnIndex];

            TypeOfData = typeof(T);

            SetStudentPreference();
        }
예제 #27
0
 public JudgeService(WebHostDbContext dbContext,
                     IProblemService problemService,
                     ILanguageService languageService,
                     IMessageQueueService messageQueueService,
                     IContestService contestService,
                     CachedUserManager <UserInfo> userManager)
 {
     this.dbContext           = dbContext;
     this.problemService      = problemService;
     this.languageService     = languageService;
     this.messageQueueService = messageQueueService;
     this.contestService      = contestService;
     this.userManager         = userManager;
 }
 public AuthController([FromServices]
                       IUserService userService,
                       ITokenManager tokenManager,
                       IUserSessionService userSessionService,
                       IProblemService problemService,
                       IUserWalletService userWalletService,
                       ISpecialistService specialistService)
 {
     UserService        = userService;
     TokenManager       = tokenManager;
     UserSessionService = userSessionService;
     ProblemService     = problemService;
     UserWalletService  = userWalletService;
     SpecialistService  = specialistService;
 }
예제 #29
0
 public ProblemController(
     UserManager <UserInfo> userManager,
     IProblemService problemService,
     IContestService contestService,
     IJudgeService judgeService,
     ILanguageService languageService,
     IFileService fileService,
     IVoteService voteService,
     WebHostDbContext dbContext)
 {
     this.userManager     = userManager;
     this.problemService  = problemService;
     this.contestService  = contestService;
     this.judgeService    = judgeService;
     this.languageService = languageService;
     this.fileService     = fileService;
     this.voteService     = voteService;
     this.dbContext       = dbContext;
 }
예제 #30
0
 public ProcessInstanceController(
     IProcessInstanceService processInstanceService,
     IFileUrlBuilder fileUrlBuilder,
     IProjectService projectService,
     IMemorabiliaRecordService memoService,
     IRecordService recordService,
     IProjectGanttService ganttService,
     IContractService contractService,
     IConstructionUnitService constructionUnitService,
     IProjectTaskService projectTaskService,
     IQualityAccidentService accidentTaskService,
     IQualityProblemService problemTaskService,
     ISafetyAccidentService safetyAccidentTaskService,
     ISafetyProblemService safetyProblemTaskService,
     IHousekeepingProblemService housekeepingProblemTaskService,
     IEarlyStageService earlyStageTaskService,
     IProblemService problemsTaskService,
     IWeeklyProgressService weeklyProgressService,
     IMonthlyProgressService monthlyProgressService,
     IContractPaymentService paymentService
     )
 {
     _processInstanceService         = processInstanceService;
     _projectService                 = projectService;
     _fileUrlBuilder                 = fileUrlBuilder;
     _memoService                    = memoService;
     _recordService                  = recordService;
     _contractService                = contractService;
     _constructionUnitService        = constructionUnitService;
     _ganttService                   = ganttService;
     _projectTaskService             = projectTaskService;
     _accidentTaskService            = accidentTaskService;
     _problemTaskService             = problemTaskService;
     _safetyAccidentTaskService      = safetyAccidentTaskService;
     _safetyProblemTaskService       = safetyProblemTaskService;
     _housekeepingProblemTaskService = housekeepingProblemTaskService;
     _earlyStageTaskService          = earlyStageTaskService;
     _problemsTaskService            = problemsTaskService;
     _weeklyProgressService          = weeklyProgressService;
     _monthlyProgressService         = monthlyProgressService;
     _paymentService                 = paymentService;
 }
예제 #31
0
        public ResourceBenchmark()

        {
            var builder = new ConfigurationBuilder()
                          .AddJsonFile("appsettings.json", true, true);

            var configuration = builder.Build();

            var conf   = new MapperConfiguration(c => { });
            var mapper = new Mapper(conf);

            var options = new DbContextOptionsBuilder().UseMySQL(configuration.GetConnectionString("Default"));

            _context = new SqlContext(options.Options);
            var fileDataService = new FileDataService(_context);

            _categoryService = new CategoryService(_context);
            _problemService  = new ProblemService(_context, fileDataService);
            _authorService   = new AuthorService(_context);
            _controller      = new ProblemsController(null, _context, _problemService, _authorService);
        }
예제 #32
0
        public PatientController([FromServices]
                                 IUserService userService,
                                 IProblemService problemService,
                                 ISessionService sessionService,
                                 ISpecialistService specialistService,
                                 IReviewService reviewService,
                                 IUserWalletService userWalletService,
                                 IProblemImageService problemImageService,
                                 IProblemResourceService problemResourceService,
                                 IProblemResourceTaskService problemResourceTaskService,
                                 NotificationsMessageHandler notificationsService)
        {
            UserService                = userService;
            ProblemService             = problemService;
            SessionService             = sessionService;
            SpecialistService          = specialistService;
            ReviewService              = reviewService;
            UserWalletService          = userWalletService;
            ProblemImageService        = problemImageService;
            ProblemResourceService     = problemResourceService;
            ProblemResourceTaskService = problemResourceTaskService;

            NotificationsService = notificationsService;
        }
        protected override void SetUp()
        {
            base.SetUp();

            problemService = Container.Get<IProblemService>();
            localStorageHandler = Container.Get<ILocalStorageHandler>();
            classifierEvaluator = Container.Get<IClassifierEvaluator>();
            classifierBuilder = Container.Get<IClassifierBuilder>();
        }
예제 #34
0
 public ProblemController(IMembershipService membershipService, IProblemService problemService, IAutoMapper mapper)
 {
     _membershipService = membershipService;
     _problemService    = problemService;
     _mapper            = mapper;
 }
예제 #35
0
 public HomeController(IProblemService problemService)
 {
     this.problemService = problemService;
 }
        protected override void SetUp()
        {
            base.SetUp();

            problemService = Container.Get<IProblemService>();
        }