public ContestController(IContestService contestService, IUserService userService, IAppSettingsService appSettingsService, IOptions <SecuritySettings> securitySettings)
 {
     this.contestService     = contestService;
     this.userService        = userService;
     this.securitySettings   = securitySettings.Value;
     this.appSettingsService = appSettingsService;
 }
 public SubmissionsController(ISubmissionService submissionService,
                              IContestService contestService)
 {
     this.submissionService = submissionService;
     this.contestService    = contestService;
     this.random            = new Random();
 }
Exemple #3
0
 public RankController(CachedUserManager <UserInfo> userManager, IJudgeService judgeService, IContestService contestService, IGroupService groupService)
 {
     this.userManager    = userManager;
     this.judgeService   = judgeService;
     this.contestService = contestService;
     this.groupService   = groupService;
 }
Exemple #4
0
        public void CreateContest_Clicked(object sender, EventArgs args)
        {
            // TODO: Figure out better way to do DI
            IContestService contestService    = App.ServiceProvider.GetService(typeof(IContestService)) as IContestService;
            var             createContestPage = new CreateContestPage(contestService);

            Navigation.PushAsync(createContestPage);
        }
Exemple #5
0
        public CreateContestPage(IContestService contestService)
        {
            this.contestService = contestService;

            InitializeComponent();

            // This class is responsible for bindings...the properties in this class are bound to XAML controls
            BindingContext = this;
        }
Exemple #6
0
 public DashboardController(
     IContestService contestService,
     ISignService signService,
     UserManager <ApplicationUser> userManager)
 {
     this.contestService = contestService;
     this.signService    = signService;
     this.userManager    = userManager;
 }
Exemple #7
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;
 }
Exemple #8
0
 public ContestController(
     IContestService contestService,
     IUsersService usersService,
     IEssayService essayService,
     IGradeService gradeService)
 {
     this.contestService = contestService;
     this.usersService   = usersService;
     this.essayService   = essayService;
     this.gradeService   = gradeService;
 }
Exemple #9
0
 public ProblemService(
     UserManager <UserInfo> userManager,
     WebHostDbContext dbContext,
     IContestService contestService,
     IGroupService groupService)
 {
     this.userManager    = userManager;
     this.dbContext      = dbContext;
     this.contestService = contestService;
     this.groupService   = groupService;
 }
Exemple #10
0
 public ContestController(
     UserManager<UserInfo> userManager,
     IContestService contestService,
     IProblemService problemService,
     IVoteService voteService)
 {
     this.userManager = userManager;
     this.contestService = contestService;
     this.problemService = problemService;
     this.voteService = voteService;
 }
Exemple #11
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;
 }
Exemple #12
0
 public PhotosController(IPhotoService photoService,
                         IWebHostEnvironment webHostEnvironment,
                         IContestService contestService,
                         IReviewService reviewService,
                         IToastNotification toastNotification)
 {
     this.photoService       = photoService;
     this.webHostEnvironment = webHostEnvironment;
     this.contestService     = contestService;
     this.reviewService      = reviewService;
     this.toastNotification  = toastNotification;
 }
Exemple #13
0
 public SignController(
     UserManager <ApplicationUser> userManager,
     ISignService signService,
     IEmailSender emailSender,
     IConfiguration configuration,
     IContestService contestService)
 {
     this.userManager    = userManager;
     this.signService    = signService;
     this.emailSender    = emailSender;
     this.configuration  = configuration;
     this.contestService = contestService;
 }
Exemple #14
0
 public EssayController(
     IGradeService gradeService,
     IContestService contestService,
     IEssayService essayService,
     ICommentService commentService,
     IUserAdditionalInfoService userAdditionalInfoService)
 {
     this.gradeService              = gradeService;
     this.contestService            = contestService;
     this.essayService              = essayService;
     this.commentService            = commentService;
     this.userAdditionalInfoService = userAdditionalInfoService;
 }
