public override void ExecuteCommand() { if (!this.IsValid) { return; } Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("Create WebAPI project? Y/N"); string result = Console.ReadLine(); if (result != null && result.ToLower().Equals("y")) { this.WebApiProject = true; } Console.ForegroundColor = ConsoleColor.White; if (this.WebApiProject) { Console.WriteLine("creating app " + this.AppName + " with WebAPI."); var webApi = new WebApiProjectCreator(this.AppName); webApi.Create(); return; } Console.WriteLine("Creating app " + this.AppName); var mvc = new MvcProjectCreator(this.AppName); mvc.Create(); }
public override async Task ExecuteCommandAsync() { await Task.Delay(1).ConfigureAwait(false); if(!this.IsValid) { return; } Console.WriteLine("Creating app " + this.AppName); var mvc = new MvcProjectCreator(this.AppName); mvc.Create(); }
public override async Task ExecuteCommandAsync() { await Task.Delay(1).ConfigureAwait(false); if (!this.IsValid) { return; } Console.WriteLine("Creating app " + this.AppName); var mvc = new MvcProjectCreator(this.AppName); mvc.Create(); }