예제 #1
0
        public PlayerGenerator()
        {
            _personNameGenerator    = new PersonNameGenerator();
            _profileScoreCalculator = new ProfileScoreCalculator();
            _numberRandomizer       = new NumberRandomizer();
            _listRandomizer         = new ListRandomizer();
            _positionDeterminator   = new PositionDeterminator();

            var repositoryFactory = new RepositoryFactory();

            using (var lineRepository = repositoryFactory.CreateLineRepository())
            {
                _lines = lineRepository.GetAll();
            }

            using (var positionRepository = repositoryFactory.CreatePositionRepository())
            {
                _positions = positionRepository.GetAll();
            }

            using (var playerProfileRepository = repositoryFactory.CreatePlayerProfileRepository())
            {
                _playerProfiles = playerProfileRepository.GetAll();
            }
        }
예제 #2
0
파일: ServiceBase.cs 프로젝트: bouwe77/fmg
 protected ServiceBase(Game game)
 {
     Game = game;
      NumberRandomizer = new NumberRandomizer();
      ListRandomizer = new ListRandomizer();
      ServiceFactory = new ServiceFactory();
 }
예제 #3
0
        public FriendlyManagerBase(IRandomizer randomizer, INumberRandomizer numberRandomizer)
        {
            _randomizer       = randomizer;
            _numberRandomizer = numberRandomizer;

            using (var competitionRepository = new RepositoryFactory().CreateCompetitionRepository())
            {
                _competition = competitionRepository.GetFriendly();
            }
        }
예제 #4
0
        internal PlayerGenerator()
        {
            _personNameGenerator = new PersonNameGenerator();
             _profileScoreCalculator = new ProfileScoreCalculator();
             _numberRandomizer = new NumberRandomizer();
             _listRandomizer = new ListRandomizer();
             _positionDeterminator = new PositionDeterminator();

             using (var lineRepository = new RepositoryFactory().CreateLineRepository())
             {
            _lines = lineRepository.GetAll();
             }

             using (var positionRepository = new RepositoryFactory().CreatePositionRepository())
             {
            _positions = positionRepository.GetAll();
             }

             using (var playerProfileRepository = new RepositoryFactory().CreatePlayerProfileRepository())
             {
            _playerProfiles = playerProfileRepository.GetAll();
             }
        }
예제 #5
0
 public PersonNameGenerator()
 {
     _nameRepository = new RepositoryFactory().CreateNameRepository();
      _numberRandomizer = new NumberRandomizer();
 }
예제 #6
0
 public PersonNameGenerator()
 {
     _nameRepository   = new RepositoryFactory().CreateNameRepository();
     _numberRandomizer = new NumberRandomizer();
 }
예제 #7
0
 public PreSeasonFriendlyManager(IRandomizer randomizer, INumberRandomizer numberRandomizer)
     : base(randomizer, numberRandomizer)
 {
 }
예제 #8
0
 public MatchDateManager(int startYear)
 {
     _numberRandomizer = new NumberRandomizer();
     _startYear        = startYear;
 }
예제 #9
0
 public MatchDateManager(int seasonNr)
 {
     _numberRandomizer = new NumberRandomizer();
      _seasonNr = seasonNr;
 }
예제 #10
0
 protected ServiceBase()
 {
     NumberRandomizer = new NumberRandomizer();
     ListRandomizer   = new ListRandomizer();
     ServiceFactory   = new ServiceFactory();
 }
 public DuringSeasonFriendlyManager(IRepositoryFactory repositoryFactory, IRandomizer randomizer, INumberRandomizer numberRandomizer)
     : base(randomizer, numberRandomizer)
 {
     _repositoryFactory = repositoryFactory;
 }