Beispiel #1
0
        static public void initialize()
        {
            string eleviFileName          = ConfigurationManager.AppSettings["eleviFileName"];
            string echipeFileName         = ConfigurationManager.AppSettings["echipeFileName"];
            string meciuriFileName        = ConfigurationManager.AppSettings["meciuriFileName"];
            string jucatoriFileName       = ConfigurationManager.AppSettings["jucatoriFileName"];
            string jucatoriActiviFileName = ConfigurationManager.AppSettings["jucatoriActiviFileName"];

            generate(eleviFileName, echipeFileName, meciuriFileName, jucatoriFileName, jucatoriActiviFileName);

            IValidator <Elev>    elevValidator = new ElevValidator();
            ElevInFileRepository elevRepo      = new ElevInFileRepository(elevValidator, eleviFileName);

            IValidator <Echipa>    echipaValidator = new EchipaValidator();
            EchipaInFileRepository echipaRepo      = new EchipaInFileRepository(echipaValidator, echipeFileName);

            IValidator <Meci>    meciValidator = new MeciValidator();
            MeciInFileRepository meciRepo      = new MeciInFileRepository(meciValidator, meciuriFileName);

            IValidator <Jucator>    jucatorValidator = new JucatorValidator();
            JucatorInFileRepository jucatorRepo      = new JucatorInFileRepository(jucatorValidator, jucatoriFileName);

            IValidator <JucatorActiv>    jucatorActivValidator = new JucatorActivValidator(jucatorRepo, meciRepo);
            JucatorActivInFileRepository jucatorActivRepo      = new JucatorActivInFileRepository(jucatorActivValidator, jucatoriActiviFileName);

            service = new SuperService(elevRepo, echipaRepo, meciRepo, jucatorRepo, jucatorActivRepo);
        }
Beispiel #2
0
 public UI(SuperService service)
 {
     this.service = service;
 }