Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
        static void Main()
        {
            String            connectionString   = @"Data Source= D:\an 2 semestru 2\mpp\tema1-java\AgentieTurism.db; Version = 3";
            RepositoryAngajat repositoryAngajat  = new RepositoryAngajat(connectionString);
            RepositoryBilet   repositoryBilet    = new RepositoryBilet(connectionString);
            RepositoryZbor    repositoryZbor     = new RepositoryZbor(connectionString);
            ServicesServer    ctrlServicesServer = new ServicesServer(repositoryBilet, repositoryZbor, repositoryAngajat);



            SerialChatServer server = new SerialChatServer("127.0.0.1", 55555, ctrlServicesServer);

            server.Start();
            Console.WriteLine("Server started ...");
            //Console.WriteLine("Press <enter> to exit...");
            Console.ReadLine();
        }
Ejemplo n.º 3
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();
        }