예제 #1
0
        static void Main(string[] args)
        {
            ValidateEchipa       validateEchipa       = new ValidateEchipa();
            ValidateElev         validateElev         = new ValidateElev();
            ValidateJucator      validateJucator      = new ValidateJucator();
            ValidateMeci         validateMeci         = new ValidateMeci();
            ValidateJucatorActiv validateJucatorActiv = new ValidateJucatorActiv();

            EchipaRepository       echipaRepository       = new EchipaRepository(validateEchipa, "C:\\Users\\pc\\source\\repos\\Lab9\\Lab9\\files\\echipe.txt", new InFileRepository <int, Echipa> .CreateEntityFromString(CreateEchipaFromString));
            ElevRepository         elevRepository         = new ElevRepository(validateElev, "C:\\Users\\pc\\source\\repos\\Lab9\\Lab9\\files\\elevi.txt", new InFileRepository <int, Elev> .CreateEntityFromString(CreateElevFromString));
            JucatorRepository      jucatorRepository      = new JucatorRepository(validateJucator, "C:\\Users\\pc\\source\\repos\\Lab9\\Lab9\\files\\jucatori.txt", new InFileRepository <int, Jucator> .CreateEntityFromString(CreateJucatorFromString));
            MeciRepository         meciRepository         = new MeciRepository(validateMeci, "C:\\Users\\pc\\source\\repos\\Lab9\\Lab9\\files\\meciuri.txt", new InFileRepository <int, Meci> .CreateEntityFromString(CreateMeciFromString));
            JucatorActivRepository jucatorActivRepository = new JucatorActivRepository(validateJucatorActiv, "C:\\Users\\pc\\source\\repos\\Lab9\\Lab9\\files\\jucatoriActivi.txt", new InFileRepository <int, JucatorActiv> .CreateEntityFromString(CreateJucatorActivFromString));

            EchipaService       echipaService       = new EchipaService(echipaRepository);
            ElevService         elevService         = new ElevService(elevRepository);
            JucatorService      jucatorService      = new JucatorService(jucatorRepository);
            MeciService         meciService         = new MeciService(meciRepository);
            JucatorActivService jucatorActivService = new JucatorActivService(jucatorActivRepository);


            Teste.RunTests(echipaService, elevService, jucatorActivService, jucatorService, meciService);

            Consola consola = new Consola(echipaService, elevService, jucatorService, meciService, jucatorActivService);

            consola.run();
        }
예제 #2
0
 public MeciService(MeciRepository repo)
 {
     this.repo = repo;
 }