Example #1
0
 public TasksParser(ITaskParserRepository tasksRepostory, ISteamRepository steamRepostory, IMatchRepository matchRepostory, IUnitOfWork unitOfWork)
 {
     TasksRepostory = tasksRepostory;
     SteamRepostory = steamRepostory;
     MatchRepostory = matchRepostory;
     UnitOfWork = unitOfWork;
 }
 public UserService(IUserRepository userRepository, IBetRepository betRepository, IMatchRepository matchRepository, IAdministratorService administratorService)
 {
     m_UserRepository = userRepository;
     m_BetRepository = betRepository;
     m_MatchRepository = matchRepository;
     m_AdministratorService = administratorService;
 }
 public MatchService(IMatchRepository matchRepository, IMatchMapper matchMapper, IUserService userService,
     IAdministratorService administratorService)
 {
     m_MatchRepository = matchRepository;
     m_UserService = userService;
     m_MatchMapper = matchMapper;
     m_AdministratorService = administratorService;
 }
 public MatchReportServices(IMatchRepository matchRepository, IPlayerMatchObjectiveRepository playerMatchObjectiveRepository, IPlayerMatchStatisticRepository playerMatchStatisticRepository, IPlayerRepository playerRepository, IMatchMomRepository matchMomRepository)
 {
     _matchRepository = matchRepository;
     _playerMatchObjectiveRepository = playerMatchObjectiveRepository;
     _playerMatchStatisticRepository = playerMatchStatisticRepository;
     _playerRepository = playerRepository;
     _matchMomRepository = matchMomRepository;
 }
 public MatchController(IMatchRepository matchRepository,
     IMatchupResultRepository matchupResultRepository,
     ILeaderboardService leaderboardService,
     ILeaderboardViewRepository leaderboardViewRepository,
     ILogger logger)
 {
     _matchRepository = matchRepository;
     _matchupResultRepository = matchupResultRepository;
     _leaderboardService = leaderboardService;
     _leaderboardViewRepository = leaderboardViewRepository;
     _logger = logger;
 }
 private void InitialiseTestRepositories()
 {
     matchRepository = new FakeMatchRepository();
     playerMatchRepository = new FakePlayerMatchRepository();
     playerRepository = new FakePlayerRepository();
     teamRepository = new FakeTeamRepository();
     configRepository = new FakeConfigRepository();
     playerStatsRepository = new FakePlayerStatsRepository();
 }
Example #7
0
 public NumberGameService(IMatchRepository _matchRepo, IUserMatchRepository _userMatchRepo, IUserRepository _userRepo)
 {
     this.matchRepo     = _matchRepo;
     this.userMatchRepo = _userMatchRepo;
     this.userRepo      = _userRepo;
 }
 public StatisticsController(IMatchRepository matchRepository, ITeamRepository teamRepository, IPlayerRepository playerRepository)
 {
     this.matchRepository  = matchRepository;
     this.teamRepository   = teamRepository;
     this.playerRepository = playerRepository;
 }
Example #9
0
 public CreateMatchCommandHandler(IMatchRepository matchRepository)
 {
     _matchRepository = matchRepository;
 }
 public MatchModel(IMatchRepository matchRepository)
 {
     _matchRepository = matchRepository;
 }
Example #11
0
 public MatchController(IMatchRepository matchRepository)
 {
     _matchRepository = matchRepository;
 }
 public MatchService(IMatchRepository matchRepo, IRoundService roundService)
 {
     _matchRepo    = matchRepo;
     _roundService = roundService;
     _matchVali    = new MatchValidator();
 }
 public LeaderboardService(ILeaderboardViewRepository leaderboardViewRepository,
     IMatchRepository matchRepository)
 {
     _leaderboardViewRepository = leaderboardViewRepository;
     _matchRepository = matchRepository;
 }
 public AdminController(IMatchRepository matchRepository, PadServiceRepo padServiceRepository)
 {
     _matchRepository      = matchRepository;
     _padServiceRepository = padServiceRepository;
 }
Example #15
0
 public AchievementsService(ILeaderboardViewRepository leaderboardViewRepository,
                            IMatchRepository matchRepository)
 {
     _leaderboardViewRepository = leaderboardViewRepository;
     _matchRepository           = matchRepository;
 }
Example #16
0
 public TeamsController(ITeamRepository teamRepository, IMatchRepository matchRepository, DataContext dataContext)
 {
     this.teamRepository  = teamRepository;
     this.matchRepository = matchRepository;
     this.dataContext     = dataContext;
 }
Example #17
0
 public TagModel(ITagRepository tagRepository, IMatchRepository matchRepository)
 {
     _tagRepository   = tagRepository;
     _matchRepository = matchRepository;
 }
 public MatchController(IMatchRepository repository)
 {
     _repository = repository;
 }
