static void Main(string[] args) { XmlConfigurator.Configure(new System.IO.FileInfo(args[0])); IDictionary <String, string> props = new SortedList <String, String>(); props.Add("ConnectionString", GetConnectionStringByName("labDB")); IRepoContestant repoContestant = new RepoDbContestant(props); IRepoRace repoRace = new RepoDbRace(props); IOfficePers officePersRepo = new RepoDbOfficePers(props); RepoDbRegistration repoDbRegistration = new RepoDbRegistration(props); IServer serverImpl = new ServerImpl(repoContestant, repoRace, officePersRepo, repoDbRegistration); SerialServer server = new SerialServer("127.0.0.1", 55555, serverImpl); server.Start(); Console.WriteLine("Server started..."); Console.ReadLine(); }
public static void Main(string[] args) { Console.WriteLine("hi"); ArtistRepository artistRepository = new ArtistRepository(); EmployeeRepository employeeRepository = new EmployeeRepository(); BuyerRepository buyerRepository = new BuyerRepository(); ShowRepository showRepository = new ShowRepository(); TicketRepository ticketRepository = new TicketRepository(); IServices serviceImpl = new ServerImpl(employeeRepository, showRepository, artistRepository, buyerRepository, ticketRepository); AbstractServer server = new SerialServer("127.0.0.1", 55555, serviceImpl); server.Start(); Console.WriteLine("Server started ..."); //Console.WriteLine("Press <enter> to exit..."); Console.ReadLine(); }