Exemple #1
0
        static void Main(string[] args)
        {
            SqliteConnectionFactory sqliteConnection = new SqliteConnectionFactory("database");
            IUserRepo        userRepo         = new UserRepository(sqliteConnection);
            ICursaRepo       cursaRepository  = new CursaRepository(sqliteConnection);
            IEchipaRepo      echipaRepository = new EchipaRepository(sqliteConnection);
            IParticipantRepo participantRepo  = new ParticipantRepository(sqliteConnection);
            IServices        serviceImpl      = new ServerImpl(cursaRepository, echipaRepository, participantRepo, userRepo);

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

            server.Start();
            Console.WriteLine("Server started ...");
            //Console.WriteLine("Press <enter> to exit...");
            Console.ReadLine();
        }
Exemple #2
0
        public static void Main(string[] args)
        {
            OperatoriServices operatoriServices = new OperatoriServices();
            ClientiServices   clientiServices   = new ClientiServices();
            CurseServices     curseServices     = new CurseServices();
            RezervariServices rezervariServices = new RezervariServices();


            IServer serviceImpl = new ServerImpl(operatoriServices, curseServices, rezervariServices, clientiServices);

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

            server.Start();
            Console.WriteLine("Server started ...");
            //Console.WriteLine("Press <enter> to exit...");
            Console.ReadLine();
        }
Exemple #3
0
 public ServerServices()
 {
     server = new ServerImpl();
 }