Esempio n. 1
0
        public static void Main(string[] args)
        {
            log4net.Config.XmlConfigurator.Configure();

            IUserRepository   userRepo    = new UserDbRepository();
            ITicketRepository ticketRepo  = new TicketDbRepository();
            IShowRepository   showRepo    = new ShowDbRepository();
            IService          serviceImpl = new Service(userRepo, ticketRepo, showRepo);

            Console.WriteLine("userRepo size : " + userRepo.FindAll().Count);

            SerialServer server = new SerialServer("127.0.0.1", 55555, serviceImpl);

            server.Start();
            Console.WriteLine("Server started ...");
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            XmlConfigurator.Configure(new System.IO.FileInfo("App.config"));
            IRepositoryExcursie  repositoryExcursie  = new RepositoryExcursie();
            IRepositoryRezervare repositoryRezervare = new RepositoryRezervare();
            IRepositoryUser      repositoryUser      = new RepositoryUser();
            IService             serviceImpl         = new Service(repositoryRezervare, repositoryUser, repositoryExcursie);


            // IChatServer serviceImpl = new ChatServerImpl();
            AbstractServer server = new SerialServer("127.0.0.1", 55555, serviceImpl);

            server.Start();
            Console.WriteLine("Server started ...");
            //Console.WriteLine("Press <enter> to exit...");
            Console.ReadLine();
        }