Example #1
0
        //For testing
        public Tournament(IRoundCreationService fixtureCreationService, IParticipantEnlisterService participantEnlisterService, IResultTableEnumeratorService resultTableEnumeratorService,
                          Guid id, string name, DateTime creationDate, IEnumerable <Team> participants, string logoUrl)
        {
            Id           = id;
            Name         = name;
            CreationDate = creationDate;
            LogoUrl      = logoUrl;

            _participants = new List <Team>();
            _rounds       = new List <Round>();

            _resultTableEnumeratorService = resultTableEnumeratorService;
            _fixtureCreationService       = fixtureCreationService;
            _participantEnlisterService   = participantEnlisterService;

            InitializeTournamentData(participants);
        }
Example #2
0
 /// <summary>
 /// Needed for serialization
 /// </summary>
 private Tournament()
 {
     _fixtureCreationService       = new RoundCreationService();
     _participantEnlisterService   = new ParticipantEnlisterService();
     _resultTableEnumeratorService = new ResultTableEnumeratorService();
 }