Exemplo n.º 1
0
 public TasksParser(ITaskParserRepository tasksRepostory, ISteamRepository steamRepostory, IMatchRepository matchRepostory, IUnitOfWork unitOfWork)
 {
     TasksRepostory = tasksRepostory;
     SteamRepostory = steamRepostory;
     MatchRepostory = matchRepostory;
     UnitOfWork = unitOfWork;
 }
Exemplo n.º 2
0
 public UserService(IUserRepository userRepository, IBetRepository betRepository, IMatchRepository matchRepository, IAdministratorService administratorService)
 {
     m_UserRepository = userRepository;
     m_BetRepository = betRepository;
     m_MatchRepository = matchRepository;
     m_AdministratorService = administratorService;
 }
Exemplo n.º 3
0
 public MatchService(IMatchRepository matchRepository, IMatchMapper matchMapper, IUserService userService,
     IAdministratorService administratorService)
 {
     m_MatchRepository = matchRepository;
     m_UserService = userService;
     m_MatchMapper = matchMapper;
     m_AdministratorService = administratorService;
 }
Exemplo n.º 4
0
 public MatchReportServices(IMatchRepository matchRepository, IPlayerMatchObjectiveRepository playerMatchObjectiveRepository, IPlayerMatchStatisticRepository playerMatchStatisticRepository, IPlayerRepository playerRepository, IMatchMomRepository matchMomRepository)
 {
     _matchRepository = matchRepository;
     _playerMatchObjectiveRepository = playerMatchObjectiveRepository;
     _playerMatchStatisticRepository = playerMatchStatisticRepository;
     _playerRepository = playerRepository;
     _matchMomRepository = matchMomRepository;
 }
Exemplo n.º 5
0
 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();
 }
Exemplo n.º 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;
 }
Exemplo n.º 9
0
 public CreateMatchCommandHandler(IMatchRepository matchRepository)
 {
     _matchRepository = matchRepository;
 }
 public MatchModel(IMatchRepository matchRepository)
 {
     _matchRepository = matchRepository;
 }
Exemplo n.º 11
0
 public MatchController(IMatchRepository matchRepository)
 {
     _matchRepository = matchRepository;
 }
Exemplo n.º 12
0
 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;
 }
Exemplo n.º 15
0
 public AchievementsService(ILeaderboardViewRepository leaderboardViewRepository,
                            IMatchRepository matchRepository)
 {
     _leaderboardViewRepository = leaderboardViewRepository;
     _matchRepository           = matchRepository;
 }
Exemplo n.º 16
0
 public TeamsController(ITeamRepository teamRepository, IMatchRepository matchRepository, DataContext dataContext)
 {
     this.teamRepository  = teamRepository;
     this.matchRepository = matchRepository;
     this.dataContext     = dataContext;
 }
Exemplo n.º 17
0
 public TagModel(ITagRepository tagRepository, IMatchRepository matchRepository)
 {
     _tagRepository   = tagRepository;
     _matchRepository = matchRepository;
 }
Exemplo n.º 18
0
 public MatchController(IMatchRepository repository)
 {
     _repository = repository;
 }
Exemplo n.º 19
0
 public MatchController(IGolferRepository golferRepo, IGameRepository gameRepo, IGameGolferRepository gameGolferRepo, IMatchRepository matchRepo, IMapper mapper)
 {
     _golferRepo     = golferRepo;
     _gameRepo       = gameRepo;
     _gameGolferRepo = gameGolferRepo;
     _matchRepo      = matchRepo;
     _mapper         = mapper;
 }
Exemplo n.º 20
0
 public MatchController(IMatchRepository matchRepository)
 {
     _matchRepository = matchRepository;
 }
Exemplo n.º 21
0
 public TeamControllerService(ITeamMemberRepository memberRepository, ITeamRepository teamRepository, IMatchRepository matchRepository)
 {
     _memberRepository = memberRepository;
     _teamRepository   = teamRepository;
     _matchRepository  = matchRepository;
 }
