Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            AirportService.AirportServiceClient client = new AirportService.AirportServiceClient();
            Console.WriteLine(client.GetValue());


            AirportService.ControlTower tower = new AirportService.ControlTower();
            PlaneManager planeManager         = new PlaneManager();

            SimulatorForLanding    simulatorForLanding    = new SimulatorForLanding(planeManager, tower, client);
            SimulatorForDepartures simulatorForDepartures = new SimulatorForDepartures(planeManager, tower, client);

            //simulatorForLanding.GenerateLandingFlights();
            //simulatorForDepartures.GenerateTakeoffFlights();

            Task.Run(() => GenerateFlights(simulatorForLanding, simulatorForDepartures));

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        private async static Task GenerateFlights(SimulatorForLanding sForLanding, SimulatorForDepartures sForDepartures)
        {
            await Task.Run(async() => { await sForLanding.GenerateLandingFlights(); });

            await Task.Run(async() => { await sForDepartures.GenerateTakeoffFlights(); });
        }