static void Main(string[] args) { IUserRepository userRepo = new UserRepositoryDB(); IChildRepository childRepo = new ChildRepositoryDB(); IEntryRepository entryRepo = new EntryRepositoryDB(); IServices service = new ServerImplementation(userRepo, childRepo, entryRepo); //SerialServer server = new SerialServer("127.0.0.1", 55555, service); ProtoServer server = new ProtoServer("127.0.0.1", 55556, service); server.Start(); Console.WriteLine("Server started..."); Console.ReadLine(); }
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); ProtoServer server = new ProtoServer("127.0.0.1", 55555, serviceImpl); server.Start(); Console.WriteLine("Server started ..."); }