Exemplo n.º 22
0
 public GameService(IMatchRepository matchRepository,
                    IMatchItemRepository matchItemRepository)
 {
     _matchRepository     = matchRepository;
     _matchItemRepository = matchItemRepository;
 }
Exemplo n.º 23
0
 public MatchController(IMatchRepository matchRepository, IUserRepository userRepository)
 {
     _matchRepository = matchRepository;
     _userRepository  = userRepository;
 }
Exemplo n.º 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");
            };
        }
Exemplo n.º 25
0
 public MatchController(IMatchRepository matchRepository, IMatchupResultRepository matchupResultRepository)
 {
     _matchRepository = matchRepository;
     _matchupResultRepository = matchupResultRepository;
 }
Exemplo n.º 26
0
 public MatchService(IMatchRepository matchRepository,
                     ITeamRepository teamRepository)
 {
     this._matchRepository = matchRepository;
     this._teamRepository  = teamRepository;
 }
Exemplo n.º 27
0
 public HomeController(ILogger <HomeController> logger, IMatchRepository matchRepo, IMapper mapper)
 {
     _logger    = logger;
     _matchRepo = matchRepo;
     _mapper    = mapper;
 }
Exemplo n.º 28
0
        /// <inheritdoc />
        Task <Match> IRepository <Matchup, Match> .FindAsync(Matchup identifier)
        {
            IMatchRepository self = this;

            return(self.FindAsync(identifier, CancellationToken.None));
        }
Exemplo n.º 29
0
 public DatabaseHandler(IGroupRepository gr, IMatchRepository mr)
 {
     groupRepository = gr;
     matchRepository = mr;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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);
 }
Exemplo n.º 36
0
		public NewMatchCommand(IMatchRepository repo)
		{
			this.repo = repo;
		}
Exemplo n.º 37
0
 public ProtectedApiCall(HttpClient httpClient, IMatchRepository matchRepository)
 {
     HttpClient       = httpClient;
     _matchRepository = matchRepository;
 }
Exemplo n.º 38
0
 public MatchService(IValidator <Match> validator, IMatchRepository repo) : base(validator, repo)
 {
 }
		public ShowMatchDetailsCommand(IMatchRepository repo)
		{
			this.repo = repo;
		}
Exemplo n.º 40
0
 public MatchController(IMatchRepository matchRepository, ITeamRepository teamRepository)
 {
     this.matchRepository = matchRepository;
     this.teamRepository  = teamRepository;
 }
Exemplo n.º 41
0
 public MatchesController(IPlayerRepository playerRepository, IMatchRepository matchRepository, IRepository ladderRepository)
 {
     this.playerRepository = playerRepository;
     this.matchRepository = matchRepository;
     this.ladderRepository = ladderRepository;
 }
Exemplo n.º 42
0
 public IndexModel(IMatchRepository matchRepository)
 {
     _matchRepository = matchRepository;
 }
Exemplo n.º 43
0
		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;
 }
Exemplo n.º 45
0
 public PlayerController(IMatchRepository matchRepository,
     IUserRepository userRepository)
 {
     _matchRepository = matchRepository;
     _userRepository = userRepository;
 }
 public override void initialize()
 {
     _matchRepository =  MatchRepository.Instance;
     _userRepository =  UserRepository.Instance;
 }
Exemplo n.º 47
0
 public MatchService(IUnitOfWork unitOfWork)
 {
     _unitOfWork      = unitOfWork;
     _matchRepository = _unitOfWork.Matches;
 }
Exemplo n.º 48
0
 public PlayerService(IPlayerRepository playerRepository, IMatchRepository matchRepository, IMapper mapper)
 {
     _playerRepository = playerRepository;
     _matchRepository  = matchRepository;
     _mapper           = mapper;
 }
Exemplo n.º 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;
 }