static void Main(string[] args)
        {
            VoluntarDbRepository     voluntarRepository     = new VoluntarDbRepository();
            DonatorDbRepository      donatorRepository      = new DonatorDbRepository();
            CazCaritabilDbRepository cazCaritabilRepository = new CazCaritabilDbRepository();
            DonatieDbRepository      donatieRepository      = new DonatieDbRepository();
            IValidator <Donator>     valDonator             = new DonatorValidator();
            IValidator <Donatie>     valDonatie             = new DonatieValidator();

            IServices serviceImpl = new ServerImplementation(voluntarRepository, cazCaritabilRepository,
                                                             donatorRepository, donatieRepository, valDonator, valDonatie);


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

            server.Start();
            Console.WriteLine("Server started ...");

            Console.ReadLine();
        }
示例#2
0
 public DonatorRepository(DonatorValidator validator)
 {
     _validator = validator;
 }