コード例 #1
0
        static async Task Main(string[] args)
        {
            var      calculator = new Calculator();
            var      parser     = new Parser();
            var      builder    = new StarshipBuilder(parser);
            var      service    = new Services.StarshipService(builder);
            Executor executor   = new Executor(service, calculator);
            await executor.Init();

            string input;

            do
            {
                Console.WriteLine("\nPlease enter the distance in MGLT(Mega Lights) or type \"exit\" to exit program:");
                input = Console.ReadLine();
                executor.Run(input.ToInt());
            } while (input != "exit");
        }
コード例 #2
0
 public StarshipService(StarshipBuilder builder)
 {
     _builder = builder;
 }