예제 #1
0
        public IModificateurClub ObtenirModificateurDeClub(string numeroDuClubAModifier)
        {
            if (!repertoireClubs.Existe(numeroDuClubAModifier))
            {
                throw new ElementNonExistantException();
            }

            return(new ModificateurClub(this.repertoireClubs, numeroDuClubAModifier));
        }
예제 #2
0
        public Club Creer()
        {
            if (numero == null)
            {
                throw new ArgumentNullException("Il faut specifier au moins le numero du club");
            }
            else if (repertoireClubs.Existe(numero))
            {
                throw new DuplicationException();
            }

            var club = new Club(numero, champsPoona);

            repertoireClubs.Ajouter(club);
            return(club);
        }
예제 #3
0
        public Joueur Creer()
        {
            if (license == -1)
            {
                throw new ArgumentNullException("Il faut specifier la license du joueur");
            }
            if (numeroClub == null)
            {
                throw new ArgumentNullException("Il faut specifier le club auquel appartient le joueur");
            }
            else if (!repertoireClubs.Existe(numeroClub))
            {
                throw new ElementNonExistantException();
            }
            else if (repertoireJoueurs.Existe(license))
            {
                throw new DuplicationException();
            }

            var joueur = new Joueur(license, numeroClub, champsPoona);

            repertoireJoueurs.Ajouter(joueur);
            return(joueur);
        }