public RealService(BiletRepo br, ConcertRepo cr, UserRepo ur) { this.br = br; this.cr = cr; this.ur = ur; loggedUsers = new Dictionary <User, IFestivalObserver>(); }
public Business(ConcertRepo c, UserRepo u, BiletRepo b) { cr = c; ur = u; br = b; countBilete = br.size(); activeUsers = new List <int>(); }
public ServiceReal(BiletRepo biletRepo, ConcertRepo concertRepo, UserRepo userRepo) { this.biletRepo = biletRepo; this.concertRepo = concertRepo; this.userRepo = userRepo; loggedUsers = new ConcurrentDictionary <User, FestivalObserver>(); updateClients = new List <UpdateService.Client>(); }
static void Main(string[] args) { UserRepo userRepo = new UserRepo(); ConcertRepo concertRepo = new ConcertRepo(); BiletRepo biletRepo = new BiletRepo(); RealService service = new RealService(biletRepo, concertRepo, userRepo); MyConcurrentServer server = new MyConcurrentServer("127.0.0.1", 1234, service); Console.Write("Concurrent Server created ... \n ... "); server.Start(); Console.Write(" started ... "); Console.ReadLine(); }
private static ServiceReal GetService() { var userRepo = new UserRepo(); userRepo.CheckLoginCredentials("admin", "admin"); var concertRepo = new ConcertRepo(); var concerte = concertRepo.cautaConcerteDetalii(); var biletRepo = new BiletRepo(); ServiceReal service = new ServiceReal(biletRepo, concertRepo, userRepo); var concerteFiltrate = service.getConcertsByDate("2020-05-06"); foreach (ConcertDTO c in concerte) { Console.WriteLine(c.Location + " " + c.Artist + " " + c.Date); } foreach (ConcertDTO con in concerteFiltrate) { Console.WriteLine(con.Location); } return(service); }