static void Main(string[] args) { //IParticipantEventRepository eventPartRepo = new ParticipantEventMockRepository(); //IParticipantRepository partRepo = new ParticipantMockRepository(); //IEventRepository eventRepo = new EventMockRepository(); //IOrganizerRepository orgRepo = new OrganizerMockRepository(); IParticipantEventRepository eventPartRepo = new ParticipantEventDbRepository(); IParticipantRepository partRepo = new ParticipantDbRepository(); IEventRepository eventRepo = new EventDbRepository(); IOrganizerRepository orgRepo = new OrganizerDbRepository(); ISwimServer swimService = new SwimServerImpl(partRepo, eventRepo, eventPartRepo, orgRepo); SerialSwimServer server = new SerialSwimServer("127.0.0.1", 55555, swimService); server.Start(); Console.WriteLine("Server started ..."); //Console.WriteLine("Press <enter> to exit..."); Console.ReadLine(); }
static void Main() { log4net.Config.XmlConfigurator.Configure(); logger.Info("Program Started"); UserDbRepo urepo = new UserDbRepo(); ChildDbRepo crepo = new ChildDbRepo(); EventDbRepository erepo = new EventDbRepository(); ChildValidator cvalidator = new ChildValidator(); EventValidator evalidator = new EventValidator(); UserService userv = new UserService(urepo); ChildService cserv = new ChildService(crepo, cvalidator); EventService eserv = new EventService(erepo, evalidator); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Login(userv, cserv, eserv)); //ChildDbRepo repo = new ChildDbRepo(); //Child c = repo.save(new Child("Adrian", "Ionel", 9)); logger.Info("Program ended."); }
public EventService(EventDbRepository rep, EventValidator val) { this.repo = rep; this.validator = val; }