Example #19
0
 public MatchController(IGolferRepository golferRepo, IGameRepository gameRepo, IGameGolferRepository gameGolferRepo, IMatchRepository matchRepo, IMapper mapper)
 {
     _golferRepo     = golferRepo;
     _gameRepo       = gameRepo;
     _gameGolferRepo = gameGolferRepo;
     _matchRepo      = matchRepo;
     _mapper         = mapper;
 }
 public MatchController(IMatchRepository matchRepository)
 {
     _matchRepository = matchRepository;
 }
Example #21
0
 public TeamControllerService(ITeamMemberRepository memberRepository, ITeamRepository teamRepository, IMatchRepository matchRepository)
 {
     _memberRepository = memberRepository;
     _teamRepository   = teamRepository;
     _matchRepository  = matchRepository;
 }
Example #22
0
 public GameService(IMatchRepository matchRepository,
                    IMatchItemRepository matchItemRepository)
 {
     _matchRepository     = matchRepository;
     _matchItemRepository = matchItemRepository;
 }
 public MatchController(IMatchRepository matchRepository, IUserRepository userRepository)
 {
     _matchRepository = matchRepository;
     _userRepository  = userRepository;
 }
Example #24
0
        public MatchModule(IBootstrapInjection injection)
        {
            JsonSettings.MaxJsonLength = int.MaxValue;
            _matcheService             = injection.Services.Match;
            _matchRepository           = injection.Repositories.Match;
            Get[EndpointConfigurationEnum.GET_ALL_MATCHES] = p =>
            {
                var dtos = _matcheService.GetAll()
                           .Select(m => new MatchDTO(m));
                return(Response.AsJson(dtos));
            };

            Get[EndpointConfigurationEnum.GET_ALL_MATCHES] = p =>
            {
                var dtos = _matcheService.GetAll()
                           .Select(m => new MatchDTO(m));
                return(Response.AsJson(dtos));
            };


            Get[EndpointConfigurationEnum.GET_IMAGE_MATCH] = p =>
            {
                try
                {
                    Stream imagem = _matcheService.GetImage(p.id);
                    if (imagem == null)
                    {
                        throw new ArgumentException("Não existe");
                    }
                    return(Response.FromStream(imagem, "image/jpg"));
                }
                catch (ArgumentException)
                {
                    return(HttpStatusCode.NotFound);
                }
                catch (Exception)
                {
                    return(HttpStatusCode.InternalServerError);
                }
            };

            Get[EndpointConfigurationEnum.GET_MATCH] = p =>
            {
                var match = _matcheService.GetMatch(p.id);
                return(Response.AsJson(new MatchDTO(match)));
            };

            Put[EndpointConfigurationEnum.CHANGE_MATCH] = p =>
            {
                var matchId = p.id;
                var userId  = p.userId;
                var match   = JsonConvert.DeserializeObject <MatchDTO>(Request.Body.AsString());
                _matcheService.UpdateMatch(match.PlayersTeamWinner, match.PlayersTeamLooser, userId, matchId);
                return(HttpStatusCode.Accepted);
            };

            Post[EndpointConfigurationEnum.UPLOAD_MATCH, true] = async(x, p) =>
            {
                var bodyStream = GetImageBodyStream();
                int type       = Convert.ToInt32(x.matchType.Value);
                await _matcheService.RegisterMatchAsync(bodyStream, (MatchTypeEnum)type);

                return(HttpStatusCode.OK);
            };

            Post[EndpointConfigurationEnum.UPLOAD_MATCH_DETAILS] = x =>
            {
                var      bodyStream = GetImageBodyStream();
                int      type       = Convert.ToInt32(x.matchType.Value);
                string   dateStr    = x.dateTime.ToString();
                DateTime date       = DateTime.ParseExact(dateStr, "yyyy-MM-dd_HH-mm-ss", CultureInfo.InvariantCulture);
                var      t          = _matcheService.RegisterMatchAsync(bodyStream, (MatchTypeEnum)type, date);
                t.Wait();


                return(HttpStatusCode.OK);
            };


            Get["Import"] = p =>
            {
                var toImport = JsonConvert.DeserializeObject <List <MatchDTO> >(
                    System.IO.File.ReadAllText(
                        @"C:\users\leonardo.kobus\desktop\matches.txt"));
                toImport.ForEach(m =>
                {
                    try
                    {
                        var file   = GetImageFile(m.Date.AddHours(-3));
                        var result = Domain.Entities.Match.Factory.FromDTO(
                            m.Id, m.Date, m.PlayersTeamWinner, m.PlayersTeamLooser,
                            m.Status, m.Winners, m.Loosers, file, MatchTypeEnum.SOLO
                            );
                        _matchRepository.Upsert(result.Instance);
                    }
                    catch (Exception ex)
                    {
                        var ops = "";
                    }
                });
                return("ok");
            };
        }
 public MatchController(IMatchRepository matchRepository, IMatchupResultRepository matchupResultRepository)
 {
     _matchRepository = matchRepository;
     _matchupResultRepository = matchupResultRepository;
 }
Example #26
0
 public MatchService(IMatchRepository matchRepository,
                     ITeamRepository teamRepository)
 {
     this._matchRepository = matchRepository;
     this._teamRepository  = teamRepository;
 }