Exemple #15
0
 public CreateController(
     IContestService contestService,
     HtmlSanitizer htmlSanitizer,
     UserManager <ApplicationUser> userManager,
     RoleManager <ApplicationRole> roleManager,
     ISignService signService)
 {
     this.contestService = contestService;
     this.htmlSanitizer  = htmlSanitizer;
     this.userManager    = userManager;
     this.roleManager    = roleManager;
     this.signService    = signService;
 }
Exemple #16
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;
 }
Exemple #17
0
 public HomeController(
     ICalendarService calendarService,
     IEmailSender emailSender,
     IConfiguration configuration,
     IGradeService gradeService,
     IContestService contestService,
     IEssayService essayService)
 {
     this.calendarService = calendarService;
     this.emailSender     = emailSender;
     this.configuration   = configuration;
     this.gradeService    = gradeService;
     this.contestService  = contestService;
     this.essayService    = essayService;
 }
 public PhotoService(PhotoContestContext dbContext,
                     IHttpContextAccessor contextAccessor,
                     IContestService contestService,
                     IUserService userService,
                     UserManager <User> userManager,
                     SignInManager <User> signInManager,
                     IUserContestService userContestService)
 {
     this.dbContext          = dbContext;
     this.contextAccessor    = contextAccessor;
     this.contestService     = contestService;
     this.userService        = userService;
     this.userManager        = userManager;
     this.signInManager      = signInManager;
     this.userContestService = userContestService;
 }
Exemple #19
0
        public void SetUp()
        {
            var mappingConfiguration = new MapperConfiguration(mc =>
            {
                mc.AddProfile(new ContestProfile());
            });

            _mapper = mappingConfiguration.CreateMapper();

            var connectionString = "Data Source=.\\SQLEXPRESS; Initial Catalog=ContestDb; Integrated Security=True;MultipleActiveResultSets=True";
            var options          = new DbContextOptionsBuilder <ContestContext>().UseSqlServer(connectionString).Options;

            _db = new ContestContext(options);

            _contestService = new ContestService(_db, _mapper);
        }
 public ContestsController(PhotoContestContext context,
                           IContestService contestService,
                           ICategoryService categoryService,
                           SignInManager <User> signInManager,
                           IUserContestService userContestService,
                           IPhotoService photoService,
                           IUserService userService,
                           IToastNotification toastNotification)
 {
     _context                = context;
     this.contestService     = contestService;
     this.categoryService    = categoryService;
     this.signInManager      = signInManager;
     this.userContestService = userContestService;
     this.photoService       = photoService;
     this.userService        = userService;
     this.toastNotification  = toastNotification;
 }
Exemple #21
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;
 }
Exemple #22
0
 public ContestController(IContestService ContestService, IActionService ActionsService)
 {
     this.ContestService = ContestService;
     this.ActionsService = ActionsService;
 }
 public HomeController(IBaseService baseService, IContestService contestService)
     : base(baseService)
 {
     this.contestService = contestService;
 }
Exemple #24
0
 public ContestsController(IContestService contests)
 {
     this.contests = contests;
 }
 public ContestController(IContestService contestService, IMapper mapper)
 {
     _contestService = contestService;
     _mapper         = mapper;
 }
 public SubmissionsController(ISubmissionService submissionService, IContestService contestService)
 {
     this.submissionService = submissionService;
     this.contestService    = contestService;
 }
Exemple #27
0
 public TermsController(IBaseEntityService <Term> baseEntityService, ITermService termService, IContestService contestService)
 {
     _termService       = termService;
     _baseEntityService = baseEntityService;
 }
Exemple #28
0
 public TimedHostedService(IServiceProvider serviceProvider)
 {
     this.contestService     = serviceProvider.CreateScope().ServiceProvider.GetRequiredService <IContestService>();
     this.userService        = serviceProvider.CreateScope().ServiceProvider.GetRequiredService <IUserService>();
     this.userContestService = serviceProvider.CreateScope().ServiceProvider.GetRequiredService <IUserContestService>();
 }
Exemple #29
0
 public ContestController(IContestService contestService)
 {
     _contestService = contestService;
 }
 public ContestsController(IContestService contestService)
 {
     this.contestService = contestService;
 }
Exemple #31
0
 public UsersController()
 {
     this.contests = new ContestService();
 }