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(); }
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.ВдигниСамолета(); }
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(); }