예제 #1
0
        public static void Main(string[] args)
        {
            IReader reader;

            if (args.Length == 1)
            {
                var testPath = args.First();
                reader = new Core.IO.StringReader(File.ReadAllText(testPath));
            }
            else
            {
                reader = new ConsoleReader();
            }

            IWriter writer = new ConsoleWriter();

            IAirport           airport           = new Airport(new List <IBag>(), new List <IBag>(), new List <ITrip>(), new List <IPassenger>());
            IAirportController airportController = new AirportController(airport);
            IFlightController  flightController  = new FlightController(airport);

            IEngine engine = new Engine(reader, writer, airportController, flightController);

            engine.Run();
        }
예제 #2
0
        public static void Main(string[] args)
        {
            IReader reader;

            if (args.Length == 1)
            {
                var testPath = args.First();
                reader = new Core.IO.StringReader(File.ReadAllText(testPath));
            }
            else
            {
                reader = new ConsoleReader();
            }

            IWriter writer = new ConsoleWriter();

            var airport           = new Airport();
            var airportController = new AirportController(airport);
            var flightController  = new FlightController(airport);

            var engine = new Engine(reader, writer, airportController, flightController);

            engine.ВдигниСамолета();
        }
예제 #3
0
        public static void Main(string[] args)
        {
            IReader reader;

            if (args.Length == 1)
            {
                var testPath = args.First();
                reader = new Core.IO.StringReader(File.ReadAllText(testPath));
            }
            else
            {
                reader = new ConsoleReader();
            }

            IWriter writer = new ConsoleWriter();

            IStage stage = new Stage();
            IFestivalController festivalController = new FestivalController(stage);
            ISetController      setController      = new SetController(stage);

            IEngine engine = new Engine(reader, writer, festivalController, setController);

            engine.Run();
        }