Example #27
0
 public HomeController(ILogger <HomeController> logger, IMatchRepository matchRepo, IMapper mapper)
 {
     _logger    = logger;
     _matchRepo = matchRepo;
     _mapper    = mapper;
 }
Example #28
0
        /// <inheritdoc />
        Task <Match> IRepository <Matchup, Match> .FindAsync(Matchup identifier)
        {
            IMatchRepository self = this;

            return(self.FindAsync(identifier, CancellationToken.None));
        }
Example #29
0
 public DatabaseHandler(IGroupRepository gr, IMatchRepository mr)
 {
     groupRepository = gr;
     matchRepository = mr;
 }
Example #30
0
        /// <inheritdoc />
        Task <ICollection <Matchup> > IDiscoverable <Matchup> .DiscoverAsync()
        {
            IMatchRepository self = this;

            return(self.DiscoverAsync(CancellationToken.None));
        }
 public StatisticsController()
 {
     matchRepository  = new MatchRepository(new FootballMatchOrganizerContext());
     teamRepository   = new TeamRepository(new FootballMatchOrganizerContext());
     playerRepository = new PlayerRepository(new FootballMatchOrganizerContext());
 }
 public FootballLadder(IMatchRepository matchRepository,
                       IRoundProvider roundProvider)
 {
     this.round = roundProvider.GetRound();
 }
 public MatchResultController(IMatchRepository matchRepository, IScoreRepository scoreRepository, ICurrentUserTool _userTool)
 {
     this.matchRepository = matchRepository;
     this.scoreRepository = scoreRepository;
     this.userTool        = _userTool;
 }
Example #34
0
 public MatchesController()
 {
     _matchRepo = EntityMatchRepository.Instance;
     _redisRepo = SXMatchRepository.Instance;
 }
 private void InitialiseRepositories()
 {
     matchRepository = new MatchRepository(context);
     playerMatchRepository = new PlayerMatchRepository(context);
     playerRepository = new PlayerRepository(context);
     teamRepository = new TeamRepository(context);
     configRepository = new ConfigRepository(context);
     playerStatsRepository = new PlayerStatsRepository(context);
 }
Example #36
0
		public NewMatchCommand(IMatchRepository repo)
		{
			this.repo = repo;
		}
Example #37
0
 public ProtectedApiCall(HttpClient httpClient, IMatchRepository matchRepository)
 {
     HttpClient       = httpClient;
     _matchRepository = matchRepository;
 }
 public MatchService(IValidator <Match> validator, IMatchRepository repo) : base(validator, repo)
 {
 }
		public ShowMatchDetailsCommand(IMatchRepository repo)
		{
			this.repo = repo;
		}
Example #40
0
 public MatchController(IMatchRepository matchRepository, ITeamRepository teamRepository)
 {
     this.matchRepository = matchRepository;
     this.teamRepository  = teamRepository;
 }
Example #41
0
 public MatchesController(IPlayerRepository playerRepository, IMatchRepository matchRepository, IRepository ladderRepository)
 {
     this.playerRepository = playerRepository;
     this.matchRepository = matchRepository;
     this.ladderRepository = ladderRepository;
 }
Example #42
0
 public IndexModel(IMatchRepository matchRepository)
 {
     _matchRepository = matchRepository;
 }
		public ListMatchesCommand(IMatchRepository repo)
		{
			this.repo = repo;
		}
 public RequestMatchController(IMatchRepository matchRepository, IUserRepository userRepository,string loggedInUser)
 {
     _matchRepository = matchRepository ?? DomainModel.MatchRepository.Instance;
     _userRepository = userRepository ?? UserRepository.Instance;
     _loggedInUser = loggedInUser;
 }
 public PlayerController(IMatchRepository matchRepository,
     IUserRepository userRepository)
 {
     _matchRepository = matchRepository;
     _userRepository = userRepository;
 }
 public override void initialize()
 {
     _matchRepository =  MatchRepository.Instance;
     _userRepository =  UserRepository.Instance;
 }
Example #47
0
 public MatchService(IUnitOfWork unitOfWork)
 {
     _unitOfWork      = unitOfWork;
     _matchRepository = _unitOfWork.Matches;
 }
Example #48
0
 public PlayerService(IPlayerRepository playerRepository, IMatchRepository matchRepository, IMapper mapper)
 {
     _playerRepository = playerRepository;
     _matchRepository  = matchRepository;
     _mapper           = mapper;
 }
Example #49
0
 public MatchService(IMatchRepository matchRepository, IMapper mapper, IClubService clubService)
 {
     _clubService = clubService;
     _mapper = mapper;
     _matchRepository = matchRepository;
 }
 public AchievementsService(ILeaderboardViewRepository leaderboardViewRepository,
     IMatchRepository matchRepository)
 {
     _leaderboardViewRepository = leaderboardViewRepository;
     _matchRepository = matchRepository;
 }